Skip to content

Commit 4dcef6c

Browse files
Merge pull request #1027 from BehaviorTree/fix_private_deps
Fix private deps
2 parents 22929a2 + 042875f commit 4dcef6c

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

3rdparty/lexy/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ option(LEXY_FORCE_CPP17 "Whether or not lexy should use C++17 even if compil
99

1010
add_subdirectory(src)
1111

12-
option(LEXY_ENABLE_INSTALL "whether or not to enable the install rule" ON)
12+
option(LEXY_ENABLE_INSTALL "whether or not to enable the install rule" OFF)
1313
if(LEXY_ENABLE_INSTALL)
1414
include(CMakePackageConfigHelpers)
1515
include(GNUInstallDirs)

CMakeLists.txt

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,29 @@ target_link_libraries(${BTCPP_LIBRARY}
226226
PRIVATE
227227
Threads::Threads
228228
${CMAKE_DL_LIBS}
229-
foonathan::lexy
230-
minitrace::minitrace
231-
tinyxml2::tinyxml2
232-
minicoro::minicoro
233-
flatbuffers::flatbuffers
234-
$<$<BOOL:${BTCPP_GROOT_INTERFACE}>:cppzmq>
235-
$<$<BOOL:${BTCPP_SQLITE_LOGGING}>:SQLite::SQLite3>
229+
$<BUILD_INTERFACE:foonathan::lexy>
230+
$<BUILD_INTERFACE:minitrace::minitrace>
231+
$<BUILD_INTERFACE:tinyxml2::tinyxml2>
232+
$<BUILD_INTERFACE:minicoro::minicoro>
233+
$<BUILD_INTERFACE:flatbuffers::flatbuffers>
236234
PUBLIC
237235
${BTCPP_EXTRA_LIBRARIES}
238236
)
239237

238+
if(BTCPP_GROOT_INTERFACE)
239+
target_link_libraries(${BTCPP_LIBRARY}
240+
PRIVATE
241+
$<BUILD_INTERFACE:cppzmq>
242+
)
243+
endif()
244+
245+
if(BTCPP_SQLITE_LOGGING)
246+
target_link_libraries(${BTCPP_LIBRARY}
247+
PRIVATE
248+
$<BUILD_INTERFACE:SQLite::SQLite3>
249+
)
250+
endif()
251+
240252
target_include_directories(${BTCPP_LIBRARY}
241253
PUBLIC
242254
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>

src/xml_parsing.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@
2929
#if defined(__linux) || defined(__linux__)
3030
#pragma GCC diagnostic push
3131
#pragma GCC diagnostic ignored "-Wattributes"
32+
#pragma GCC diagnostic ignored "-Wtype-limits"
33+
#endif
34+
35+
#include "tinyxml2.h"
36+
37+
#if defined(__linux) || defined(__linux__)
38+
#pragma GCC diagnostic pop
3239
#endif
3340

3441
#include <map>
3542
#include "behaviortree_cpp/xml_parsing.h"
36-
#include "tinyxml2.h"
3743
#include <filesystem>
3844

3945
#ifdef USING_ROS2

0 commit comments

Comments
 (0)