Commit a9a3b4c6 authored by Arnaud Billon's avatar Arnaud Billon 💬
Browse files

[Patch] Fix Runtime ZLIB-SYSTEM_Qt5 conflict

parent e278d7e0
# reset boost RPATH on OSX
# Patch reset boost RPATH on OSX
# this is applied on LidarView app and tests
# for more information see comments in lidarview.osx-boost-rpath.cmake
install(SCRIPT "LVCore/CMake/scripts/lidarview.osx-boost-rpath.cmake")
# Patch ZLIB RPATH on Unix/OSX
# this is applied on LidarView app and tests
# for more information see comments in lidarview.unix-zlib-link.cmake
message(WARNING "Forcing zlib.1.2.11 NEEDED using `patchelf` in Lidarplugin to avoid PCL/QT conflicts")
install(SCRIPT "LVCore/CMake/scripts/lidarview.unix-zlib-link.cmake")
# Output CMakeCacheLog.txt
install(SCRIPT "LVCore/CMake/OutputCMakeCacheLog.cmake")
# Only needed on UNIX (not APPLE)
# Fix a conflict between the built libz V1.2.11, and the one used by a SYSTEM Qt5,
# Only occurs on a system with zlib inferior to 1.2.9 (E.g Ubuntu 16.04).
# This only applies at runtime on the machine in question (Tests), not for packages
# The Fix links makes rely explicitely on the built
# Requires `sudo apt-get install patchelf`
# Sanitize
message(FATAL_ERROR "This patch only Applies to UNIX")
message(STATUS "Applying Zlib link fix to every test binaries path")
get_filename_component(install_location "${CMAKE_INSTALL_PREFIX}" ABSOLUTE)
# get all app and tests on which to change boost path
file(GLOB app_list LIST_DIRECTORIES false "${install_location}/bin/*")
file(GLOB test_list LIST_DIRECTORIES false "bin/Test*")
foreach (binary_file IN LISTS app_list test_list)
get_filename_component(libboost_name "${binary_file}" NAME)
MESSAGE("Setting link for ${binary_file}")
COMMAND patchelf --add-needed "" "${binary_file}"
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