2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
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.

CMakeLists.txt 943 B

1234567891011121314151617181920212223242526272829303132333435
  1. cmake_minimum_required(VERSION 3.20)
  2. # Set your project name here
  3. project(izanagi C)
  4. set(CMAKE_C_STANDARD 11)
  5. include_directories(
  6. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/include"
  7. "${PROJECT_SOURCE_DIR}/dependencies/minIni/dev"
  8. )
  9. if (WIN32)
  10. if (CMAKE_SIZEOF_VOID_P EQUAL 8)
  11. set(PROJECT_ARCH x64)
  12. else ()
  13. set(PROJECT_ARCH x86)
  14. endif ()
  15. endif ()
  16. link_directories("${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}")
  17. add_executable(
  18. izanagi
  19. dependencies/minIni/dev/minIni.h
  20. dependencies/minIni/dev/minIni.c
  21. src/packages/game/main.c
  22. )
  23. target_link_libraries(izanagi SDL2main SDL2)
  24. if (WIN32)
  25. add_custom_command(TARGET izanagi POST_BUILD
  26. COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake - E copy_if_different..."
  27. "${PROJECT_SOURCE_DIR}/dependencies/SDL2/lib/${PROJECT_ARCH}/SDL2.dll" # <--this is in-file
  28. $<TARGET_FILE_DIR:izanagi>) # <--this is out-file path
  29. endif ()