add top level path for installation on macOS devices

release/4.3a0
Varun Agrawal 2019-12-21 10:41:29 -05:00
parent f2376a644e
commit 74e0647bed
3 changed files with 6 additions and 12 deletions

View File

@ -345,6 +345,12 @@ if (MSVC)
list_append_cache(GTSAM_COMPILE_OPTIONS_PRIVATE "/wd4244") # Disable loss of precision which is thrown all over our Eigen
endif()
if (APPLE AND BUILD_SHARED_LIBS)
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
CACHE PATH
"Default install directory on macOS")
endif()
###############################################################################
# Global compile options

View File

@ -172,12 +172,6 @@ if(WIN32) # Add 'lib' prefix to static library to avoid filename collision with
endif()
endif()
if (APPLE AND BUILD_SHARED_LIBS)
set_target_properties(gtsam PROPERTIES
INSTALL_NAME_DIR
"${CMAKE_INSTALL_PREFIX}/lib")
endif()
install(
TARGETS gtsam
EXPORT GTSAM-exports

View File

@ -98,12 +98,6 @@ if(WIN32) # Add 'lib' prefix to static library to avoid filename collision with
endif()
endif()
if (APPLE AND BUILD_SHARED_LIBS)
set_target_properties(gtsam_unstable PROPERTIES
INSTALL_NAME_DIR
"${CMAKE_INSTALL_PREFIX}/lib")
endif()
install(
TARGETS gtsam_unstable
EXPORT GTSAM-exports