diff --git a/CMakeLists.txt b/CMakeLists.txt index 216271fd5..d848b0cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,6 +182,7 @@ foreach(slam_system IN LISTS EXTERNAL_SLAM_SYSTEMS) endif() if(${slam_system}_FOUND) set(SLAM_NAME ${slam_system}) + set(SLAM_LDFLAGS ${${slam_system}_LDFLAGS}) set(SLAM_LIBRARIES ${${slam_system}_LIBRARIES}) set(SLAM_INCLUDE_DIRS ${${slam_system}_INCLUDE_DIRS}) # Exit after the first we find. diff --git a/src/external/CMakeLists.txt b/src/external/CMakeLists.txt index 48e706eed..347e5eab0 100644 --- a/src/external/CMakeLists.txt +++ b/src/external/CMakeLists.txt @@ -80,7 +80,7 @@ if(XRT_FEATURE_SLAM) xrt-external-slam INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/slam_tracker ) target_include_directories(xrt-external-slam SYSTEM INTERFACE ${SLAM_INCLUDE_DIRS}) - target_link_libraries(xrt-external-slam INTERFACE ${SLAM_LIBRARIES}) + target_link_libraries(xrt-external-slam INTERFACE ${SLAM_LDFLAGS}) endif() # STB