Use INSTALL_NAME_DIR to embed names in the dylibs and avoid linker errors.y
parent
21aa7a2e85
commit
f50c3c0d51
|
@ -70,7 +70,8 @@ function(wrap_library_internal interfaceHeader linkLibraries extraIncludeDirs ex
|
|||
set(mexModuleExt mexglx)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set(mexModuleExt mexmaci64)
|
||||
set(mexModuleExt mexmaci64)
|
||||
set(CMAKE_INSTALL_DIR_NAME ${GTSAM_TOOLBOX_INSTALL_PATH})
|
||||
elseif(MSVC)
|
||||
if(CMAKE_CL_64)
|
||||
set(mexModuleExt mexw64)
|
||||
|
|
|
@ -113,6 +113,10 @@ if (GTSAM_BUILD_STATIC_LIBRARY)
|
|||
PREFIX "lib"
|
||||
COMPILE_DEFINITIONS GTSAM_IMPORT_STATIC)
|
||||
endif()
|
||||
if(APPLE) # Set the
|
||||
set_target_properties(gtsam PROPERTIES
|
||||
INSTALL_DIR_NAME ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
endif()
|
||||
install(TARGETS gtsam EXPORT GTSAM-exports ARCHIVE DESTINATION lib)
|
||||
list(APPEND GTSAM_EXPORTED_TARGETS gtsam)
|
||||
set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)
|
||||
|
|
Loading…
Reference in New Issue