@@ -24,6 +24,9 @@ project(fcl CXX C)
24
24
25
25
option (FCL_ENABLE_PROFILING "Enable profiling" OFF )
26
26
option (FCL_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors" OFF )
27
+ # Option for some bundle-like build system in order not to expose
28
+ # any FCL binary symbols in their public ABI
29
+ option (FCL_HIDE_ALL_SYMBOLS "Hide all binary symbols" OFF )
27
30
28
31
# set the default build type
29
32
if (NOT MSVC AND NOT CMAKE_BUILD_TYPE )
@@ -42,6 +45,7 @@ include(FCLMacros)
42
45
include (CompilerSettings)
43
46
include (FCLVersion)
44
47
include (GNUInstallDirs)
48
+ include (GenerateExportHeader)
45
49
46
50
if (MSVC OR IS_ICPC)
47
51
option (FCL_STATIC_LIBRARY "Whether the FCL library should be static rather than shared" ON )
@@ -229,13 +233,12 @@ else()
229
233
message (STATUS "FCL does not use OctoMap (as requested)" )
230
234
endif ()
231
235
232
-
233
236
# FCL's own include dir should be at the front of the include path
234
237
include_directories (BEFORE "include" )
235
238
include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR} /include" )
236
239
237
- add_subdirectory (include /fcl)
238
240
add_subdirectory (src)
241
+ add_subdirectory (include /fcl)
239
242
240
243
set (pkg_conf_file_in "${CMAKE_CURRENT_SOURCE_DIR} /fcl.pc.in" )
241
244
set (pkg_conf_file_out "${CMAKE_CURRENT_BINARY_DIR} /fcl.pc" )
@@ -261,7 +264,7 @@ add_custom_target(uninstall
261
264
"${CMAKE_COMMAND} " -P "${CMAKE_CURRENT_BINARY_DIR} /CMakeModules/cmake_uninstall.cmake" )
262
265
263
266
option (FCL_BUILD_TESTS "Build FCL tests" ON )
264
- if (FCL_BUILD_TESTS)
267
+ if (FCL_BUILD_TESTS AND NOT FCL_HIDE_ALL_SYMBOLS )
265
268
enable_testing ()
266
269
add_subdirectory (test )
267
270
endif ()
0 commit comments