|
@@ -3,23 +3,24 @@ project(izanami C) |
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 11) |
|
|
set(CMAKE_C_STANDARD 11) |
|
|
|
|
|
|
|
|
set(SDL2PATH "E:\\Projects\\Games\\izanami\\dependencies\\SDL2-2.0.16\\x86_64-w64-mingw32") |
|
|
|
|
|
|
|
|
set(SDL2PATH "${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32") |
|
|
find_package(SDL2 REQUIRED) |
|
|
find_package(SDL2 REQUIRED) |
|
|
include_directories(${SDL2_INCLUDE_DIR}) |
|
|
include_directories(${SDL2_INCLUDE_DIR}) |
|
|
|
|
|
|
|
|
add_executable(izanami src/packages/game/main.c src/packages/game/math/IZ_vector.c src/packages/game/math/IZ_vector.h src/packages/game/math/IZ_math.c src/packages/game/math/IZ_math.h src/packages/game/core/IZ_placeable.c src/packages/game/core/IZ_placeable.h src/packages/game/core/IZ_movable.c src/packages/game/core/IZ_movable.h src/packages/game/core/IZ_spatial.c src/packages/game/core/IZ_spatial.h) |
|
|
add_executable(izanami src/packages/game/main.c src/packages/game/math/IZ_vector.c src/packages/game/math/IZ_vector.h src/packages/game/math/IZ_math.c src/packages/game/math/IZ_math.h src/packages/game/core/IZ_placeable.c src/packages/game/core/IZ_placeable.h src/packages/game/core/IZ_movable.c src/packages/game/core/IZ_movable.h src/packages/game/core/IZ_spatial.c src/packages/game/core/IZ_spatial.h) |
|
|
target_link_libraries(izanami ${SDL2_LIBRARY}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
target_link_libraries(izanami ${SDL2_LIBRARY}) |
|
|
|
|
|
|
|
|
if (WIN32) |
|
|
if (WIN32) |
|
|
add_custom_command(TARGET izanami POST_BUILD |
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32/bin/SDL2.dll" # <--this is in-file |
|
|
|
|
|
$<TARGET_FILE_DIR:izanami>) # <--this is out-file path |
|
|
|
|
|
|
|
|
add_custom_command(TARGET izanami POST_BUILD |
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32/bin/SDL2.dll" |
|
|
|
|
|
$<TARGET_FILE_DIR:izanami>) |
|
|
endif (WIN32) |
|
|
endif (WIN32) |
|
|
|
|
|
|
|
|
if (WIN64) |
|
|
if (WIN64) |
|
|
add_custom_command(TARGET izanami POST_BUILD |
|
|
add_custom_command(TARGET izanami POST_BUILD |
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..." |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32/bin/SDL2.dll" # <--this is in-file |
|
|
|
|
|
$<TARGET_FILE_DIR:izanami>) # <--this is out-file path |
|
|
|
|
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different |
|
|
|
|
|
"${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32/bin/SDL2.dll" |
|
|
|
|
|
$<TARGET_FILE_DIR:izanami>) |
|
|
endif (WIN64) |
|
|
endif (WIN64) |