Commit dddc72a1 authored by Ben Boeckel's avatar Ben Boeckel

las: use rpaths on Linux

parent 351d77cc
set(las_configure_flags)
if (UNIX AND NOT APPLE)
list(APPEND las_configure_flags
-DCMAKE_INSTALL_RPATH:STRING=<INSTALL_DIR>/lib)
endif ()
superbuild_add_project(las
DEPENDS boost
CMAKE_ARGS
......@@ -7,7 +13,8 @@ superbuild_add_project(las
-DWITH_LASZIP:BOOL=FALSE
-DWITH_TESTS:BOOL=FALSE
-DWITH_UTILITIES:BOOL=FALSE
-DBoost_USE_STATIC_LIBS:BOOL=FALSE)
-DBoost_USE_STATIC_LIBS:BOOL=FALSE
${las_configure_flags})
# this patch is commited upstream at 4dbc30a7e7e099cbe01a7c192ec19d231cc26894
superbuild_apply_patch(las respect-with-geotiff
......@@ -19,6 +26,9 @@ superbuild_apply_patch(las enable-outside-boost-options
superbuild_apply_patch(las add-boost-include-dirs
"Boost include dirs are needed on Windows")
superbuild_apply_patch(las allow-rpath
"Don't reject RPATH settings on Linux")
if (WIN32)
superbuild_append_flags(cxx_flags "-DBOOST_ALL_NO_LIB" PROJECT_ONLY)
endif()
......
diff -u -U5 -r libLAS-1.8.1/CMakeLists.txt libLAS-1.8.1.allow-rpath/CMakeLists.txt
--- libLAS-1.8.1/CMakeLists.txt 2016-08-22 09:07:43.000000000 -0400
+++ libLAS-1.8.1.allow-rpath/CMakeLists.txt 2019-06-19 14:16:23.676522239 -0400
@@ -75,14 +75,10 @@
set(CMAKE_MODULE_PATH "${libLAS_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
if (CMAKE_MAJOR_VERSION GREATER 2)
cmake_policy(SET CMP0042 OLD)
endif()
-if (CMAKE_SYSTEM_NAME MATCHES "Linux")
-set(CMAKE_SKIP_RPATH ON)
-endif()
-
###############################################################################
# General build settings
# Default to debug mode until final 1.6.0 release
if(NOT MSVC_IDE)
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