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 3.9 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. cmake_minimum_required(VERSION 3.21)
  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. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/pm_common"
  10. "${PROJECT_SOURCE_DIR}/dependencies/spine-runtimes/spine-c/spine-c/include"
  11. )
  12. if (WIN32)
  13. if (CMAKE_SIZEOF_VOID_P EQUAL 8)
  14. set(PROJECT_ARCH x64)
  15. else ()
  16. set(PROJECT_ARCH x86)
  17. endif ()
  18. endif ()
  19. link_directories(
  20. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}"
  21. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release"
  22. )
  23. add_executable(
  24. game
  25. dependencies/minIni/dev/minIni.h
  26. dependencies/minIni/dev/minIni.c
  27. src/packages/game/output/IZ_video.h
  28. src/packages/game/output/IZ_video.c
  29. src/packages/game/IZ_common.h
  30. src/packages/game/input/IZ_action.h
  31. src/packages/game/IZ_app.h
  32. src/packages/game/IZ_app.c
  33. src/packages/game/main.c
  34. src/packages/game/input/IZ_joystick.c
  35. src/packages/game/input/IZ_joystick.h
  36. src/packages/game/input/IZ_keyboard.c
  37. src/packages/game/input/IZ_keyboard.h
  38. src/packages/game/IZ_config.c
  39. src/packages/game/IZ_config.h
  40. src/packages/game/geometry/IZ_point2d.c src/packages/game/geometry/IZ_point2d.h src/packages/game/geometry/IZ_vector2d.c src/packages/game/geometry/IZ_vector2d.h src/packages/game/geometry/IZ_rect.c src/packages/game/geometry/IZ_rect.h src/packages/game/core/IZ_object.c src/packages/game/core/IZ_object.h src/packages/game/core/IZ_creature.c src/packages/game/core/IZ_creature.h src/packages/game/core/IZ_entity.c src/packages/game/core/IZ_entity.h src/packages/game/memory/IZ_pool.c src/packages/game/memory/IZ_pool.h src/packages/game/input/IZ_input.c src/packages/game/input/IZ_input.h src/packages/game/input/IZ_midi.c src/packages/game/input/IZ_midi.h)
  41. target_link_libraries(
  42. game
  43. SDL2main
  44. SDL2
  45. portmidi
  46. )
  47. add_executable(
  48. game-test-geometry
  49. dependencies/bdd-for-c/bdd-for-c.h
  50. src/packages/test/IZ_mock.h
  51. src/packages/test/IZ_test.h
  52. src/packages/game/geometry/IZ_point2d.h
  53. src/packages/game/geometry/IZ_point2d.c
  54. src/packages/game/geometry/IZ_rect.h
  55. src/packages/game/geometry/IZ_rect.c
  56. src/packages/game/geometry/IZ_vector2d.h
  57. src/packages/game/geometry/IZ_vector2d.c
  58. src/packages/game/geometry/geometry.test.c)
  59. add_executable(
  60. game-test-input
  61. dependencies/bdd-for-c/bdd-for-c.h
  62. src/packages/test/IZ_mock.h
  63. src/packages/test/IZ_test.h
  64. __mocks__/minIni.mock.h
  65. __mocks__/SDL_keyboard.mock.h
  66. __mocks__/SDL_events.mock.h
  67. __mocks__/SDL_joystick.mock.h
  68. src/packages/game/IZ_config.h
  69. src/packages/game/input/IZ_keyboard.h
  70. src/packages/game/input/IZ_keyboard.c
  71. src/packages/game/input/IZ_joystick.h
  72. src/packages/game/input/IZ_joystick.c
  73. src/packages/game/input/input.test.c
  74. )
  75. add_executable(
  76. game-test-output
  77. dependencies/bdd-for-c/bdd-for-c.h
  78. src/packages/test/IZ_mock.h
  79. src/packages/test/IZ_test.h
  80. __mocks__/minIni.mock.h
  81. src/packages/game/IZ_config.h
  82. src/packages/game/output/IZ_video.h
  83. src/packages/game/output/IZ_video.c
  84. src/packages/game/output/output.test.c
  85. )
  86. if (WIN32)
  87. add_custom_command(TARGET game POST_BUILD
  88. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  89. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file
  90. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  91. endif ()
  92. if (WIN32)
  93. add_custom_command(TARGET game POST_BUILD
  94. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  95. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release/portmidi.dll" # <--this is in-file
  96. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  97. endif ()