2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CMakeLists.txt 1.5 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. cmake_minimum_required(VERSION 3.20)
  2. # Set your project name here
  3. project(izanagi C)
  4. set(CMAKE_C_STANDARD 11)
  5. include_directories(
  6. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/include"
  7. "${PROJECT_SOURCE_DIR}/dependencies/minIni/dev"
  8. "${PROJECT_SOURCE_DIR}/dependencies/bdd-for-c"
  9. )
  10. if (WIN32)
  11. if (CMAKE_SIZEOF_VOID_P EQUAL 8)
  12. set(PROJECT_ARCH x64)
  13. else ()
  14. set(PROJECT_ARCH x86)
  15. endif ()
  16. endif ()
  17. link_directories(
  18. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}"
  19. )
  20. add_executable(
  21. game
  22. dependencies/minIni/dev/minIni.h
  23. dependencies/minIni/dev/minIni.c
  24. src/packages/game/config/IZ_config.h
  25. src/packages/game/config/IZ_config.c
  26. src/packages/game/IZ_common.h
  27. src/packages/game/IZ_action.h
  28. src/packages/game/IZ_app.h
  29. src/packages/game/IZ_app.c
  30. src/packages/game/main.c
  31. )
  32. target_link_libraries(
  33. game
  34. SDL2main
  35. SDL2
  36. )
  37. add_executable(
  38. game-test
  39. dependencies/minIni/dev/minIni.h
  40. dependencies/minIni/dev/minIni.c
  41. src/packages/game/config/IZ_config.h
  42. src/packages/game/config/IZ_config.c
  43. dependencies/bdd-for-c/bdd-for-c.h
  44. src/packages/game-test/config/IZ_config.c
  45. )
  46. target_link_libraries(
  47. game-test
  48. SDL2main
  49. SDL2
  50. )
  51. if (WIN32)
  52. add_custom_command(TARGET game POST_BUILD
  53. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  54. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file
  55. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  56. endif ()