-
Notifications
You must be signed in to change notification settings - Fork 117
/
Copy pathCMakeLists.txt
127 lines (89 loc) · 1.5 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#
# External dependencies
#
# find_package(THIRDPARTY REQUIRED)
#
# Executable name and options
#
# Target name
set(target fibcmd)
# Exit here if required dependencies are not met
message(STATUS "Example ${target}")
#
# Sources
#
set(sources
main.cpp
)
#
# Create executable
#
# Build executable
add_executable(${target}
MACOSX_BUNDLE
${sources}
)
# Create namespaced alias
add_executable(${META_PROJECT_NAME}::${target} ALIAS ${target})
#
# Project options
#
set_target_properties(${target}
PROPERTIES
${DEFAULT_PROJECT_OPTIONS}
FOLDER "${IDE_FOLDER}"
)
#
# Include directories
#
target_include_directories(${target}
PRIVATE
${DEFAULT_INCLUDE_DIRECTORIES}
${PROJECT_BINARY_DIR}/source/include
)
#
# Libraries
#
target_link_libraries(${target}
PRIVATE
${DEFAULT_LIBRARIES}
${META_PROJECT_NAME}::baselib
${META_PROJECT_NAME}::fiblib
)
#
# Compile definitions
#
target_compile_definitions(${target}
PRIVATE
${DEFAULT_COMPILE_DEFINITIONS}
)
#
# Compile options
#
target_compile_options(${target}
PRIVATE
${DEFAULT_COMPILE_OPTIONS}
)
#
# Linker options
#
target_link_options(${target}
PRIVATE
${DEFAULT_LINKER_OPTIONS}
)
#
# Target Health
#
perform_health_checks(
${target}
${sources}
)
generate_coverage_report(${target})
#
# Deployment
#
# Executable
install(TARGETS ${target}
RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT examples
BUNDLE DESTINATION ${INSTALL_BIN} COMPONENT examples
)