DK22Pac / plugin-sdk

An SDK for developing ASI/CLEO plugins for GTA San Andreas, GTA Vice City and GTA III
zlib License
435 stars 118 forks source link

add CMakeLists.txt for editors such as CLion #121

Open alextwothousand opened 3 years ago

alextwothousand commented 3 years ago

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 commented 3 years ago

no merge?

imring commented 3 years ago

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

i would also like:

alextwothousand commented 3 years ago

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.

Izzotop commented 2 years ago

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

imring commented 2 years ago

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

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