Skip to content

Commit a480568

Browse files
committed
link spinnaker library private, dont import
1 parent b9ca0c0 commit a480568

File tree

4 files changed

+1
-78
lines changed

4 files changed

+1
-78
lines changed

spinnaker_camera_driver/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ target_link_libraries(camera_driver
114114
${sensor_msgs_TARGETS}
115115
${std_msgs_TARGETS}
116116
yaml-cpp
117+
PRIVATE
117118
Spinnaker::Spinnaker)
118119

119120
target_include_directories(camera_driver

spinnaker_camera_driver/cmake/spinnaker_camera_driverConfig.cmake.in

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
include(CMakeFindDependencyMacro)
22

3-
find_dependency(SPINNAKER)
43
find_dependency(rclcpp)
54
find_dependency(rclcpp_components)
65
find_dependency(camera_info_manager)

spinnaker_synchronized_camera_driver/CMakeLists.txt

-25
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,6 @@ if(NOT CMAKE_BUILD_TYPE)
3333
set(CMAKE_BUILD_TYPE RelWithDebInfo)
3434
endif()
3535

36-
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
37-
38-
# The spinnaker_camera_driver links against the spinnaker libraries,
39-
# and also exports them as a dependency. However, if the spinnaker SDK
40-
# is not installed system-wide, then the spinnaker_camera_driver actually
41-
# installs a private copy of the spinnaker SDK libraries alongside its own
42-
# libraries. The hack below works detects this scenario and works around it.
43-
44-
find_package(SPINNAKER)
45-
if(NOT SPINNAKER_FOUND)
46-
# assumes that "spinnaker_camera_driver" is installed at the same root
47-
# as "spinnaker_synchronized_camera_driver"
48-
cmake_path(GET CMAKE_INSTALL_FULL_LIBDIR PARENT_PATH SPINNAKER_ROOT_DIR)
49-
cmake_path(GET SPINNAKER_ROOT_DIR PARENT_PATH SPINNAKER_ROOT_DIR)
50-
cmake_path(APPEND SPINNAKER_ROOT_DIR "spinnaker_camera_driver")
51-
message(STATUS "searching for spinnaker here: ${SPINNAKER_ROOT_DIR}")
52-
# SPINNAKER_ROOT_DIR will be actually used when
53-
# find_package(spinnaker_camera_driver) executes a find_package(SPINNAKER).
54-
# This find_package(SPINNAKER) is actually triggered by
55-
# spinnaker_camera_driverConfig.cmake.in
56-
# But the FindSPINNAKER.cmake used for that search is actually the one
57-
# in spinnaker_synchronized_camera_driver/cmake/,
58-
# which has been stripped to not search for the include path.
59-
endif()
60-
6136
find_package(spinnaker_camera_driver REQUIRED)
6237

6338
# list of all packages that use ament for export (may work for others too)

spinnaker_synchronized_camera_driver/cmake/FindSPINNAKER.cmake

-52
This file was deleted.

0 commit comments

Comments
 (0)