plugin-sdk icon indicating copy to clipboard operation
plugin-sdk copied to clipboard

add CMakeLists.txt for editors such as CLion

Open alextwothousand opened this issue 3 years ago • 5 comments

I added a CMakeLists for editors such as CLion, or for those who may use vscode / sublime text.

To enable SA/VC/3, just use

option(GTA_SAN_ANDREAS ON)
# and/or
option(GTA_VICE_CITY ON)
# and/or
option(GTA_III ON)

in your project parent path's CMakeLists.txt, before your add_subdirectory line.

alextwothousand avatar Jul 19 '21 20:07 alextwothousand

no merge?

alextwothousand avatar Jul 27 '21 11:07 alextwothousand

as for me, the project file isn't ready yet:

  • no way to build examples with cmake;
  • not all macros are written (e.g. for sa):
target_compile_definitions(plugin_sdk PUBLIC
  _CRT_SECURE_NO_WARNINGS
  _DX9_SDK_INSTALLED
  _CRT_NON_CONFORMING_SWPRINTFS

  GTASA
  GTAGAME_NAME="San Andreas"
  GTAGAME_ABBR="SA"
  GTAGAME_ABBRLOW="sa"
  GTAGAME_PROTAGONISTNAME="CJ"
  GTAGAME_CITYNAME="San Andreas"
  PLUGIN_SGV_10US
)

all macros can be found in premake.lua

i would also like:

  • install library (cmake --build . --target install ...);
  • use namespace (e.g. target_link_libraries(project PRIVATE pluginsdk::sa)).

imring avatar Jul 27 '21 12:07 imring

as for me, the project file isn't ready yet:

* no way to build examples with cmake;

* not all macros are written (e.g. for sa):
target_compile_definitions(plugin_sdk PUBLIC
  _CRT_SECURE_NO_WARNINGS
  _DX9_SDK_INSTALLED
  _CRT_NON_CONFORMING_SWPRINTFS

  GTASA
  GTAGAME_NAME="San Andreas"
  GTAGAME_ABBR="SA"
  GTAGAME_ABBRLOW="sa"
  GTAGAME_PROTAGONISTNAME="CJ"
  GTAGAME_CITYNAME="San Andreas"
  PLUGIN_SGV_10US
)

all macros can be found in premake.lua

i would also like:

* install library (`cmake --build . --target install ...`);

* use namespace (e.g. `target_link_libraries(project PRIVATE pluginsdk::sa)`).

Will look into it at some point.

alextwothousand avatar Aug 03 '21 16:08 alextwothousand

https://github.com/imring/plugin-sdk/tree/cmake

Izzotop avatar Jun 14 '22 11:06 Izzotop

https://github.com/imring/plugin-sdk/tree/cmake

or https://gist.github.com/THE-FYP/104855c5fdd7311a336a5178a0b33118

imring avatar Jun 14 '22 12:06 imring