13
13
# limitations under the License.
14
14
15
15
###############################################################################
16
- # CMake build rules for FastRTPS
16
+ # CMake build rules for FastRTPS
17
17
###############################################################################
18
18
cmake_minimum_required (VERSION 2.8.12)
19
19
@@ -99,7 +99,19 @@ if(MSVC OR MSVC_IDE)
99
99
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4" )
100
100
endif ()
101
101
else ()
102
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unknown-pragmas" )
102
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wno-unknown-pragmas -std=c++11" )
103
+ endif ()
104
+
105
+ add_definitions (
106
+ -DBOOST_ASIO_STANDALONE
107
+ -DASIO_STANDALONE
108
+ )
109
+
110
+ if (ANDROID)
111
+ add_definitions (
112
+ -DASIO_DISABLE_MOVE
113
+ -DASIO_DISABLE_STD_STRING_VIEW
114
+ )
103
115
endif ()
104
116
105
117
###############################################################################
@@ -165,6 +177,7 @@ if(EPROSIMA_BUILD AND NOT EPROSIMA_INSTALLER_MINION)
165
177
set (INTERNAL_DEBUG ON )
166
178
endif ()
167
179
180
+
168
181
###############################################################################
169
182
# Performance tests
170
183
###############################################################################
@@ -175,18 +188,18 @@ option(PERFORMANCE_TESTS "Activate the building and execution of performance tes
175
188
###############################################################################
176
189
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} /cmake/modules)
177
190
191
+
178
192
###############################################################################
179
- # Check libraries
193
+ # Default shared libraries
180
194
###############################################################################
181
- include (${PROJECT_SOURCE_DIR} /cmake/dev/boost_libraries.cmake)
182
- set (BOOST_LIBRARIES_DEFAULT thread system date_time chrono regex atomic)
183
- if (PERFORMANCE_TESTS)
184
- set (BOOST_LIBRARIES_DEFAULT ${BOOST_LIBRARIES_DEFAULT} program_options)
185
- endif ()
186
- check_boost(${BOOST_LIBRARIES_DEFAULT} )
195
+ option (BUILD_SHARED_LIBS
196
+ "Global flag to cause add_library() to create shared libraries if on. \
197
+ If set to true, this will cause all libraries to be built shared \
198
+ unless the library was explicitly added as a static library."
199
+ ON )
187
200
188
201
###############################################################################
189
- # Load external eProsima projects.
202
+ # Load external projects.
190
203
###############################################################################
191
204
option (THIRDPARTY "Activate the use of internal thirdparties" OFF )
192
205
@@ -197,6 +210,9 @@ endif()
197
210
include (${PROJECT_SOURCE_DIR} /cmake/dev/eprosima_libraries.cmake)
198
211
199
212
find_eprosima_package(fastcdr)
213
+ find_eprosima_thirdparty(asio)
214
+ find_eprosima_thirdparty(tinyxml2)
215
+ find_eprosima_thirdparty(android-ifaddrs)
200
216
201
217
###############################################################################
202
218
# Java application
@@ -224,14 +240,14 @@ add_subdirectory(src/cpp)
224
240
###############################################################################
225
241
# Testing
226
242
###############################################################################
227
- if (NOT EPROSIMA_INSTALLER AND NOT EPROSIMA_INSTALLER_MINION)
243
+ if (EPROSIMA_BUILD_TESTS AND NOT EPROSIMA_INSTALLER AND NOT EPROSIMA_INSTALLER_MINION)
228
244
enable_testing ()
229
245
include (CTest)
230
246
add_subdirectory (test )
231
247
endif ()
232
248
233
249
###############################################################################
234
- # Examples
250
+ # Examples
235
251
###############################################################################
236
252
option (COMPILE_EXAMPLES "Build example" OFF )
237
253
if (COMPILE_EXAMPLES)
@@ -314,7 +330,7 @@ if(BUILD_DOCUMENTATION)
314
330
endif ()
315
331
316
332
add_custom_target (libreoffice
317
- COMMAND "${LIBREOFFICE_EXE} " --headless ${LIBREOFFICE_CONVERT_README_MACRO}
333
+ COMMAND "${LIBREOFFICE_EXE} " --headless ${LIBREOFFICE_CONVERT_README_MACRO}
318
334
COMMAND ${CMAKE_COMMAND} -E rename "${PROJECT_SOURCE_DIR} /doc/README.html" "${README_LOCATION} /README.html"
319
335
DEPENDS
320
336
"${PROJECT_SOURCE_DIR} /doc/README.odt"
@@ -345,7 +361,6 @@ endif()
345
361
###############################################################################
346
362
# Install external eprosima libraries
347
363
install_eprosima_libraries()
348
- install_boost(ALL thread system date_time chrono regex atomic)
349
364
350
365
# Install licenses
351
366
install (FILES ${PROJECT_SOURCE_DIR} /LICENSE
0 commit comments