From 1aa568f15c2ecb7ff5400e8df0289f6c2209b605 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 6 Mar 2026 07:23:16 -0800 Subject: [PATCH 1/4] Fix Ceres inclusion and path export Ceres is referenced in fuse header files and the existing way it was being included in fuse_core did not export the include paths for Ceres which breaks downstream packages when they include fuse_core headers. This was only exposed through the per-package builds since the existing merged builds get lucky that all the include dirs are merged together. --- fuse_core/CMakeLists.txt | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/fuse_core/CMakeLists.txt b/fuse_core/CMakeLists.txt index 03b004dad..57bab06e7 100644 --- a/fuse_core/CMakeLists.txt +++ b/fuse_core/CMakeLists.txt @@ -12,6 +12,15 @@ find_package(catkin REQUIRED COMPONENTS ) find_package(Boost REQUIRED COMPONENTS serialization) find_package(Ceres REQUIRED) + +if(TARGET Ceres::ceres) + get_target_property(CERES_INCLUDEDIRS Ceres::ceres INTERFACE_INCLUDE_DIRECTORIES) + message(STATUS "Ceres::ceres INTERFACE include dirs: '${CERES_INCLUDEDIRS}'") +else() + message(WARNING "Ceres::ceres imported target not found; CERES_INCLUDEDIRS will be empty.") + set(CERES_INCLUDEDIRS "") +endif() + find_package(Eigen3 REQUIRED) find_package(PkgConfig REQUIRED) pkg_check_modules(libglog REQUIRED) @@ -19,6 +28,7 @@ pkg_check_modules(libglog REQUIRED) catkin_package( INCLUDE_DIRS include + ${CERES_INCLUDEDIRS} LIBRARIES ${PROJECT_NAME} CATKIN_DEPENDS @@ -73,15 +83,16 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} - ${CERES_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS} ) target_link_libraries(${PROJECT_NAME} - ${Boost_LIBRARIES} - ${catkin_LIBRARIES} - ${CERES_LIBRARIES} - ${GLOG_LIBRARIES} + PUBLIC + Ceres::ceres + ${catkin_INCLUDE_DIRS} + PRIVATE + ${Boost_LIBRARIES} + ${GLOG_LIBRARIES} ) set_target_properties(${PROJECT_NAME} PROPERTIES From a80afc8139f09a75266bb05b115d01e81f6456c9 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 6 Mar 2026 08:01:11 -0800 Subject: [PATCH 2/4] Fix typo INCLUDE_DIRS -> LIBRARIES --- fuse_core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuse_core/CMakeLists.txt b/fuse_core/CMakeLists.txt index 57bab06e7..624efb840 100644 --- a/fuse_core/CMakeLists.txt +++ b/fuse_core/CMakeLists.txt @@ -89,7 +89,7 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} PUBLIC Ceres::ceres - ${catkin_INCLUDE_DIRS} + ${catkin_LIBRARIES} PRIVATE ${Boost_LIBRARIES} ${GLOG_LIBRARIES} From d3b965a0b19f618d0c8bbc3a7631668f70b0603a Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 6 Mar 2026 09:28:43 -0800 Subject: [PATCH 3/4] Harden logic for CERES_INCLUDEDIRS In case INTERFACE_INCLUDE_DIRS isn't a valid property we can revert back to the existing behavior when no include dirs are set. --- fuse_core/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fuse_core/CMakeLists.txt b/fuse_core/CMakeLists.txt index 624efb840..ca9f74ae6 100644 --- a/fuse_core/CMakeLists.txt +++ b/fuse_core/CMakeLists.txt @@ -15,7 +15,13 @@ find_package(Ceres REQUIRED) if(TARGET Ceres::ceres) get_target_property(CERES_INCLUDEDIRS Ceres::ceres INTERFACE_INCLUDE_DIRECTORIES) - message(STATUS "Ceres::ceres INTERFACE include dirs: '${CERES_INCLUDEDIRS}'") + + if("${CERES_INCLUDEDIRS}" STREQUAL "CERES_INCLUDEDIRS-NOTFOUND") + message(STATUS "Ceres::ceres INTERFACE_INCLUDE_DIRS not found; CERES_INCLUDEDIRS will be empty") + set(CERES_INCLUDEDIRS, "") + else() + message(STATUS "Ceres::ceres INTERFACE_INCLUDE_DIRS: '${CERES_INCLUDEDIRS}'") + endif() else() message(WARNING "Ceres::ceres imported target not found; CERES_INCLUDEDIRS will be empty.") set(CERES_INCLUDEDIRS "") From 7087da2808bf3d650c57790fc1dd272be4f114b1 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 6 Mar 2026 09:31:28 -0800 Subject: [PATCH 4/4] Keep includes for target_include_directories --- fuse_core/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/fuse_core/CMakeLists.txt b/fuse_core/CMakeLists.txt index ca9f74ae6..11c59fb7b 100644 --- a/fuse_core/CMakeLists.txt +++ b/fuse_core/CMakeLists.txt @@ -89,6 +89,7 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} + ${CERES_INCLUDEDIRS} ${EIGEN3_INCLUDE_DIRS} ${GLOG_INCLUDE_DIRS} )