-
Notifications
You must be signed in to change notification settings - Fork 169
/
CMakeLists.txt
21 lines (18 loc) · 1.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# This file contains everything that should be exectuted AFTER the installation
# step has completed.
message("Setting up post-install behavior...")
# Set up format version numbers for the main shared library on install
install(CODE "EXECUTE_PROCESS(COMMAND cp -f ${CMAKE_BINARY_DIR}/lib/libisis3${SO} ${CMAKE_INSTALL_PREFIX}/lib/libisis3.6.0${SO})")
install(CODE "EXECUTE_PROCESS(COMMAND ln -sf libisis3.6.0${SO} ${CMAKE_INSTALL_PREFIX}/lib/libisis3.6${SO})")
install(CODE "EXECUTE_PROCESS(COMMAND ln -sf libisis3.6${SO} ${CMAKE_INSTALL_PREFIX}/lib/libisis3${SO})")
install(CODE "EXECUTE_PROCESS(COMMAND ln -sf libisis3${SO} ${CMAKE_INSTALL_PREFIX}/lib/libisis${SO})")
# On OSX, need to correct all the paths encoded in each of the distributed library files so
# that they properly find the distruted files using relative paths.
if (APPLE)
# Also need to get the plugin folders
get_subdirectory_list(${CMAKE_SOURCE_DIR}/3rdParty/plugins pluginFolders)
foreach(f ${pluginFolders})
get_filename_component(name ${f} NAME)
install(CODE "EXECUTE_PROCESS(COMMAND python ${CMAKE_SOURCE_DIR}/scripts/finalizeInstalledOsxRpaths.py ${CMAKE_INSTALL_PREFIX}/3rdParty/plugins/${name} resetRpath)")
endforeach()
endif()