2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

CMakeLists.txt 4.9 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. "${PROJECT_SOURCE_DIR}/dependencies/getopt-for-windows"
  12. )
  13. if (WIN32)
  14. if (CMAKE_SIZEOF_VOID_P EQUAL 8)
  15. set(PROJECT_ARCH x64)
  16. else ()
  17. set(PROJECT_ARCH x86)
  18. endif ()
  19. endif ()
  20. link_directories(
  21. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}"
  22. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release"
  23. )
  24. add_executable(
  25. game
  26. dependencies/minIni/dev/minIni.h
  27. dependencies/minIni/dev/minIni.c
  28. dependencies/getopt-for-windows/getopt.h
  29. dependencies/getopt-for-windows/getopt.c
  30. src/packages/game/output/IZ_video.h
  31. src/packages/game/output/IZ_video.c
  32. src/packages/game/IZ_common.h
  33. src/packages/game/input/IZ_action.h
  34. src/packages/game/IZ_app.h
  35. src/packages/game/IZ_app.c
  36. src/packages/game/main.c
  37. src/packages/game/input/IZ_joystick.c
  38. src/packages/game/input/IZ_joystick.h
  39. src/packages/game/input/IZ_keyboard.c
  40. src/packages/game/input/IZ_keyboard.h
  41. src/packages/game/IZ_config.c
  42. src/packages/game/IZ_config.h
  43. 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 src/packages/game/data/IZ_list.c src/packages/game/data/IZ_list.h)
  44. target_link_libraries(
  45. game
  46. SDL2main
  47. SDL2
  48. portmidi
  49. )
  50. add_executable(
  51. game-test-geometry
  52. dependencies/bdd-for-c/bdd-for-c.h
  53. src/packages/test/IZ_mock.h
  54. src/packages/test/IZ_test.h
  55. src/packages/game/geometry/IZ_point2d.h
  56. src/packages/game/geometry/IZ_point2d.c
  57. src/packages/game/geometry/IZ_rect.h
  58. src/packages/game/geometry/IZ_rect.c
  59. src/packages/game/geometry/IZ_vector2d.h
  60. src/packages/game/geometry/IZ_vector2d.c
  61. src/packages/game/geometry/geometry.test.c)
  62. add_executable(
  63. game-test-input
  64. dependencies/bdd-for-c/bdd-for-c.h
  65. src/packages/test/IZ_mock.h
  66. src/packages/test/IZ_test.h
  67. __mocks__/minIni.mock.h
  68. __mocks__/SDL_keyboard.mock.h
  69. __mocks__/SDL_events.mock.h
  70. __mocks__/SDL_joystick.mock.h
  71. __mocks__/SDL_stdinc.mock.h
  72. __mocks__/portmidi.mock.h
  73. src/packages/game/IZ_config.h
  74. src/packages/game/input/IZ_keyboard.h
  75. src/packages/game/input/IZ_keyboard.c
  76. src/packages/game/input/IZ_joystick.h
  77. src/packages/game/input/IZ_joystick.c
  78. src/packages/game/input/IZ_midi.h
  79. src/packages/game/input/IZ_midi.c
  80. src/packages/game/input/input.test.c
  81. )
  82. add_executable(
  83. game-test-output
  84. dependencies/bdd-for-c/bdd-for-c.h
  85. src/packages/test/IZ_mock.h
  86. src/packages/test/IZ_test.h
  87. __mocks__/minIni.mock.h
  88. __mocks__/SDL_stdinc.mock.h
  89. __mocks__/SDL_render.mock.h
  90. src/packages/game/IZ_config.h
  91. src/packages/game/output/IZ_video.h
  92. src/packages/game/output/IZ_video.c
  93. src/packages/game/output/output.test.c
  94. )
  95. add_executable(
  96. game-test-memory
  97. dependencies/bdd-for-c/bdd-for-c.h
  98. src/packages/test/IZ_mock.h
  99. src/packages/test/IZ_test.h
  100. src/packages/game/memory/IZ_pool.h
  101. src/packages/game/memory/IZ_pool.c
  102. src/packages/game/memory/memory.test.c src/packages/game/data/IZ_list.c src/packages/game/data/IZ_list.h)
  103. add_executable(
  104. game-test-data
  105. dependencies/bdd-for-c/bdd-for-c.h
  106. src/packages/test/IZ_mock.h
  107. src/packages/test/IZ_test.h
  108. src/packages/game/data/IZ_list.h
  109. src/packages/game/data/IZ_list.c
  110. src/packages/game/data/data.test.c)
  111. if (WIN32)
  112. add_custom_command(TARGET game POST_BUILD
  113. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  114. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file
  115. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  116. endif ()
  117. if (WIN32)
  118. add_custom_command(TARGET game POST_BUILD
  119. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  120. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release/portmidi.dll" # <--this is in-file
  121. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  122. endif ()