2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

247 linhas
8.2 KiB

  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/IZ_config.c
  164. src/packages/server/IZ_config.h
  165. src/packages/server/network/IZ_wsserver.c
  166. src/packages/server/network/IZ_wsserver.h
  167. src/packages/server/network/IZ_websocket.h
  168. src/packages/server/network/IZ_websocket.c
  169. )
  170. target_link_libraries(
  171. server
  172. SDL2main
  173. SDL2
  174. libcrypto
  175. libssl
  176. websockets
  177. )
  178. if (WIN32)
  179. add_custom_command(TARGET game POST_BUILD
  180. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  181. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file
  182. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  183. add_custom_command(TARGET game POST_BUILD
  184. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  185. "${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release/portmidi.dll" # <--this is in-file
  186. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  187. add_custom_command(TARGET game POST_BUILD
  188. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  189. "${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/bin/Release/websockets.dll" # <--this is in-file
  190. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  191. add_custom_command(TARGET game POST_BUILD
  192. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  193. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libssl-1_1-x64.dll" # <--this is in-file
  194. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  195. add_custom_command(TARGET game POST_BUILD
  196. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  197. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libcrypto-1_1-x64.dll" # <--this is in-file
  198. $<TARGET_FILE_DIR:game>) # <--this is out-file path
  199. add_custom_command(TARGET server POST_BUILD
  200. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  201. "${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/bin/Release/websockets.dll" # <--this is in-file
  202. $<TARGET_FILE_DIR:server>) # <--this is out-file path
  203. add_custom_command(TARGET server POST_BUILD
  204. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  205. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libssl-1_1-x64.dll" # <--this is in-file
  206. $<TARGET_FILE_DIR:server>) # <--this is out-file path
  207. add_custom_command(TARGET server POST_BUILD
  208. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  209. "${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libcrypto-1_1-x64.dll" # <--this is in-file
  210. $<TARGET_FILE_DIR:server>) # <--this is out-file path
  211. endif ()