ext/slam: Use LDFLAGS instead of libraries

This lets us avoid LIBRARY_PATH in order to build Monado.
This commit is contained in:
Jakob Bornecrantz 2023-04-21 20:53:40 +01:00
parent c924157c59
commit 99c1742c82
2 changed files with 2 additions and 1 deletions

View file

@ -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.

View file

@ -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