-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
122 lines (88 loc) · 1.71 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
#
# External dependencies
#
# Enable automoc
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(AUTOMOC_MOC_OPTIONS PROPERTIES FOLDER CMakeAutomocTargets)
set_property(GLOBAL PROPERTY AUTOMOC_FOLDER CMakeAutomocTargets)
# ENABLE CMP0020: Automatically link Qt executables to qtmain target on Windows.
set_policy(CMP0020 NEW)
#
# Executable name and options
#
# Target name
set(target ncs)
#
# Sources
#
file(GLOB sources
"*.cpp" "*.h" "*.ui" "*.qrc")
#
# Create executable
#
# Build executable
add_library(${target}
${sources}
)
# Create namespaced alias
add_library(${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}
${CMAKE_CURRENT_BINARY_DIR}
${PROJECT_BINARY_DIR}/source/include
)
#
# Libraries
#
target_link_libraries(${target}
PRIVATE
${DEFAULT_LIBRARIES}
${dlib_LIBRARIES}
annotator::annotatorplugin
mvnc
)
#
# Compile definitions
#
target_compile_definitions(${target}
PRIVATE
${DEFAULT_COMPILE_DEFINITIONS}
)
#
# Compile options
#
target_compile_options(${target}
PRIVATE
${DEFAULT_COMPILE_OPTIONS}
)
#
# Linker options
#
target_link_libraries(${target}
PRIVATE
${DEFAULT_LINKER_OPTIONS}
)
#
# Deployment
#
# Executable
install(TARGETS ${target}
RUNTIME DESTINATION ${INSTALL_BIN}/plugins COMPONENT plugins
LIBRARY DESTINATION ${INSTALL_SHARED}/plugins COMPONENT plugins
BUNDLE DESTINATION ${INSTALL_BIN}/plugins COMPONENT plugins
)