From 68c4ffe856b8de030bb4c7c75bccce7082d5478c Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 14 Feb 2019 10:21:41 +0000 Subject: Fix https://gitlab.inria.fr/GUDHI/gudhi-devel/issues/25 [python] A Cmake option to set/unset runtime_library_dirs cmake -DWITH_GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS=OFF .. # to disable runtime_library_dirs set in setup.py cf. Debian disallows setting rpath, so I'm currently unsetting runtime_library_dirs for the Python extensions. Could this perhaps be made into a CMake option? https://git.nonempty.org/debian-gudhi/tree/debian/patches/0005-Don-t-set-runtime-library-dirs-for-Python-extensions.patch?h=debian/sid&id=fed62e52ab396f0d6ba9029f12d5ef35d7761989 git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@4105 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 75f19373b2f01c2757bf1b11c81beff64021ddd8 --- src/cmake/modules/GUDHI_third_party_libraries.cmake | 2 ++ src/cython/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cmake/modules/GUDHI_third_party_libraries.cmake b/src/cmake/modules/GUDHI_third_party_libraries.cmake index cde3725c..7b0d350d 100644 --- a/src/cmake/modules/GUDHI_third_party_libraries.cmake +++ b/src/cmake/modules/GUDHI_third_party_libraries.cmake @@ -154,6 +154,8 @@ if(NOT GUDHI_CYTHON_PATH) message(FATAL_ERROR "ERROR: GUDHI_CYTHON_PATH is not valid.") endif(NOT GUDHI_CYTHON_PATH) +option(WITH_GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS "Build with setting runtime_library_dirs. Usefull when setting rpath is not allowed" ON) + if(PYTHONINTERP_FOUND AND CYTHON_FOUND) # Default found version 2 if(PYTHON_VERSION_MAJOR EQUAL 2) diff --git a/src/cython/CMakeLists.txt b/src/cython/CMakeLists.txt index dc2e9278..97859c98 100644 --- a/src/cython/CMakeLists.txt +++ b/src/cython/CMakeLists.txt @@ -198,9 +198,9 @@ if(PYTHONINTERP_FOUND) set(GUDHI_CYTHON_INCLUDE_DIRS "${GUDHI_CYTHON_INCLUDE_DIRS}'${TBB_INCLUDE_DIRS}', ") endif() - if(UNIX) + if(UNIX AND WITH_GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS) set( GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS "${GUDHI_CYTHON_LIBRARY_DIRS}") - endif(UNIX) + endif(UNIX AND WITH_GUDHI_CYTHON_RUNTIME_LIBRARY_DIRS) # Generate setup.py file to cythonize Gudhi - This file must be named setup.py by convention configure_file(setup.py.in "${CMAKE_CURRENT_BINARY_DIR}/setup.py" @ONLY) -- cgit v1.2.3