From 0742f761a488592c2366abccdccd8ea26fbce724 Mon Sep 17 00:00:00 2001 From: "Marcus D. Hanwell" Date: Sat, 29 Apr 2023 14:19:43 -0400 Subject: [PATCH] Set install paths from setup.py and leave rpath The rpath was actually causing issues for the delocate tool, setting the install paths from setup.py ensures that the right thing is done with the CMAKE_INSTALL_RPATH in the InstallLocation.cmake logic. Signed-off-by: Marcus D. Hanwell --- avogadro/CMakeLists.txt | 10 ---------- setup.py | 3 +++ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/avogadro/CMakeLists.txt b/avogadro/CMakeLists.txt index 6934b607d6..1d1826b4f1 100644 --- a/avogadro/CMakeLists.txt +++ b/avogadro/CMakeLists.txt @@ -31,16 +31,6 @@ function(avogadro_add_library name) "$" "$") - # Now install everything. - # SKBUILD is set for binary wheel - if (SKBUILD) - # For MACOSX - set_target_properties(${name} PROPERTIES INSTALL_NAME_DIR "@rpath") - set(INSTALL_RUNTIME_DIR avogadro) - set(INSTALL_LIBRARY_DIR avogadro) - set(INSTALL_ARCHIVE_DIR avogadro) - endif() - # Install the target and its headers. install(TARGETS ${name} EXPORT "AvogadroLibsTargets" diff --git a/setup.py b/setup.py index 7c5541f380..618f257c8f 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,9 @@ def wheel_args(): '-DUSE_HDF5:BOOL=FALSE', '-DUSE_LIBARCHIVE:BOOL=FALSE', '-DUSE_LIBMSYM:BOOL=FALSE', + '-DINSTALL_RUNTIME_DIR:PATH=avogadro', + '-DINSTALL_LIBRARY_DIR:PATH=avogadro', + '-DINSTALL_ARCHIVE_DIR:PATH=avogadro', ] + extra_cmake_args() + wheel_args() # Add pybind11 if it is installed