From 18960c4b88ce912e08b12182b835a7de75388b78 Mon Sep 17 00:00:00 2001 From: Julian T Date: Thu, 23 Jul 2020 23:13:55 +0200 Subject: New project structure --- CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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}) -- cgit v1.2.3