macOS bundle: add library output dir to fixup_bundle search dirs

fixup_bundle could not resolve the app's @rpath references to rtabmap's
own libraries (e.g. librtabmap_core), which are built in
CMAKE_LIBRARY_OUTPUT_DIRECTORY (build/bin). macdeployqt used to resolve
these via the executable rpath; now that it is bypassed on macOS, add
that directory to fixup_bundle's search DIRS.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
matlabbe
2026-06-27 15:57:17 -07:00
co-authored by Claude Opus 4.8
parent febbb49523
commit 703dc3a380
+4 -1
View File
@@ -366,7 +366,10 @@ IF(BUILD_AS_BUNDLE AND (APPLE OR WIN32))
ENDIF() ENDIF()
# directories to look for dependencies # directories to look for dependencies
SET(DIRS "${QT_LIBRARY_DIRS}" "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib") # CMAKE_LIBRARY_OUTPUT_DIRECTORY is where rtabmap's own libraries (e.g.
# librtabmap_core) are built; fixup_bundle needs it to resolve the app's
# @rpath references to them (macdeployqt used to handle this via rpath).
SET(DIRS "${QT_LIBRARY_DIRS}" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib")
IF(APPLE) IF(APPLE)
SET(DIRS ${DIRS} /usr/local /usr/local/lib /opt/homebrew /opt/homebrew/lib /opt/homebrew/lib/gcc/current) SET(DIRS ${DIRS} /usr/local /usr/local/lib /opt/homebrew /opt/homebrew/lib /opt/homebrew/lib/gcc/current)
ENDIF(APPLE) ENDIF(APPLE)