Re-implementation of Izanami game engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.4 KiB

  1. cmake_minimum_required(VERSION 3.20)
  2. project(izanami C)
  3. set(CMAKE_C_STANDARD 11)
  4. set(SDL2PATH "E:\\Projects\\Games\\izanami\\dependencies\\SDL2-2.0.16\\x86_64-w64-mingw32")
  5. find_package(SDL2 REQUIRED)
  6. include_directories(${SDL2_INCLUDE_DIR})
  7. 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)
  8. target_link_libraries(izanami ${SDL2_LIBRARY})
  9. if (WIN32)
  10. add_custom_command(TARGET izanami POST_BUILD
  11. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  12. "${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32/bin/SDL2.dll" # <--this is in-file
  13. $<TARGET_FILE_DIR:izanami>) # <--this is out-file path
  14. endif (WIN32)
  15. if (WIN64)
  16. add_custom_command(TARGET izanami POST_BUILD
  17. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  18. "${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32/bin/SDL2.dll" # <--this is in-file
  19. $<TARGET_FILE_DIR:izanami>) # <--this is out-file path
  20. endif (WIN64)