From 99c1742c8261116419ddda466462b45aabab25bf Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Fri, 21 Apr 2023 20:53:40 +0100 Subject: [PATCH] ext/slam: Use LDFLAGS instead of libraries This lets us avoid LIBRARY_PATH in order to build Monado. --- CMakeLists.txt | 1 + src/external/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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