Skip to content

Commit

Permalink
Fix rpath on linux (#122)
Browse files Browse the repository at this point in the history
* add manifest

* update manifest

* exclude __pycache__ from sdist

* add loader path

* fix termination of cmake it

* add ORIGIN to rpath

* add rpath =ORIGIN for libdistopia
  • Loading branch information
hmacdope authored Oct 24, 2022
1 parent 6bb3aea commit c6292e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions distopia/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ add_library(_distopia MODULE ${_distopia})
python_extension_module(_distopia)
target_link_libraries(_distopia libdistopia)
if(APPLE)
set_target_properties(_distopia PROPERTIES INSTALL_RPATH
"@loader_path")
set_target_properties(_distopia PROPERTIES INSTALL_RPATH "@loader_path")
else()
set_target_properties(_distopia PROPERTIES INSTALL_RPATH "\$ORIGIN")
endif()
# set_target_properties(_distopia PROPERTIES INSTALL_RPATH_USE_LINK_PATH FALSE)
install(TARGETS _distopia LIBRARY DESTINATION distopia)
1 change: 1 addition & 0 deletions libdistopia/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ set_target_properties(libdistopia

# cmake will append the name lib already , avoid liblibdistopia
set_target_properties(libdistopia PROPERTIES OUTPUT_NAME distopia)
set_target_properties(libdistopia PROPERTIES INSTALL_RPATH "\$ORIGIN")

install(TARGETS libdistopia
DESTINATION distopia)

0 comments on commit c6292e8

Please sign in to comment.