Skip to content

Commit

Permalink
Set install paths from setup.py and leave rpath
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cryos committed Apr 30, 2023
1 parent 58d2c83 commit 0742f76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 0 additions & 10 deletions avogadro/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ function(avogadro_add_library name)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
"$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>")

# 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"
Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 0742f76

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERROR: clang-format-diff detected formatting issues. See the artifact for a patch or run clang-format on your branch.

Please sign in to comment.