forked from cutelyst/cutelyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
142 lines (130 loc) · 2.84 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
set(cutelystqt_SRC
utils.cpp
upload.cpp
upload_p.h
multipartformdataparser.cpp
multipartformdataparser.h
multipartformdataparser_p.h
stats.cpp
stats_p.h
headers.cpp
request.cpp
request_p.h
response.cpp
response_p.h
context.cpp
context_p.h
action.cpp
actionchain.cpp
actionchain.h
actionchain_p.h
action_p.h
enginerequest.cpp
enginerequest.h
engine.cpp
engine_p.h
controller.cpp
controller_p.h
dispatchtype.cpp
dispatchtypechained.cpp
dispatchtypechained.h
dispatchtypechained_p.h
dispatchtypepath.cpp
dispatchtypepath.h
dispatchtypepath_p.h
dispatcher.cpp
dispatcher_p.h
component.cpp
component_p.h
view.cpp
application.cpp
application_p.h
plugin.cpp
)
set(cutelystqt_HEADERS
cutelyst_global.h
paramsmultimap.h
ParamsMultiMap
action.h
Action
application.h
Application
context.h
Context
controller.h
Controller
componentfactory.h
component.h
Component
dispatcher.h
Dispatcher
dispatchtype.h
DispatchType
engine.h
Engine
headers.h
Headers
request.h
Request
response.h
Response
stats.h
upload.h
Upload
view.h
View
plugin.h
Plugin
utils.h
)
set(cutelystqt_HEADERS_PRIVATE
common.h
)
add_library(Cutelyst2Qt5
${cutelystqt_SRC}
${cutelystqt_HEADERS}
${cutelystqt_HEADERS_PRIVATE}
)
add_library(Cutelyst${PROJECT_VERSION_MAJOR}Qt5::Core ALIAS Cutelyst2Qt5)
target_compile_features(Cutelyst2Qt5
PRIVATE
cxx_auto_type
PUBLIC
cxx_nullptr
)
if (CMAKE_GENERATOR MATCHES "Visual Studio")
set_property(TARGET Cutelyst2Qt5 PROPERTY DEBUG_POSTFIX "d")
endif()
target_compile_definitions(Cutelyst2Qt5
PRIVATE
PLUGINS_PREFER_DEBUG_POSTFIX=$<CONFIG:Debug>
)
target_include_directories(Cutelyst2Qt5 PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include/cutelyst2-qt5>
)
set_target_properties(Cutelyst2Qt5 PROPERTIES
EXPORT_NAME Core
VERSION ${PROJECT_VERSION}
SOVERSION ${CUTELYST_API_LEVEL}
)
target_link_libraries(Cutelyst2Qt5
Qt5::Core
Qt5::Network
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CutelystQt5Core.pc.in
${CMAKE_CURRENT_BINARY_DIR}/Cutelyst${PROJECT_VERSION_MAJOR}Qt5Core.pc
@ONLY
)
set_property(TARGET Cutelyst2Qt5 PROPERTY PUBLIC_HEADER ${cutelystqt_HEADERS})
install(TARGETS Cutelyst2Qt5
EXPORT CutelystTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION bin COMPONENT runtime
ARCHIVE DESTINATION lib COMPONENT devel
PUBLIC_HEADER DESTINATION include/cutelyst2-qt5/Cutelyst COMPONENT devel
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Cutelyst${PROJECT_VERSION_MAJOR}Qt5Core.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
add_subdirectory(Plugins)
add_subdirectory(Actions)