Commit cfa4ebea authored by Dave Moxey's avatar Dave Moxey
Browse files

Remove old packaging

parent 69b235c9
......@@ -371,5 +371,5 @@ INSTALL(DIRECTORY ${TPDIST}/lib/
ADD_SUBDIRECTORY(docs)
IF(NEKTAR_BUILD_PACKAGES)
ADD_SUBDIRECTORY(pkg2)
ADD_SUBDIRECTORY(pkg)
ENDIF(NEKTAR_BUILD_PACKAGES)
......@@ -15,6 +15,8 @@ elseif(CPACK_GENERATOR STREQUAL "RPM")
elseif(CPACK_GENERATOR STREQUAL "PackageMaker")
# OS X .pkg installer -- set install location
set(CPACK_MONOLITHIC_INSTALL ON)
# Set install locations
set(CPACK_PACKAGE_DEFAULT_LOCATION "/")
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/nektar++")
set(CPACK_RESOURCE_FILE_WELCOME "@CMAKE_SOURCE_DIR@/pkg/osx-installer.html")
......@@ -22,7 +24,12 @@ elseif(CPACK_GENERATOR STREQUAL "PackageMaker")
# This is used as part of the identifier, so make it without spaces
set(CPACK_PACKAGE_VENDOR "imperialcollegelondon")
elseif(CPACK_GENERATOR STREQUAL "TGZ" OR CPACK_GENERATOR STREQUAL "TXZ" OR CPACK_GENERATOR STREQUAL "ZIP")
elseif(CPACK_GENERATOR STREQUAL "TGZ" OR
CPACK_GENERATOR STREQUAL "TXZ" OR
CPACK_GENERATOR STREQUAL "TZ" OR
CPACK_GENERATOR STREQUAL "TBZ2" OR
CPACK_GENERATOR STREQUAL "ZIP")
# Archive generators should use a monolithic installation
set(CPACK_MONOLITHIC_INSTALL ON)
endif()
......
function (write_lib_files PKG_INSTALL_LIBS OUTPUT_FILE)
# Find library file and add the versioned form of each library
set(PKG_INSTALL_LIBS_FILES)
foreach(l ${PKG_INSTALL_LIBS})
IF(${CMAKE_MAJOR_VERSION} LESS 3)
get_target_property(TARGET_LOCATION ${l} LOCATION)
ELSE ()
SET(TARGET_LOCATION $<TARGET_LINKER_FILE:${l}>)
ENDIF()
if (NOT TARGET_LOCATION)
message(FATAL_ERROR "Target '${l}' could not be found.")
endif ()
list(APPEND PKG_INSTALL_LIBS_FILES ${TARGET_LOCATION})
if (APPLE)
list(APPEND PKG_INSTALL_LIBS_FILES $<TARGET_FILE:${l}>)
else ()
list(APPEND PKG_INSTALL_LIBS_FILES
${TARGET_LOCATION}.${NEKTAR_VERSION})
endif()
endforeach()
# Output the list of files to be installed in the package
IF(${CMAKE_MAJOR_VERSION} LESS 3)
file(WRITE "${OUTPUT_FILE}" "${PKG_INSTALL_LIBS_FILES}")
ELSE ()
file(GENERATE OUTPUT "${OUTPUT_FILE}"
CONTENT "${PKG_INSTALL_LIBS_FILES}")
ENDIF ()
endfunction ()
function (write_bin_files PKG_INSTALL_BINS OUTPUT_FILE)
# Find binary files
set(PKG_INSTALL_BINS_FILES)
foreach(b ${PKG_INSTALL_BINS})
IF(EXISTS ${b})
get_filename_component(TARGET_LOCATION ${b} REALPATH)
ELSEIF(${CMAKE_MAJOR_VERSION} LESS 3)
get_target_property(TARGET_LOCATION ${b} LOCATION)
ELSE ()
SET(TARGET_LOCATION $<TARGET_FILE:${b}>)
ENDIF ()
if (NOT TARGET_LOCATION)
message(FATAL_ERROR "Target '${b}' could not be found.")
endif ()
list(APPEND PKG_INSTALL_BINS_FILES ${TARGET_LOCATION})
endforeach()
# Output the list of files to be installed in the package
IF(${CMAKE_MAJOR_VERSION} LESS 3)
file(WRITE "${OUTPUT_FILE}" "${PKG_INSTALL_BINS_FILES}")
ELSE ()
file(GENERATE OUTPUT "${OUTPUT_FILE}"
CONTENT "${PKG_INSTALL_BINS_FILES}")
ENDIF ()
endfunction ()
macro (add_nektar_package)
set(options "")
set(oneValueArgs NAME SUMMARY DESCRIPTION TYPE)
set(multiValueArgs INSTALL_LIBS INSTALL_BINS BREAKS CONFLICTS DEPENDS)
cmake_parse_arguments(PKG "${options}"
"${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PKG_NAME}-${PKG_TYPE})
file(MAKE_DIRECTORY "${BUILD_DIR}/targets")
write_lib_files("${PKG_INSTALL_LIBS}"
"${BUILD_DIR}/targets/install_libs.txt")
write_bin_files("${PKG_INSTALL_BINS}"
"${BUILD_DIR}/targets/install_bins.txt")
if(PKG_TYPE STREQUAL "deb")
set(PKG_GENERATOR "DEB")
elseif(PKG_TYPE STREQUAL "rpm")
set(PKG_GENERATOR "RPM")
elseif(PKG_TYPE STREQUAL "pkgmaker")
set(PKG_GENERATOR "PackageMaker")
elseif(PKG_TYPE STREQUAL "tgz")
set(PKG_GENERATOR "TGZ")
else()
message(ERROR "Unknown package type: ${PKG_TYPE}")
endif()
# Configure project for this package
configure_file(NektarPackage.cmake.in ${BUILD_DIR}/CMakeLists.txt @ONLY)
add_custom_target(
pkg-${PKG_TYPE}-${PKG_NAME}
rm -f ${BUILD_DIR}/CPackConfig.cmake
COMMAND ${CMAKE_COMMAND} .
COMMAND ${CMAKE_CPACK_COMMAND} --config CPackConfig.cmake -G ${PKG_GENERATOR}
WORKING_DIRECTORY ${BUILD_DIR}
)
if (PKG_INSTALL_LIBS OR PKG_INSTALL_BINS)
add_dependencies(pkg-${PKG_TYPE}-${PKG_NAME}
${PKG_INSTALL_LIBS} ${PKG_INSTALL_BINS})
endif ()
add_dependencies(pkg-${PKG_TYPE} pkg-${PKG_TYPE}-${PKG_NAME})
endmacro()
# Base packaging target
add_custom_target(pkg)
# Check if we can build DEB files
find_program(DPKG "dpkg")
mark_as_advanced(DPKG)
find_program(DPKGSHLIBDEPS "dpkg-shlibdeps")
mark_as_advanced(DPKGSHLIBDEPS)
if (DPKG)
if (NOT DPKGSHLIBDEPS)
MESSAGE(FATAL_ERROR "dpkg-shlibdeps program not found but is required.")
endif ()
add_custom_target(pkg-deb)
add_dependencies(pkg pkg-deb)
endif (DPKG)
# Check if we can build RPM files
find_program(RPMBUILD "rpmbuild")
mark_as_advanced(RPMBUILD)
if (RPMBUILD)
add_custom_target(pkg-rpm)
add_dependencies(pkg pkg-rpm)
endif (RPMBUILD)
# Check if we can build PackageMaker .pkg files. PackageMaker is technically
# deprecated but still works at least up to OS X 10.11. It could therefore live
# in a bunch of locations, so check common places.
find_program(PKGMAKER "PackageMaker"
PATHS /Applications/Xcode.app/Contents/Applications/PackageMaker.app/Contents/MacOS
/Applications/Utilities/PackageMaker.app/Contents/MacOS
/Applications/PackageMaker.app/Contents/MacOS
/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS
/Developer/Applications/PackageMaker.app/Contents/MacOS)
if (PKGMAKER)
add_custom_target(pkg-pkgmaker)
add_dependencies(pkg pkg-pkgmaker)
endif()
# Binary archive target
add_custom_target(pkg-tgz)
add_dependencies(pkg pkg-tgz)
This diff is collapsed.
cmake_minimum_required(VERSION 2.6)
project("pkg-@PKG_NAME@")
# Files to go in the package
file(READ "targets/install_libs.txt" INSTALL_LIBS_FILES)
file(READ "targets/install_bins.txt" INSTALL_BINS_FILES)
# Put output in builds dir.
set(CPACK_OUTPUT_FILE_PREFIX "../..")
# Package details
set(CPACK_GENERATOR "@PKG_GENERATOR@")
set(CPACK_PACKAGE_NAME "@PKG_NAME@")
set(CPACK_PACKAGE_VENDOR "Imperial College London")
set(CPACK_PACKAGE_CONTACT
"Nektar++ users mailing list <nektar-users@imperial.ac.uk>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "@PKG_SUMMARY@")
set(CPACK_PACKAGE_DESCRIPTION "@PKG_DESCRIPTION@")
set(CPACK_RESOURCE_FILE_LICENSE "@CMAKE_SOURCE_DIR@/LICENSE.txt")
set(CPACK_PACKAGE_VERSION "@NEKTAR_VERSION@")
set(CPACK_PACKAGE_VERSION_MAJOR "@NEKTAR_VERSION_MAJOR@")
set(CPACK_PACKAGE_VERSION_MINOR "@NEKTAR_VERSION_MINOR@")
set(CPACK_PACKAGE_VERSION_PATCH "@NEKTAR_VERSION_PATCH@")
if(CPACK_GENERATOR STREQUAL "DEB")
# Debian packages
execute_process(COMMAND dpkg --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(ARCHITECTURE ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
set(CPACK_DEBIAN_PACKAGE_DEBUG ON)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER
"Chris Cantwell <c.cantwell@imperial.ac.uk>")
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.nektar.info")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION
"@PKG_SUMMARY@@PKG_DESCRIPTION@")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "@PKG_DEPENDS@")
if (INSTALL_BINS_FILES OR INSTALL_LIBS_FILES)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
endif ()
elseif(CPACK_GENERATOR STREQUAL "RPM")
execute_process(COMMAND rpm --eval %{_arch}
OUTPUT_VARIABLE CPACK_RPM_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(ARCHITECTURE ${CPACK_RPM_PACKAGE_ARCHITECTURE})
set(CPACK_RPM_PACKAGE_SUMMARY "@PKG_SUMMARY@")
set(CPACK_RPM_PACKAGE_DESCRIPTION "@PKG_DESCRIPTION@")
set(CPACK_RPM_PACKAGE_REQUIRES "@PKG_DEPENDS@")
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
set(CPACK_RPM_PACKAGE_DEBUG 0)
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-1.${CPACK_RPM_PACKAGE_ARCHITECTURE}")
elseif(CPACK_GENERATOR STREQUAL "PackageMaker")
# OS X .pkg installer -- set install location
set(CPACK_PACKAGE_DEFAULT_LOCATION "/")
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/nektar++")
set(CPACK_RESOURCE_FILE_WELCOME "@CMAKE_SOURCE_DIR@/pkg/osx-installer.html")
set(CPACK_POSTFLIGHT_SCRIPT "@CMAKE_SOURCE_DIR@/pkg/osx-postflight.sh")
# This is used as part of the identifier, so make it without spaces
set(CPACK_PACKAGE_VENDOR "imperialcollegelondon")
endif()
# Determine architecture if not detected by rpm/dpkg above
if(NOT DEFINED ARCHITECTURE)
execute_process(COMMAND uname -m
OUTPUT_VARIABLE ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
# Override the output filename to comply with Debian naming policy
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARCHITECTURE}")
endif()
# Install any libraries in the lib directory: exclude OS X, we will copy/patch
# up libraries as we install executables.
if(INSTALL_LIBS_FILES AND NOT APPLE)
install(FILES ${INSTALL_LIBS_FILES} DESTINATION lib
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
endif()
# Install any binaries in the bin directory
if(INSTALL_BINS_FILES)
install(FILES ${INSTALL_BINS_FILES} DESTINATION bin
PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
WORLD_READ WORLD_EXECUTE
)
endif()
# This lovely block of code is designed to patch up our executables ready for OS
# X deployment. The strategy is to create a piece of INSTALL code that will
# patch up each executable and copy any libraries that we depend on, so that
# things like ARPACK can be compiled using MacPorts/Homebrew and we don't have
# to bother messing around compiling them ourselves.
#
# The strategy is:
#
# - Examine the library dependencies using the get_prerequisites function from
# the GetPrerequisites CMake module (that essentially runs otool recursively)
# - Copy each of the libraries into dist/lib
# - Run install_name_tool on each library to remove the absolute path to the
# installed library.
# - This is then replaced by @rpath/../lib/libName.dylib so that @rpath can be
# embedded into the executable.
# - Change the library install name so that it follows the same convention
# - Extract the rpaths from our executable using the get_item_rpaths function
# from BundleUtilities
# - Finally, set the rpath of each executable to be @executable_path so that
# everything becomes relative to the executable
#
# All of this makes an entirely self-contained version of Nektar++ that can be
# extracted anywhere on the system and still retain its dependencies.
if(APPLE)
foreach(app ${INSTALL_BINS_FILES})
get_filename_component(appname ${app} NAME)
set(app "\${CMAKE_INSTALL_PREFIX}/bin/${appname}")
install(CODE "
include(GetPrerequisites)
include(BundleUtilities)
get_filename_component(exepath ${app} DIRECTORY)
get_prerequisites(\"${app}\" prereqs 1 1 \"\${exepath}\" \"\" \"\" 1)
message(STATUS \"Fixing executable: ${app}\")
# First pass -- copy libraries and figure out -change command for
# install_name_tool. Note that since install_name_tool doesn't complain
# if the thing you're changing isn't there, we just throw everything
# at every library.
unset(changes)
unset(changes_lib)
foreach(req \${prereqs})
get_filename_component(reqname \${req} NAME)
set(libdest \${CMAKE_INSTALL_PREFIX}/lib/\${reqname})
set(changes \${changes} \"-change\" \"\${req}\" \"@executable_path/../lib/\${reqname}\")
set(changes_lib \${changes_lib} \"-change\" \"\${req}\" \"@loader_path/../lib/\${reqname}\")
# Copy this library
if (NOT EXISTS \${libdest})
file(COPY \${req}
DESTINATION \${CMAKE_INSTALL_PREFIX}/lib
FILE_PERMISSIONS OWNER_WRITE OWNER_READ)
# If the library was symlinked, we follow the symlink and then
# copy that, too.
if (IS_SYMLINK \${req})
# resolve symlink
get_filename_component(req_abs \${req} REALPATH)
file(COPY \${req_abs}
DESTINATION \${CMAKE_INSTALL_PREFIX}/lib
FILE_PERMISSIONS OWNER_WRITE OWNER_READ)
endif()
endif()
endforeach()
# Second pass -- fix up library to use @loader_path/../lib/libName.dylib
foreach(req \${prereqs})
set(searchname \${req})
if (IS_SYMLINK \${req})
get_filename_component(req_abs \${req} REALPATH)
set(req \${req_abs})
endif()
get_filename_component(reqname \${req} NAME)
set(libdest \${CMAKE_INSTALL_PREFIX}/lib/\${reqname})
set(cmd install_name_tool \${changes_lib} \"\${libdest}\")
execute_process(COMMAND \${cmd} RESULT_VARIABLE install_name_tool_result)
# change library install name ID
execute_process(COMMAND install_name_tool -id @loader_path/../lib/\${reqname} \${libdest})
# change @loader_path (used by some boost libs through homebrew)
endforeach()
# Third pass -- fix executable library names
foreach(req \${prereqs})
set(cmd install_name_tool \${changes} \"${app}\")
execute_process(COMMAND \${cmd} RESULT_VARIABLE install_name_tool_result)
endforeach()
# Fix rpath -- unset variables that have been used on previous passes
unset(app_rpaths)
get_item_rpaths(\"${app}\" app_rpaths)
unset(app_rpaths_unique)
unset(rpath_changes)
foreach(rpath \${app_rpaths})
gp_append_unique (app_rpaths_unique \${rpath})
endforeach()
foreach(rpath \${app_rpaths_unique})
set(rpath_changes \${rpath_changes} -delete_rpath \${rpath})
endforeach()
set(rpath_changes \${rpath_changes} -add_rpath @executable_path)
execute_process(COMMAND install_name_tool \${rpath_changes} \"${app}\")
")
ENDFOREACH()
endif()
include(CPack)
set(CPACK_PACKAGE_VENDOR "Imperial College London")
set(CPACK_PACKAGE_CONTACT
"Nektar++ users mailing list <nektar-users@imperial.ac.uk>")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_VERSION "${NEKTAR_VERSION}")
set(CPACK_PACKAGE_VERSION_MAJOR "${NEKTAR_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${NEKTAR_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${NEKTAR_VERSION_PATCH}")
# Debian-specific options
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_DEBUG ON)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER
"Chris Cantwell <c.cantwell@imperial.ac.uk>")
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.nektar.info")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
# RPM-specific options
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
set(CPACK_RPM_PACKAGE_DEBUG 0)
# Set up generator-specific logic (i.e. that may change the above depending on
# generator) using additional CPack configuration file.
configure_file(${CMAKE_SOURCE_DIR}/cmake/NektarCPackConfig.cmake.in
${CMAKE_BINARY_DIR}/NektarCPackConfig.cmake @ONLY)
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/NektarCPackConfig.cmake)
# This lovely block of code is designed to patch up our executables ready for OS
# X deployment. The strategy is to create a piece of INSTALL code that will
# patch up each executable and copy any libraries that we depend on, so that
# things like ARPACK can be compiled using MacPorts/Homebrew and we don't have
# to bother messing around compiling them ourselves.
#
# The strategy is:
#
# - Examine the library dependencies using the get_prerequisites function from
# the GetPrerequisites CMake module (that essentially runs otool recursively)
# - Copy each of the libraries into dist/lib
# - Run install_name_tool on each library to remove the absolute path to the
# installed library.
# - This is then replaced by @rpath/../lib/libName.dylib so that @rpath can be
# embedded into the executable.
# - Change the library install name so that it follows the same convention
# - Extract the rpaths from our executable using the get_item_rpaths function
# from BundleUtilities
# - Finally, set the rpath of each executable to be @executable_path so that
# everything becomes relative to the executable
#
# All of this makes an entirely self-contained version of Nektar++ that can be
# extracted anywhere on the system and still retain its dependencies.
# Finally, include the CPack module
include(CPack)
if(APPLE)
install(CODE "
include(GetPrerequisites)
include(BundleUtilities)
file(GLOB apps \"\${CMAKE_INSTALL_PREFIX}/bin/*\")
message(STATUS \"APPLIST: \${CMAKE_INSTALL_PREFIX}/bin/*\")
foreach (app \${apps})
get_filename_component(exepath \${app} DIRECTORY)
get_prerequisites(\"\${app}\" prereqs 1 1 \"\${exepath}\" \"\" \"\" 1)
message(STATUS \"Fixing executable: \${app}\")
# First pass -- copy libraries and figure out -change command for
# install_name_tool. Note that since install_name_tool doesn't complain
# if the thing you're changing isn't there, we just throw everything
# at every library.
unset(changes)
unset(changes_lib)
# Check if thirdparty component has been set up yet
foreach(req \${prereqs})
message(STATUS \"asdf: \${req}\")
get_filename_component(reqname \${req} NAME)
set(libdest \${CMAKE_INSTALL_PREFIX}/lib/nektar++-${NEKTAR_VERSION}/\${reqname})
set(changes \${changes} \"-change\" \"\${req}\" \"@executable_path/../lib/nektar++-${NEKTAR_VERSION}/\${reqname}\")
set(changes_lib \${changes_lib} \"-change\" \"\${req}\" \"@loader_path/../lib/nektar++-${NEKTAR_VERSION}/\${reqname}\")
# Copy this library
if (NOT EXISTS \${libdest})
file(COPY \${req}
DESTINATION \${CMAKE_INSTALL_PREFIX}/lib/nektar++-${NEKTAR_VERSION}
FILE_PERMISSIONS OWNER_WRITE OWNER_READ)
# If the library was symlinked, we follow the symlink and then
# copy that, too.
if (IS_SYMLINK \${req})
# resolve symlink
get_filename_component(req_abs \${req} REALPATH)
file(COPY \${req_abs}
DESTINATION \${CMAKE_INSTALL_PREFIX}/lib/nektar++-${NEKTAR_VERSION}
FILE_PERMISSIONS OWNER_WRITE OWNER_READ)
endif()
endif()
endforeach()
# Second pass -- fix up library to use @loader_path/../lib/nektar++-${NEKTAR_VERSION}/libName.dylib
foreach(req \${prereqs})
set(searchname \${req})
if (IS_SYMLINK \${req})
get_filename_component(req_abs \${req} REALPATH)
set(req \${req_abs})
endif()
get_filename_component(reqname \${req} NAME)
set(libdest \${CMAKE_INSTALL_PREFIX}/lib/nektar++-${NEKTAR_VERSION}/\${reqname})
set(cmd install_name_tool \${changes_lib} \"\${libdest}\")
execute_process(COMMAND \${cmd} RESULT_VARIABLE install_name_tool_result)
# change library install name ID
execute_process(COMMAND install_name_tool -id @loader_path/../lib/nektar++-${NEKTAR_VERSION}/\${reqname} \${libdest})
# change @loader_path (used by some boost libs through homebrew)
endforeach()
# Third pass -- fix executable library names
foreach(req \${prereqs})
set(cmd install_name_tool \${changes} \"\${app}\")
execute_process(COMMAND \${cmd} RESULT_VARIABLE install_name_tool_result)
endforeach()
# Fix rpath -- unset variables that have been used on previous passes
unset(app_rpaths)
get_item_rpaths(\"\${app}\" app_rpaths)
unset(app_rpaths_unique)
unset(rpath_changes)
foreach(rpath \${app_rpaths})
gp_append_unique (app_rpaths_unique \${rpath})
endforeach()
foreach(rpath \${app_rpaths_unique})
set(rpath_changes \${rpath_changes} -delete_rpath \${rpath})
endforeach()
set(rpath_changes \${rpath_changes} -add_rpath @executable_path)
execute_process(COMMAND install_name_tool \${rpath_changes} \"\${app}\")
endforeach()")
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment