cmake_minimum_required(VERSION 3.20) project(izanami C) set(CMAKE_C_STANDARD 11) set(SDL2PATH "${PROJECT_SOURCE_DIR}/dependencies/SDL2-2.0.16/x86_64-w64-mingw32") find_package(SDL2 REQUIRED) 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) target_link_libraries(izanami ${SDL2_LIBRARY}) if (WIN32) 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" $) endif (WIN32) if (WIN64) 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" $) endif (WIN64)