Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set RPATH to $ORIGIN so shared objects can be found after installation #28

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ include_directories(deps/dnp3/cpp/libs/src)
include_directories(deps/dnp3/deps/asio/asio/include)
add_definitions(-DASIO_STANDALONE)

# Linux only!
# target_link_options has a bug for "$"; see
# https://discourse.cmake.org/t/how-not-to-have-dollar-sign-in-target-link-options-mangled/3939/5
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-rpath=$ORIGIN")

pybind11_add_module(pydnp3 MODULE src/pydnp3.cpp src/pydnp3asiodnp3.cpp src/pydnp3asiopal.cpp src/pydnp3opendnp3.cpp src/pydnp3openpal.cpp)
target_link_libraries(pydnp3 PRIVATE asiopal asiodnp3 openpal opendnp3)

Expand Down