-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
58 lines (49 loc) · 1.9 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
52
53
54
55
56
57
58
cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
project(qplot
LANGUAGES CXX
VERSION 0.0.1
)
#=============================================================================
# Augment CMake with our custom scripts
#=============================================================================
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
#=============================================================================
# General configuration
#=============================================================================
include(EnsureBuildType)
include(InstallConfig)
include(OutputDirConfig)
include(PackageConfig)
include(BuildInfo)
include(DoxygenUtilities)
#=============================================================================
# compiler and library configuration
#=============================================================================
include(CompilerConfig)
include(QtLibraryConfig)
#=============================================================================
# source
#=============================================================================
add_subdirectory(src)
add_subdirectory(documentation)
#
# create and install the version file
#
write_basic_package_version_file(
${PROJECT_BINARY_DIR}/${PACKAGE_VERSION_FILE_NAME}
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion)
install(FILES ${PROJECT_BINARY_DIR}/${PACKAGE_VERSION_FILE_NAME}
DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}
COMPONENT development)
#
# create and install the package file
#
configure_file("${PACKAGE_CONFIG_FILE_NAME}.in" ${PACKAGE_CONFIG_FILE_NAME} @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/${PACKAGE_CONFIG_FILE_NAME}
DESTINATION ${CMAKE_INSTALL_PACKAGEDIR}
COMPONENT development)
#=============================================================================
# tests
#=============================================================================
add_subdirectory(test)