Skip to content

Commit

Permalink
Merge pull request #1745 from ERGO-Code/rpath-bin
Browse files Browse the repository at this point in the history
add rpath to binary
  • Loading branch information
galabovaa committed May 7, 2024
2 parents b29d344 + a946666 commit 99445c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/CMakeLists.txt
Expand Up @@ -29,6 +29,14 @@ if(FAST_BUILD)

target_link_libraries(highs-bin highs)

if(APPLE)
set_target_properties(highs-bin PROPERTIES INSTALL_RPATH
"@loader_path/../${CMAKE_INSTALL_LIBDIR};@loader_path")
elseif (UNIX)
set_target_properties(highs-bin PROPERTIES INSTALL_RPATH
"$ORIGIN:$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
endif()

# install the binary
install(TARGETS highs-bin EXPORT highs-targets
RUNTIME)
Expand Down

0 comments on commit 99445c7

Please sign in to comment.