2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

CMakeLists.txt 8.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. cmake_minimum_required(VERSION 3.21)
  2. # Set your project name here
  3. project(izanagi C)
  4. set(CMAKE_C_STANDARD 11)
  5. if (WIN32)
  6. if (CMAKE_SIZEOF_VOID_P EQUAL 8)
  7. set(PROJECT_ARCH x64)
  8. else ()
  9. set(PROJECT_ARCH x86)
  10. endif ()
  11. endif ()
  12. include_directories(
  13. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/include"
  14. "${PROJECT_SOURCE_DIR}/dependencies/minIni/dev"
  15. "${PROJECT_SOURCE_DIR}/dependencies/bdd-for-c"
  16. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/pm_common"
  17. "${PROJECT_SOURCE_DIR}/dependencies/spine-runtimes/spine-c/spine-c/include"
  18. "${PROJECT_SOURCE_DIR}/dependencies/getopt-for-windows"
  19. "${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/include"
  20. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/include"
  21. )
  22. link_directories(
  23. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}"
  24. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release"
  25. "${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/lib/Release"
  26. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/lib"
  27. )
  28. add_executable(
  29. game
  30. dependencies/minIni/dev/minIni.h
  31. dependencies/minIni/dev/minIni.c
  32. dependencies/getopt-for-windows/getopt.h
  33. dependencies/getopt-for-windows/getopt.c
  34. src/packages/game/output/IZ_video.h
  35. src/packages/game/output/IZ_video.c
  36. src/packages/game/IZ_common.h
  37. src/packages/game/input/IZ_action.h
  38. src/packages/game/IZ_app.h
  39. src/packages/game/IZ_app.c
  40. src/packages/game/main.c
  41. src/packages/game/input/IZ_joystick.c
  42. src/packages/game/input/IZ_joystick.h
  43. src/packages/game/input/IZ_keyboard.c
  44. src/packages/game/input/IZ_keyboard.h
  45. src/packages/game/IZ_config.c
  46. src/packages/game/IZ_config.h
  47. src/packages/game/geometry/IZ_point2d.c
  48. src/packages/game/geometry/IZ_point2d.h
  49. src/packages/game/geometry/IZ_vector2d.c
  50. src/packages/game/geometry/IZ_vector2d.h
  51. src/packages/game/geometry/IZ_rect.c
  52. src/packages/game/geometry/IZ_rect.h
  53. src/packages/game/core/IZ_object.c
  54. src/packages/game/core/IZ_object.h
  55. src/packages/game/core/IZ_creature.c
  56. src/packages/game/core/IZ_creature.h
  57. src/packages/game/core/IZ_entity.c
  58. src/packages/game/core/IZ_entity.h
  59. src/packages/game/memory/IZ_pool.c
  60. src/packages/game/memory/IZ_pool.h
  61. src/packages/game/input/IZ_input.c
  62. src/packages/game/input/IZ_input.h
  63. src/packages/game/input/IZ_midi.c
  64. src/packages/game/input/IZ_midi.h
  65. src/packages/game/data/IZ_list.c
  66. src/packages/game/data/IZ_list.h
  67. src/packages/game/network/IZ_wsclient.c
  68. src/packages/game/network/IZ_wsclient.h
  69. src/packages/game/log/IZ_log.c
  70. src/packages/game/log/IZ_log.h
  71. src/packages/game/util/IZ_midi.c
  72. src/packages/game/util/IZ_midi.h
  73. src/packages/game/network/IZ_websocket.h
  74. src/packages/game/network/IZ_websocket.c
  75. )
  76. target_link_libraries(
  77. game
  78. SDL2main
  79. SDL2
  80. portmidi
  81. libcrypto
  82. libssl
  83. websockets
  84. )
  85. add_executable(
  86. game-test-geometry
  87. dependencies/bdd-for-c/bdd-for-c.h
  88. src/packages/test/IZ_mock.h
  89. src/packages/test/IZ_test.h
  90. src/packages/game/geometry/IZ_point2d.h
  91. src/packages/game/geometry/IZ_point2d.c
  92. src/packages/game/geometry/IZ_rect.h
  93. src/packages/game/geometry/IZ_rect.c
  94. src/packages/game/geometry/IZ_vector2d.h
  95. src/packages/game/geometry/IZ_vector2d.c
  96. src/packages/game/geometry/geometry.test.c
  97. )
  98. add_executable(
  99. game-test-input
  100. dependencies/bdd-for-c/bdd-for-c.h
  101. src/packages/test/IZ_mock.h
  102. src/packages/test/IZ_test.h
  103. __mocks__/minIni.mock.h
  104. __mocks__/SDL_keyboard.mock.h
  105. __mocks__/SDL_events.mock.h
  106. __mocks__/SDL_joystick.mock.h
  107. __mocks__/SDL_stdinc.mock.h
  108. __mocks__/portmidi.mock.h
  109. src/packages/game/IZ_config.h
  110. src/packages/game/input/IZ_keyboard.h
  111. src/packages/game/input/IZ_keyboard.c
  112. src/packages/game/input/IZ_joystick.h
  113. src/packages/game/input/IZ_joystick.c
  114. src/packages/game/input/IZ_midi.h
  115. src/packages/game/input/IZ_midi.c
  116. src/packages/game/util/IZ_midi.c
  117. src/packages/game/util/IZ_midi.h
  118. src/packages/game/input/input.test.c
  119. )
  120. add_executable(
  121. game-test-output
  122. dependencies/bdd-for-c/bdd-for-c.h
  123. src/packages/test/IZ_mock.h
  124. src/packages/test/IZ_test.h
  125. __mocks__/minIni.mock.h
  126. __mocks__/SDL_stdinc.mock.h
  127. __mocks__/SDL_render.mock.h
  128. src/packages/game/IZ_config.h
  129. src/packages/game/output/IZ_video.h
  130. src/packages/game/output/IZ_video.c
  131. src/packages/game/output/output.test.c
  132. )
  133. add_executable(
  134. game-test-memory
  135. dependencies/bdd-for-c/bdd-for-c.h
  136. src/packages/test/IZ_mock.h
  137. src/packages/test/IZ_test.h
  138. src/packages/game/memory/IZ_pool.h
  139. src/packages/game/memory/IZ_pool.c
  140. src/packages/game/memory/memory.test.c
  141. src/packages/game/data/IZ_list.c
  142. src/packages/game/data/IZ_list.h
  143. )
  144. add_executable(
  145. game-test-data
  146. dependencies/bdd-for-c/bdd-for-c.h
  147. src/packages/test/IZ_mock.h
  148. src/packages/test/IZ_test.h
  149. src/packages/game/data/IZ_list.h
  150. src/packages/game/data/IZ_list.c
  151. src/packages/game/data/data.test.c
  152. )
  153. add_executable(
  154. server
  155. dependencies/minIni/dev/minIni.h
  156. dependencies/minIni/dev/minIni.c
  157. src/packages/server/IZ_common.h
  158. src/packages/server/log/IZ_log.h
  159. src/packages/server/log/IZ_log.c
  160. src/packages/server/main.c
  161. src/packages/server/IZ_app.c
  162. src/packages/server/IZ_app.h
  163. src/packages/server/network/IZ_wsserver.c
  164. src/packages/server/network/IZ_wsserver.h
  165. src/packages/server/network/IZ_websocket.h
  166. src/packages/server/network/IZ_websocket.c
  167. )
  168. target_link_libraries(
  169. server
  170. SDL2main
  171. SDL2
  172. libcrypto
  173. libssl
  174. websockets
  175. )
  176. if (WIN32)
  177. add_custom_command(TARGET game POST_BUILD
  178. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  179. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file
  180. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  181. add_custom_command(TARGET game POST_BUILD
  182. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  183. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release/portmidi.dll" # <--this is in-file
  184. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  185. add_custom_command(TARGET game POST_BUILD
  186. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  187. "${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/bin/Release/websockets.dll" # <--this is in-file
  188. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  189. add_custom_command(TARGET game POST_BUILD
  190. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  191. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libssl-1_1-x64.dll" # <--this is in-file
  192. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  193. add_custom_command(TARGET game POST_BUILD
  194. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  195. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libcrypto-1_1-x64.dll" # <--this is in-file
  196. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  197. add_custom_command(TARGET server POST_BUILD
  198. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  199. "${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/bin/Release/websockets.dll" # <--this is in-file
  200. $<TARGET_FILE_DIR:server>) # <--this is out-file path
  201. add_custom_command(TARGET server POST_BUILD
  202. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  203. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libssl-1_1-x64.dll" # <--this is in-file
  204. $<TARGET_FILE_DIR:server>) # <--this is out-file path
  205. add_custom_command(TARGET server POST_BUILD
  206. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  207. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libcrypto-1_1-x64.dll" # <--this is in-file
  208. $<TARGET_FILE_DIR:server>) # <--this is out-file path
  209. endif ()