-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
49 lines (37 loc) · 1.22 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
cmake_minimum_required(VERSION 3.16.2)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Specifies the build type on single-configuration generators.")
endif()
if(DEFINED PROJECT_NAME)
set(SUBPROJECT ON)
set(INSTALL_SUBPROJECTS ON CACHE BOOL "Install subproject dependencies")
else()
set(SUBPROJECT OFF)
set(INSTALL_SUBPROJECTS ON CACHE BOOL "Install subproject dependencies" FORCE)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
file(STRINGS VERSION CGMF_VER)
set(cgmf_version ${CGMF_VER} CACHE STRING "CGMF Library Version")
project(cgmf VERSION ${CGMF_VER} LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 14)
include(CMakeDependentOption)
include(GNUInstallDirs)
CMAKE_DEPENDENT_OPTION(cgmf.installation
"Install CGMF (default is ON)" ON
"NOT SUBPROJECT" ${INSTALL_SUBPROJECTS}
)
mark_as_advanced(cgmf.installation)
add_subdirectory(libcgmf)
option(cgmf.tests "Configure tests for CGMF" ON)
if(cgmf.tests)
enable_testing()
endif()
if(NOT SUBPROJECT)
add_subdirectory(utils)
endif()
if(cgmf.installation)
install(DIRECTORY data/
DESTINATION "${CMAKE_INSTALL_DATADIR}/data/cgmf-${CGMF_VER}"
FILES_MATCHING PATTERN "*.dat*"
)
endif()