-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
47 lines (39 loc) · 1.07 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.5)
project(procgen VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
file(GLOB src
"src/*.cpp"
"imgui/*.cpp"
)
add_executable(lsys ${src})
target_include_directories(lsys
PUBLIC
$<INSTALL_INTERFACE:includes>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/includes>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/imgui>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cereal>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/gsl>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/.>
)
target_compile_features(lsys PRIVATE cxx_std_17)
target_compile_definitions(
lsys
PRIVATE
GSL_THROW_ON_CONTRACT_VIOLATION
$<$<CONFIG:Debug>: DEBUG_CHECKS>
)
find_package(OpenGL REQUIRED)
#set(SFML_STATIC_LIBRARIES TRUE)
find_package(SFML 2.5 REQUIRED COMPONENTS system window graphics)
target_link_libraries(lsys
PUBLIC
${OPENGL_LIBRARIES}
sfml-system sfml-window sfml-graphics
$<$<PLATFORM_ID:Linux>:stdc++fs>
)
install(
TARGETS lsys
RUNTIME
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)