forked from vittorioromeo/ecst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (37 loc) · 1.37 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
48
49
50
51
cmake_minimum_required(VERSION 3.0)
# Include SSVCmake.
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/../SSVCMake/cmake/modules/"
"${CMAKE_SOURCE_DIR}/extlibs/SSVCMake/cmake/modules/")
include(SSVCMake)
# Basic project setup.
vrm_cmake_init_project(ecst)
vrm_cmake_find_extlib(vrm_pp)
vrm_cmake_find_extlib(vrm_core)
# TODO: remove
include_directories("/home/vittorioromeo/OHWorkspace/vrm_core/include")
# Alias the include directory.
set(ECST_INC_DIR "${ECST_SOURCE_DIR}/include/")
include_directories("${ECST_INC_DIR}")
# Enable pthread support.
vrm_cmake_add_compiler_flag_pthread()
# Other compiler flags.
vrm_cmake_add_common_compiler_flags()
# Setup user options.
vrm_cmake_add_option_memcheck()
vrm_cmake_add_option_no_exceptions()
vrm_cmake_add_option_werror()
# The `check` target runs all tests and examples.
vrm_check_target()
# Setup subdirectories.
add_subdirectory(test)
add_subdirectory(example)
# Create header-only install target (automatically glob)
vrm_cmake_header_only_install_glob("${ECST_INC_DIR}" "include")
# TODO: remove
# vrm_cmake_add_common_compiler_flags_suggest_attribute()
# TODO: remove
add_executable(particles "${ECST_SOURCE_DIR}/example/particles.cpp")
target_link_libraries(particles pthread)
add_executable(pres_code "${ECST_SOURCE_DIR}/example/pres_code.cpp")
target_link_libraries(pres_code pthread sfml-system sfml-graphics sfml-window)