5
5
# http://www.boost.org/LICENSE_1_0.txt)
6
6
7
7
cmake_minimum_required (VERSION 3.13.0 )
8
- project (async_mqtt_iface VERSION 9.1 .0 )
8
+ project (async_mqtt_iface VERSION 10.0 .0 )
9
9
10
10
set (CMAKE_CXX_STANDARD 17 )
11
11
set (CMAKE_CXX_STANDARD_REQUIRED ON )
@@ -20,6 +20,7 @@ option(ASYNC_MQTT_BUILD_TOOLS "Enable building tools (broker, bench, etc.." OFF)
20
20
option (ASYNC_MQTT_BUILD_EXAMPLES "Enable building example applications" OFF )
21
21
option (ASYNC_MQTT_BUILD_EXAMPLES_SEPARATE "Enable building separate library build example applications(It requires much memory)" OFF )
22
22
option (ASYNC_MQTT_BUILD_LIB "Enable building separate compilation library" OFF )
23
+ option (ASYNC_MQTT_MRDOCS "For Mr.Docs document generation" OFF )
23
24
24
25
# Not implemented yet
25
26
option (ASYNC_MQTT_USE_STR_CHECK "Enable UTF8 String check" OFF )
@@ -100,6 +101,26 @@ endif()
100
101
set (CMAKE_VERIFY_INTERFACE_HEADER_SETS ON )
101
102
add_subdirectory (include )
102
103
104
+ if (ASYNC_MQTT_BUILD_MRDOCS )
105
+ message (STATUS "MrDocs generation" )
106
+ set (CMAKE_SYSROOT /usr )
107
+ file (
108
+ WRITE
109
+ "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp"
110
+ "#include <async_mqtt/all.hpp>\n "
111
+ "#include <async_mqtt/asio_bind/predefined_layer/mqtts.hpp>\n "
112
+ "#include <async_mqtt/asio_bind/predefined_layer/ws.hpp>\n "
113
+ "#include <async_mqtt/asio_bind/predefined_layer/wss.hpp>\n "
114
+ )
115
+ add_library (async_mqtt_mrdocs "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" )
116
+
117
+ target_compile_features (async_mqtt_mrdocs PUBLIC cxx_constexpr )
118
+ target_compile_definitions (async_mqtt_mrdocs PUBLIC ASYNC_MQTT_MRDOCS ASYNC_MQTT_USE_LOG )
119
+ set_target_properties (async_mqtt_mrdocs PROPERTIES NO_SYSTEM_FROM_IMPORTED OFF )
120
+ target_include_directories (async_mqtt_mrdocs PUBLIC include ${Boost_INCLUDE_DIRS} )
121
+ return ()
122
+ endif ()
123
+
103
124
if (ASYNC_MQTT_BUILD_EXAMPLES )
104
125
message (STATUS "Examples enabled" )
105
126
add_subdirectory (example )
@@ -149,44 +170,4 @@ foreach(HDR ${ALL_HDR})
149
170
add_dependencies ("check_deps" ${TARGET} )
150
171
endforeach ()
151
172
152
- # Doxygen
153
- find_package (Doxygen )
154
- if (DOXYGEN_FOUND )
155
- list (APPEND Doxyfile_CONTENT
156
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR} /Doxyfile ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
157
- COMMAND ${CMAKE_COMMAND} -E echo "FILE_PATTERNS = *.hpp" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
158
- COMMAND ${CMAKE_COMMAND} -E echo "OUTPUT_DIRECTORY = doc" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
159
- COMMAND ${CMAKE_COMMAND} -E echo "PROJECT_NAME = async_mqtt" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
160
- COMMAND ${CMAKE_COMMAND} -E echo "PROJECT_NUMBER = 9.1.0" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
161
- COMMAND ${CMAKE_COMMAND} -E echo "RECURSIVE = YES" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
162
- COMMAND ${CMAKE_COMMAND} -E echo "PREDEFINED = GENERATING_DOCUMENTATION ASYNC_MQTT_USE_TLS ASYNC_MQTT_USE_WS ASYNC_MQTT_USE_LOG" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
163
- COMMAND ${CMAKE_COMMAND} -E echo "INPUT = ${CMAKE_CURRENT_SOURCE_DIR} /include/async_mqtt" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
164
- COMMAND ${CMAKE_COMMAND} -E echo "EXCLUDE_PATTERNS = */impl/*" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
165
- COMMAND ${CMAKE_COMMAND} -E echo "EXCLUDE_PATTERNS += */detail/*" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
166
- COMMAND ${CMAKE_COMMAND} -E echo "GENERATE_LATEX = NO" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
167
- COMMAND ${CMAKE_COMMAND} -E echo "HIDE_UNDOC_MEMBERS = YES" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
168
- COMMAND ${CMAKE_COMMAND} -E echo "HIDE_UNDOC_CLASSES = YES" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
169
- COMMAND ${CMAKE_COMMAND} -E echo "CLASS_GRAPH = YES" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
170
- COMMAND ${CMAKE_COMMAND} -E echo "INCLUDE_GRAPH = NO" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
171
- COMMAND ${CMAKE_COMMAND} -E echo "INCLUDED_BY_GRAPH = NO" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
172
- COMMAND ${CMAKE_COMMAND} -E echo "GENERATE_TREEVIEW = YES " >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
173
- COMMAND ${CMAKE_COMMAND} -E echo "DISABLE_INDEX = NO" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
174
- COMMAND ${CMAKE_COMMAND} -E echo "FULL_SIDEBAR = NO" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
175
- COMMAND ${CMAKE_COMMAND} -E echo "HTML_EXTRA_STYLESHEET = ${CMAKE_CURRENT_SOURCE_DIR} /css/doxygen-awesome.css " >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
176
- COMMAND ${CMAKE_COMMAND} -E echo "HTML_COLORSTYLE = LIGHT " >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
177
- )
178
- if (DOXYGEN_DOT_FOUND )
179
- list (APPEND Doxyfile_CONTENT
180
- COMMAND ${CMAKE_COMMAND} -E echo "HAVE_DOT = YES" >> ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
181
- )
182
- endif ()
183
- add_custom_target (
184
- doxygen
185
- ${Doxyfile_CONTENT}
186
- COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
187
- VERBATIM
188
- )
189
- add_compile_definitions (GENERATING_DOCUMENTATION )
190
- endif ()
191
-
192
173
include (cmake/createcmakeconfig.cmake )
0 commit comments