|
@@ -5,6 +5,14 @@ project(izanagi C) |
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 11) |
|
|
set(CMAKE_C_STANDARD 11) |
|
|
|
|
|
|
|
|
|
|
|
if (WIN32) |
|
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8) |
|
|
|
|
|
set(PROJECT_ARCH x64) |
|
|
|
|
|
else () |
|
|
|
|
|
set(PROJECT_ARCH x86) |
|
|
|
|
|
endif () |
|
|
|
|
|
endif () |
|
|
|
|
|
|
|
|
include_directories( |
|
|
include_directories( |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2/include" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2/include" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/minIni/dev" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/minIni/dev" |
|
@@ -12,31 +20,27 @@ include_directories( |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/pm_common" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/pm_common" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/spine-runtimes/spine-c/spine-c/include" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/spine-runtimes/spine-c/spine-c/include" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/getopt-for-windows" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/getopt-for-windows" |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/include" |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/include" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
if (WIN32) |
|
|
|
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8) |
|
|
|
|
|
set(PROJECT_ARCH x64) |
|
|
|
|
|
else () |
|
|
|
|
|
set(PROJECT_ARCH x86) |
|
|
|
|
|
endif () |
|
|
|
|
|
endif () |
|
|
|
|
|
|
|
|
|
|
|
link_directories( |
|
|
link_directories( |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release" |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release" |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/lib/Release" |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/lib" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
add_executable( |
|
|
add_executable( |
|
|
game |
|
|
game |
|
|
dependencies/minIni/dev/minIni.h |
|
|
dependencies/minIni/dev/minIni.h |
|
|
dependencies/minIni/dev/minIni.c |
|
|
dependencies/minIni/dev/minIni.c |
|
|
dependencies/getopt-for-windows/getopt.h |
|
|
|
|
|
dependencies/getopt-for-windows/getopt.c |
|
|
|
|
|
|
|
|
dependencies/getopt-for-windows/getopt.h |
|
|
|
|
|
dependencies/getopt-for-windows/getopt.c |
|
|
src/packages/game/output/IZ_video.h |
|
|
src/packages/game/output/IZ_video.h |
|
|
src/packages/game/output/IZ_video.c |
|
|
src/packages/game/output/IZ_video.c |
|
|
src/packages/game/IZ_common.h |
|
|
src/packages/game/IZ_common.h |
|
|
src/packages/game/input/IZ_action.h |
|
|
|
|
|
|
|
|
src/packages/game/input/IZ_action.h |
|
|
src/packages/game/IZ_app.h |
|
|
src/packages/game/IZ_app.h |
|
|
src/packages/game/IZ_app.c |
|
|
src/packages/game/IZ_app.c |
|
|
src/packages/game/main.c |
|
|
src/packages/game/main.c |
|
@@ -46,7 +50,27 @@ add_executable( |
|
|
src/packages/game/input/IZ_keyboard.h |
|
|
src/packages/game/input/IZ_keyboard.h |
|
|
src/packages/game/IZ_config.c |
|
|
src/packages/game/IZ_config.c |
|
|
src/packages/game/IZ_config.h |
|
|
src/packages/game/IZ_config.h |
|
|
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) |
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
target_link_libraries( |
|
|
target_link_libraries( |
|
|
game |
|
|
game |
|
@@ -67,7 +91,8 @@ add_executable( |
|
|
src/packages/game/geometry/IZ_rect.c |
|
|
src/packages/game/geometry/IZ_rect.c |
|
|
src/packages/game/geometry/IZ_vector2d.h |
|
|
src/packages/game/geometry/IZ_vector2d.h |
|
|
src/packages/game/geometry/IZ_vector2d.c |
|
|
src/packages/game/geometry/IZ_vector2d.c |
|
|
src/packages/game/geometry/geometry.test.c) |
|
|
|
|
|
|
|
|
src/packages/game/geometry/geometry.test.c |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
add_executable( |
|
|
add_executable( |
|
|
game-test-input |
|
|
game-test-input |
|
@@ -96,7 +121,6 @@ add_executable( |
|
|
src/packages/game/input/input.test.c |
|
|
src/packages/game/input/input.test.c |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_executable( |
|
|
add_executable( |
|
|
game-test-output |
|
|
game-test-output |
|
|
dependencies/bdd-for-c/bdd-for-c.h |
|
|
dependencies/bdd-for-c/bdd-for-c.h |
|
@@ -122,7 +146,10 @@ add_executable( |
|
|
|
|
|
|
|
|
src/packages/game/memory/IZ_pool.h |
|
|
src/packages/game/memory/IZ_pool.h |
|
|
src/packages/game/memory/IZ_pool.c |
|
|
src/packages/game/memory/IZ_pool.c |
|
|
src/packages/game/memory/memory.test.c src/packages/game/data/IZ_list.c src/packages/game/data/IZ_list.h) |
|
|
|
|
|
|
|
|
src/packages/game/memory/memory.test.c |
|
|
|
|
|
src/packages/game/data/IZ_list.c |
|
|
|
|
|
src/packages/game/data/IZ_list.h |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
add_executable( |
|
|
add_executable( |
|
|
game-test-data |
|
|
game-test-data |
|
@@ -130,20 +157,49 @@ add_executable( |
|
|
src/packages/test/IZ_mock.h |
|
|
src/packages/test/IZ_mock.h |
|
|
src/packages/test/IZ_test.h |
|
|
src/packages/test/IZ_test.h |
|
|
|
|
|
|
|
|
src/packages/game/data/IZ_list.h |
|
|
|
|
|
src/packages/game/data/IZ_list.c |
|
|
|
|
|
src/packages/game/data/data.test.c) |
|
|
|
|
|
|
|
|
src/packages/game/data/IZ_list.h |
|
|
|
|
|
src/packages/game/data/IZ_list.c |
|
|
|
|
|
src/packages/game/data/data.test.c |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
add_executable( |
|
|
|
|
|
server |
|
|
|
|
|
dependencies/minIni/dev/minIni.h |
|
|
|
|
|
dependencies/minIni/dev/minIni.c |
|
|
|
|
|
src/packages/server/IZ_common.h |
|
|
|
|
|
src/packages/server/main.c |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
target_link_libraries( |
|
|
|
|
|
server |
|
|
|
|
|
libcrypto |
|
|
|
|
|
libssl |
|
|
|
|
|
websockets |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
if (WIN32) |
|
|
if (WIN32) |
|
|
add_custom_command(TARGET game POST_BUILD |
|
|
add_custom_command(TARGET game POST_BUILD |
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file |
|
|
$<TARGET_FILE_DIR:game>) # <--this is out-file path |
|
|
$<TARGET_FILE_DIR:game>) # <--this is out-file path |
|
|
endif () |
|
|
|
|
|
|
|
|
|
|
|
if (WIN32) |
|
|
|
|
|
add_custom_command(TARGET game POST_BUILD |
|
|
add_custom_command(TARGET game POST_BUILD |
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release/portmidi.dll" # <--this is in-file |
|
|
"${PROJECT_SOURCE_DIR}/dependencies/portmidi/Release/portmidi.dll" # <--this is in-file |
|
|
$<TARGET_FILE_DIR:game>) # <--this is out-file path |
|
|
$<TARGET_FILE_DIR:game>) # <--this is out-file path |
|
|
|
|
|
|
|
|
|
|
|
add_custom_command(TARGET server POST_BUILD |
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/libwebsockets/build/bin/Release/websockets.dll" # <--this is in-file |
|
|
|
|
|
$<TARGET_FILE_DIR:server>) # <--this is out-file path |
|
|
|
|
|
|
|
|
|
|
|
add_custom_command(TARGET server POST_BUILD |
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libssl-1_1-x64.dll" # <--this is in-file |
|
|
|
|
|
$<TARGET_FILE_DIR:server>) # <--this is out-file path |
|
|
|
|
|
|
|
|
|
|
|
add_custom_command(TARGET server POST_BUILD |
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/openssl/${PROJECT_ARCH}/bin/libcrypto-1_1-x64.dll" # <--this is in-file |
|
|
|
|
|
$<TARGET_FILE_DIR:server>) # <--this is out-file path |
|
|
endif () |
|
|
endif () |