Raycaster/CMakeLists.txt

18 lines
914 B
CMake

cmake_minimum_required(VERSION 3.10)
add_subdirectory("deps/glfw")
project(Raycaster VERSION 0.1)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
FILE(GLOB Sources src/*.cpp)
FILE(GLOB Resources res/*)
add_executable(raycaster ${Sources} deps/glad/src/glad.c)
configure_file(src/RaycasterConfig.h.in RaycasterConfig.h)
add_custom_command(TARGET raycaster POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E rm -rf ${CMAKE_BINARY_DIR}/res)
add_custom_command(TARGET raycaster POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_directory ${CMAKE_SOURCE_DIR}/res/ ${CMAKE_BINARY_DIR}/res)
#FILE(COPY ${Resources} DESTINATION ${CMAKE_BINARY_DIR}/res)
target_include_directories(raycaster PUBLIC
"${PROJECT_BINARY_DIR}"
"deps/glfw/include"
"deps/glad/include"
)
target_link_libraries(raycaster glfw)