-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (20 loc) · 1008 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
cmake_minimum_required(VERSION 2.8)
project(langton3D)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wextra -pedantic")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{SFML_ROOT}/cmake/Modules")
include_directories(commun ${CMAKE_CURRENT_SOURCE_DIR}/include/)
# Add all source files in the project
file(GLOB_RECURSE
SOURCE_FILES
simulation/*.cpp)
set(GLAD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/glad/src/glad.c)
find_package(glfw3 3.2 REQUIRED)
# Principal target
add_executable(langton3D ${SOURCE_FILES} ${GLAD_SOURCES} main.cpp)
target_link_libraries(langton3D glfw)
add_custom_command(TARGET langton3D PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/simulation/Rendering/Shaders $<TARGET_FILE_DIR:langton3D>/Shaders)