diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a9bff2d..8f895da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,4 +2,16 @@ cmake_minimum_required(VERSION 3.10) project(pathtracing) -add_executable(pathtracing main.cpp) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +FILE(GLOB sources ${CMAKE_SOURCE_DIR}/src/*.cpp) + +add_executable(pathtracing ${sources}) + +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH}) + +# Detect and add SFML +find_package(SFML 2 REQUIRED system window graphics) +include_directories(${SFML_INCLUDE_DIR}) +target_link_libraries(pathtracing ${SFML_LIBRARIES} ${SFML_DEPENDENCIES}) |