cmake_minimum_required(VERSION 3.17) set(PROJECT "sim-game") project(${PROJECT}) set(${PROJECT} LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/bin/") set(CMAKE_EXPORT_COMPILE_COMMANDS) find_package(SDL2) find_package(SDL2_image) find_package(SDL2_ttf) file(GLOB_RECURSE SOURCE_C "${CMAKE_SOURCE_DIR}/src/**.c") file(GLOB_RECURSE SOURCE_CPP "${CMAKE_SOURCE_DIR}/src/**.c*") add_executable(${PROJECT} ${SOURCE_C} ${SOURCE_CPP}) target_link_libraries(${PROJECT} SDL2 SDL2_image SDL2_ttf) target_include_directories(${PROJECT} PRIVATE "${CMAKE_SOURCE_DIR}/include/" "${CMAKE_SOURCE_DIR}/src/sge/")