-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
70 lines (44 loc) · 1.33 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
59
60
61
62
63
64
65
66
67
68
69
70
# Minimum cmake verison 3.1 required for the variable CMAKE_CXX_STANDARD
cmake_minimum_required (VERSION 3.1)
#########
# setup #
#########
cmake_policy( SET CMP0048 NEW ) # version in project()
project( Midge VERSION 3.9.4 )
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/scarab/cmake )
include( PackageBuilder )
list( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
include( MidgeUtility )
#################
# midge options #
#################
# require C++17
set_to_max( CMAKE_CXX_STANDARD 17 )
option( Midge_ENABLE_STREAM_TIMING "Enable stream timing" FALSE )
#option( MIDGE_ENABLE_DEBUG_MESSAGES "enable debug messages" FALSE )
midge_process_options()
######################
# midge dependencies #
######################
#####################
# Prepare for build #
#####################
pbuilder_prepare_project()
########
# Scarab
########
pbuilder_add_submodule( Scarab scarab )
# all parts of midge use Scarab, so include it here
pbuilder_use_sm_library( Scarab Scarab )
###############
# Build Midge #
###############
add_subdirectory( library )
if( Midge_ENABLE_TESTING )
add_subdirectory( test )
endif( Midge_ENABLE_TESTING )
##########
# Config #
##########
configure_file( ${PROJECT_SOURCE_DIR}/MidgeConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/MidgeConfig.cmake @ONLY )
pbuilder_do_package_config()