Commit e9e91c7c authored by Jerome Dias's avatar Jerome Dias
Browse files

Merge branch 'refactor/CmakeFactorizing' into 'master'

Factorize bundle files from Lidarview

See merge request !24
parents 6d4e3c59 7ad1a621
# Enable CPack packaging.
include(${LidarViewSuperBuild_SOURCE_DIR}/../Application/SoftwareInformation/branding.cmake)
# Include CMake scripts for geting the version from Git
include("${LidarViewSuperBuild_SOURCE_DIR}/../LVCore/CMake/Git.cmake")
include("${LidarViewSuperBuild_SOURCE_DIR}/../LVCore/CMake/ParaViewDetermineVersion.cmake")
# Sets LV_VERSION_{MAJOR,MINOR,PATCH} for git
set(LV_VERSION_FILE ${LidarViewSuperBuild_SOURCE_DIR}/../version.txt)
file(STRINGS "${LV_VERSION_FILE}" version_txt)
extract_version_components("${version_txt}" "LV")
determine_version(${LidarViewSuperBuild_SOURCE_DIR} ${GIT_EXECUTABLE} "LV")
# Update the hard-coded version
extract_version_components("${version_txt}" "LV_file")
if((version_txt VERSION_LESS LV_VERSION_FULL)
OR (version_txt VERSION_EQUAL LV_VERSION_FULL
AND (LV_file_VERSION_PATCH_EXTRA STRLESS LV_VERSION_PATCH_EXTRA)))
message(STATUS "Outdated version file updated from ${version_txt} to ${LV_VERSION_FULL} in " ${LV_VERSION_FILE})
file(WRITE "${LV_VERSION_FILE}" "${LV_VERSION_FULL}")
endif()
if(NOT (version_txt STREQUAL LV_VERSION_FULL))
message(STATUS "Git version (${LV_VERSION_FULL}) differs from version in file (${version_txt}) at " ${LV_VERSION_FILE})
endif()
# Sets GD_YEAR, GD_MONTH, GD_DAY
include(${LidarViewSuperBuild_SOURCE_DIR}/lidarview-superbuild/Projects/getdate.cmake)
GET_DATE()
set(PACKAGE_TIMESTAMP "${GD_YEAR}${GD_MONTH}${GD_DAY}")
set(CPACK_COMPONENT_LIDARVIEW_DISPLAY_NAME ${SOFTWARE_NAME})
set(CPACK_PACKAGE_VERSION_MAJOR ${LV_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${LV_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${LV_VERSION_PATCH})
if (NOT LV_VERSION_IS_RELEASE)
set(CPACK_PACKAGE_VERSION_PATCH ${LV_VERSION_PATCH}-${LV_VERSION_PATCH_EXTRA})
else()
endif()
if (NOT LV_VERSION_IS_RELEASE)
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${LV_VERSION_FULL}-${PACKAGE_TIMESTAMP}-${package_suffix}")
else()
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${LV_VERSION_FULL}-${package_suffix}")
endif()
message(STATUS "Bundled package name will be: ${CPACK_PACKAGE_FILE_NAME}" )
# Set the license file.
set(CPACK_RESOURCE_FILE_LICENSE "${LidarViewSuperBuild_SOURCE_DIR}/lidarview-superbuild/LICENSE")
set(lidarview_executables
"${SOFTWARE_NAME}"
)
# Sometimes some modules are not fully processed automatically on bundle.
# That is why we use a list of lidarview_modules that will be installed manually in LidarviewBundle.
set(lidarview_modules)
if (WIN32)
list(APPEND lidarview_modules "${superbuild_install_location}/bin/LidarPluginPython.pyd")
list(APPEND lidarview_modules "${superbuild_install_location}/bin/LidarPluginPythonD.dll")
elseif (APPLE)
list(APPEND lidarview_modules "LidarPluginPython.so")
list(APPEND lidarview_modules "libLidarPluginPythonD.dylib")
endif ()
set(python_modules
paraview
vtk
vtkmodules
lidarview
lidarviewcore
)
function (lidarview_add_plugin output)
set(contents "<?xml version=\"1.0\"?>\n<Plugins>\n</Plugins>\n")
foreach (name IN LISTS ARGN)
set(auto_load 0)
if (DEFINED paraview_plugin_${name}_auto_load)
set(auto_load 1)
endif ()
set(plugin_directive " <Plugin name=\"${name}\" auto_load=\"${auto_load}\" />\n")
string(REPLACE "</Plugins>" "${plugin_directive}</Plugins>" contents "${contents}")
endforeach ()
file(WRITE "${output}" "${contents}")
endfunction ()
# set the relative path in which we can find plugins for each platform
# Note : On Windows all the paraview plugins are stored in the same install
# subdirectory as lidarview plugins. So in that case paraview_plugin_subdir is useless.
if (WIN32)
set(lidarview_plugin_subdir "bin/plugins")
set(plugin_name_regex "${superbuild_install_location}/${lidarview_plugin_subdir}/*.dll")
elseif (APPLE)
set(paraview_plugin_subdir "Applications/paraview.app/Contents/Plugins")
set(lidarview_plugin_subdir "bin/${SOFTWARE_NAME}.app/Contents/Plugins")
set(plugin_name_regex "${superbuild_install_location}/${paraview_plugin_subdir}/lib*.dylib"
"${superbuild_install_location}/${lidarview_plugin_subdir}/lib*.dylib")
elseif (UNIX)
set(paraview_plugin_subdir "lib/paraview-${PARAVIEW_VERSION}/plugins")
set(lidarview_plugin_subdir "lib/plugins")
set(plugin_name_regex "${superbuild_install_location}/${paraview_plugin_subdir}/lib*.so"
"${superbuild_install_location}/${lidarview_plugin_subdir}/lib*.so")
endif ()
# get all plugins installed in the lib/lidarview install dir
file(GLOB_RECURSE lidarview_plugin_paths ${plugin_name_regex})
# Get plugins name and set up the .plugins file list
set(lidarview_plugins)
foreach(lidarview_plugin_path ${lidarview_plugin_paths})
get_filename_component(paraview_plugin "${lidarview_plugin_path}" NAME_WE)
# remove 'lib' prefix in plugin name
if(UNIX)
string(REPLACE "lib" "" paraview_plugin "${paraview_plugin}")
endif()
list(APPEND lidarview_plugins ${paraview_plugin})
endforeach()
set(plugins_file "${CMAKE_CURRENT_BINARY_DIR}/.plugins")
lidarview_add_plugin("${plugins_file}" ${lidarview_plugins})
if (qt5_enabled)
include(qt5.functions)
set(qt5_plugin_prefix)
if (NOT WIN32)
set(qt5_plugin_prefix "lib")
endif ()
# Add SVG support, so ParaView can use SVG icons
set(qt5_plugins
iconengines/${qt5_plugin_prefix}qsvgicon
imageformats/${qt5_plugin_prefix}qsvg
sqldrivers/${qt5_plugin_prefix}qsqlite)
if (WIN32)
list(APPEND qt5_plugins
platforms/qwindows)
if (NOT qt5_version VERSION_LESS "5.10")
list(APPEND qt5_plugins
styles/qwindowsvistastyle)
endif ()
elseif (APPLE)
list(APPEND qt5_plugins
platforms/libqcocoa
printsupport/libcocoaprintersupport)
if (NOT qt5_version VERSION_LESS "5.10")
list(APPEND qt5_plugins
styles/libqmacstyle)
endif ()
elseif (UNIX)
list(APPEND qt5_plugins
platforms/libqxcb
platforminputcontexts/libcomposeplatforminputcontextplugin
xcbglintegrations/libqxcb-glx-integration)
endif ()
superbuild_install_qt5_plugin_paths(qt5_plugin_paths ${qt5_plugins})
else ()
set(qt5_plugin_paths)
endif ()
\ No newline at end of file
# Some advices when debugging:
# - get help by looking at:
# (mainly) https://gitlab.kitware.com/paraview/paraview-superbuild/blob/master/projects/apple/paraview.bundle.cmake
# (also) https://gitlab.kitware.com/cmb/cmb-superbuild/blob/master/projects/apple/cmb.bundle.apple.cmake
# - always clean the package-related directories of the build tree before retrying:
# rm -rf _CPack_Packages && rm -rf cpack && cmake .
# then try with: ctest -R cpack -V > package.log (very useful to grep the log)
# - to test if the application has correct paths and patched executable/libraries:
# inside build directory:
# `open _CPack_Packages/Darwin/DragNDrop/LidarView-3.6.0-196-g3490e1d-20190109-Darwin-64bit/lidarview.app`
# (much, much faster than having to mount the .dmg using the finder)
# - testing the .dmg on another computer (that does not have Qt) is important because that is our target
# - testing the .dmg on another computer + executing LidarView from terminal
# (with `/Volume/something.dmg/lidarview.app/Contents/MacOS/LidarView`) will sometime give you much
# very clear indications about absolute path that have not been fixed / missing files
# - to have a hint at "should this file really by inside the .dmg ?", look inside Paraview's .dmg
# or (better) recent working LidarView's .dmg
# - do not hesistate to hack inside ../common-superbuild/cmake/scripts/fixup_bundle.apple.py
# to print/modify/add paths, then get rid of your hack using only this file
# (we do not want to modify the common-superbuild)
include(${LidarViewSuperBuild_SOURCE_DIR}/../Application/SoftwareInformation/branding.cmake)
# the variable lidarview_appname:
# - must be a valid dirname: will be a directory at the top of the .dmg
# - is visible in the macOS GUI when opening the .dmg
# - MUST end with .app (else its tree is not considered as an app by macOS)
set(lidarview_appname "${SOFTWARE_NAME}.app")
set(lidarview_additional_libraries)
if(ENABLE_slam)
LIST(APPEND lidarview_additional_libraries "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Libraries/libLidarSlam.dylib")
endif()
superbuild_apple_create_app(
"\${CMAKE_INSTALL_PREFIX}"
"${lidarview_appname}"
"${superbuild_install_location}/bin/${lidarview_appname}/Contents/MacOS/${SOFTWARE_NAME}"
CLEAN
PLUGINS ${lidarview_plugin_paths}
SEARCH_DIRECTORIES "${superbuild_install_location}/lib" "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Libraries"
ADDITIONAL_LIBRARIES ${lidarview_additional_libraries}
)
install(
FILES "${plugins_file}"
DESTINATION "${lidarview_appname}/Contents/Plugins"
COMPONENT superbuild)
install(
FILES "${superbuild_install_location}/Applications/paraview.app/Contents/Resources/pvIcon.icns"
DESTINATION "${lidarview_appname}/Contents/Resources"
COMPONENT superbuild)
install(
FILES "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Info.plist"
DESTINATION "${lidarview_appname}/Contents"
COMPONENT superbuild)
# Remove "LidarView" from the list since we just installed it above.
list(REMOVE_ITEM lidarview_executables
${SOFTWARE_NAME})
foreach (executable IN LISTS lidarview_executables)
superbuild_apple_install_utility(
"\${CMAKE_INSTALL_PREFIX}"
"${lidarview_appname}"
"${superbuild_install_location}/bin/${lidarview_appname}/Contents/bin/${executable}"
SEARCH_DIRECTORIES "${superbuild_install_location}/lib")
endforeach ()
if (qt5_enabled)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" "[Paths]\nPlugins = Plugins\n")
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "${lidarview_appname}/Contents/Resources"
COMPONENT superbuild)
endif ()
if (python3_enabled)
# install python modules
if (python3_built_by_superbuild)
include(python3.functions)
superbuild_install_superbuild_python3(BUNDLE "${lidarview_appname}")
endif()
superbuild_apple_install_python(
"\${CMAKE_INSTALL_PREFIX}"
"${lidarview_appname}"
MODULES ${python_modules}
MODULE_DIRECTORIES
"${superbuild_install_location}/Applications/paraview.app/Contents/Python"
"${superbuild_install_location}/bin/${lidarview_appname}/Contents/Python"
"${superbuild_install_location}/lib/python${superbuild_python_version}/site-packages"
SEARCH_DIRECTORIES
"${superbuild_install_location}/Applications/paraview.app/Contents/Libraries"
"${superbuild_install_location}/bin/${lidarview_appname}/Contents/Libraries"
"${superbuild_install_location}/lib")
endif ()
# For some reason these .so files are not processed by the command
# superbuild_apple_install_python above, so we have to specify them manually
# it could be that I failed to find the correct name(s) to add in parameter
# "MODULE" but I do not think so because there are 86 such files, and because
# they seem to be part of vtk which is already specified like that in ParaView
file(GLOB missing_python_so "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Libraries/vtk*Python.so")
foreach (python_so ${missing_python_so})
superbuild_apple_install_module(
"\${CMAKE_INSTALL_PREFIX}"
"${lidarview_appname}"
"${python_so}"
"Contents/Libraries") # destination path inside bundle
endforeach()
# My understanding is that these module are not processed automatically
# by superbuild_apple_create_app because there is no path leading to
# them in binary LidarView or in any of its .dylib dependencies
foreach (module ${lidarview_modules})
superbuild_apple_install_module(
"\${CMAKE_INSTALL_PREFIX}"
"${lidarview_appname}"
"${superbuild_install_location}/bin/${lidarview_appname}/Contents/Libraries/${module}"
"Contents/Libraries") # destination path inside bundle
endforeach()
# Configure CMakeDMGSetup.scpt to replace the app name in the script.
configure_file(
"${CMAKE_CURRENT_LIST_DIR}/files/CMakeDMGSetup.scpt.in"
"${CMAKE_CURRENT_BINARY_DIR}/CMakeDMGSetup.scpt"
@ONLY)
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_LIST_DIR}/files/CMakeDMGBackground.tif")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/CMakeDMGSetup.scpt")
message(STATUS "qt5_plugin_paths is ${qt5_plugin_paths}")
foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_path}" DIRECTORY)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_apple_install_module(
"\${CMAKE_INSTALL_PREFIX}"
"${lidarview_appname}"
"${qt5_plugin_path}"
"Contents/Plugins/${qt5_plugin_group}"
SEARCH_DIRECTORIES "${library_paths}")
endforeach ()
install(DIRECTORY "${superbuild_install_location}/bin/${lidarview_appname}/Contents/Resources"
DESTINATION "${lidarview_appname}/Contents"
COMPONENT superbuild)
on run argv
set image_name to item 1 of argv
tell application "Finder"
tell disk image_name
-- wait for the image to finish mounting
set open_attempts to 0
repeat while open_attempts < 4
try
open
delay 1
set open_attempts to 5
close
on error errStr number errorNumber
set open_attempts to open_attempts + 1
delay 10
end try
end repeat
delay 5
-- open the image the first time and save a DS_Store with just
-- background and icon setup
open
set current view of container window to icon view
set theViewOptions to the icon view options of container window
set background picture of theViewOptions to file ".background:background.tif"
set arrangement of theViewOptions to not arranged
set icon size of theViewOptions to 128
delay 5
close
-- next setup the position of the app and Applications symlink
-- plus hide all the window decoration
open
update without registering applications
tell container window
set sidebar width to 0
set statusbar visible to false
set toolbar visible to false
set the bounds to { 400, 100, 900, 465 }
set position of item "@lidarview_appname@" to { 133, 200 }
set position of item "Applications" to { 378, 200 }
end tell
update without registering applications
delay 5
close
-- one last open and close so you can see everything looks correct
open
delay 5
close
end tell
delay 1
end tell
end run
set(library_paths "${superbuild_install_location}/lib")
if (Qt5_DIR)
list(APPEND library_paths
"${Qt5_DIR}/../..")
endif ()
# Install lidarview executable.
superbuild_unix_install_program_fwd("${SOFTWARE_NAME}"
"lib"
SEARCH_DIRECTORIES "${library_paths}")
# Remove "LidarView" from the list since we just installed it above.
list(REMOVE_ITEM lidarview_executables
${SOFTWARE_NAME})
# Install other executables.
foreach (executable IN LISTS lidarview_executables)
superbuild_unix_install_program("${superbuild_install_location}/bin/${executable}"
"lib"
SEARCH_DIRECTORIES "${library_paths}")
endforeach ()
# install paraview plugins
foreach (lidarview_plugin_path IN LISTS lidarview_plugin_paths)
superbuild_unix_install_plugin("${lidarview_plugin_path}"
"lib"
"${lidarview_plugin_subdir}"
LOADER_PATHS "${library_paths}"
LOCATION "${lidarview_plugin_subdir}")
endforeach ()
# install .plugins file list
install(FILES "${plugins_file}"
DESTINATION ${lidarview_plugin_subdir}
COMPONENT superbuild)
# These module are not processed automatically by superbuild because there is
# no path leading to them in binary LidarView or in any of its .so dependencies
file(GLOB so_names
RELATIVE
"${superbuild_install_location}/lib"
"${superbuild_install_location}/lib/*PluginPython*.so*")
foreach (so_name IN LISTS so_names)
superbuild_unix_install_plugin("${so_name}"
"lib"
"lib"
LOADER_PATHS "${library_paths}")
endforeach ()
if (python_enabled)
if (python3_built_by_superbuild)
include(python3.functions)
superbuild_install_superbuild_python3(LIBSUFFIX "/python${superbuild_python_version}")
endif ()
superbuild_unix_install_python(
LIBDIR "lib"
MODULES ${python_modules}
MODULE_DIRECTORIES "${superbuild_install_location}/lib/python${superbuild_python_version}/site-packages"
LOADER_PATHS "${library_paths}")
endif ()
# An empty paraview directory is created as it is needed to run lidarview
# This is because plugins are all stored in the lib/plugins directory
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib/paraview-${PARAVIEW_VERSION}")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib/paraview-${PARAVIEW_VERSION}"
DESTINATION "lib"
COMPONENT superbuild)
if (qt5_enabled AND qt5_plugin_paths)
# install an empty qt.cong file
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" "[Paths]\nPrefix = ..\n")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "lib"
COMPONENT superbuild)
endif()
# install qt plugins
foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_path}" DIRECTORY)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_unix_install_plugin("${qt5_plugin_path}"
"lib"
"lib/${qt5_plugin_group}/"
LOADER_PATHS "${library_paths}")
endforeach ()
# Set NSIS install specific stuff.
if (CMAKE_CL_64)
# Change default installation root path for Windows x64.
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
endif ()
set(CPACK_NSIS_HELP_LINK "https://www.paraview.org/lidarview/")
set(${SOFTWARE_NAME}_description "${SOFTWARE_NAME} ${lidarview_version_full}")
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/../../../../../Application/SoftwareInformation/logo.ico")
set(library_paths "${superbuild_install_location}/lib"
"${superbuild_install_location}/bin"
"${superbuild_install_location}/Python")
if (Qt5_DIR)
list(APPEND library_paths
"${Qt5_DIR}/../../../bin")
endif ()
# Install lidarview executables to bin.
foreach (executable IN LISTS lidarview_executables)
if (DEFINED "${executable}_description")
list(APPEND CPACK_NSIS_MENU_LINKS
"bin/${executable}.exe" "${${executable}_description}")
endif ()
superbuild_windows_install_program("${executable}" "bin"
SEARCH_DIRECTORIES "${library_paths}"
EXCLUDE_REGEXES ${exclude_regexes})
endforeach()
# install paraview plugins
foreach (lidarview_plugin_path IN LISTS lidarview_plugin_paths)
superbuild_windows_install_plugin("${lidarview_plugin_path}"
"bin"
"${lidarview_plugin_subdir}"
SEARCH_DIRECTORIES "${library_paths}"
LOCATION "${lidarview_plugin_subdir}")
endforeach ()
install(FILES "${plugins_file}"
DESTINATION ${lidarview_plugin_subdir}
COMPONENT superbuild)
if (python3_enabled)
if (python3_built_by_superbuild)
include(python3.functions)
superbuild_install_superbuild_python3()
endif ()
superbuild_windows_install_python(
MODULES ${python_modules}
MODULE_DIRECTORIES "${superbuild_install_location}/bin/Lib"
"${superbuild_install_location}/bin/Lib/site-packages"
SEARCH_DIRECTORIES "${library_paths}")
endif ()
foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_path}" DIRECTORY)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_windows_install_plugin(
"${qt5_plugin_path}"
"bin"
"bin/${qt5_plugin_group}"
SEARCH_DIRECTORIES "${library_paths}")
endforeach ()
if (qt5_enabled)
foreach (qt5_opengl_lib IN ITEMS opengl32sw libEGL libGLESv2 libEGLd
Qt5Core Qt5Gui Qt5Widgets Qt5Help Qt5Network Qt5PrintSupport Qt5Sql)
superbuild_windows_install_plugin(
"${Qt5_DIR}/../../../bin/${qt5_opengl_lib}.dll"
"bin"
"bin"
SEARCH_DIRECTORIES "${library_paths}")
endforeach ()
endif ()
# some dlls are missing.
# They should be installed automatically because of paraview/vtk's cmake lists
file(GLOB vtk_dlls "${superbuild_install_location}/bin/vtk*.dll")
install(FILES ${vtk_dlls}
DESTINATION "bin"
COMPONENT superbuild
)
unset(vtk_dlls)
# install all lidarview_modules appended in LidarviewBundleCommon
install(FILES ${lidarview_modules}
DESTINATION "bin"
COMPONENT superbuild
)
file(GLOB boost_bin_dll "${superbuild_install_location}/bin/boost*.dll")
install(FILES ${boost_bin_dll}
DESTINATION "bin"
COMPONENT superbuild
)
unset(boost_bin_dll)
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")
include(InstallRequiredSystemLibraries)
\ No newline at end of file
# Only needed on OSX
# boost libs are missing when we try to launch lidarview app and tests. Even
# if all the needed cmake flags are used for lidarview to managed
# dependencies with RPATH, it remains an issue where RPATH are not used
# to find boost libs. This script has been created to force lidarview to
# search all boost dependencies along RPATH. (See related issue
# here https://gitlab.kitware.com/cmake/cmake/-/issues/19315).
# This script change paths for all boost dependencies from libboost_* to @rpath/libboost_*
message(WARNING "Applying Reset rpath for all boost dependencies path")
get_filename_component(install_location "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
# get a list of all boost lib used
file(GLOB boost_libs LIST_DIRECTORIES false "${install_location}/lib/libboost*.dylib")
# get all app and tests on which to change boost path
file(GLOB app_list LIST_DIRECTORIES false "${install_location}/bin/*/Contents/MacOS/*")
file(GLOB lib_list LIST_DIRECTORIES false "lib/*.dylib" "${install_location}/lib/*.dylib")
file(GLOB test_list LIST_DIRECTORIES false "bin/Test*")
foreach (boost_lib IN LISTS boost_libs)
get_filename_component(libboost_name "${boost_lib}" NAME)
MESSAGE("Setting RPATH for ${boost_lib}")
foreach (bin_name IN LISTS app_list lib_list test_list)
MESSAGE(" Set on bin ${bin_name}")
execute_process(
COMMAND install_name_tool
-change "${libboost_name}" "@rpath/${libboost_name}"
"${bin_name}")
endforeach ()
endforeach ()
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