Skip to content

Commit

Permalink
Try using RPATHs for linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanUnderhill committed Feb 21, 2025
1 parent 059bb01 commit 44d7bfe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set_target_properties(onnxruntime-genai PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(onnxruntime-genai PROPERTIES INSTALL_RPATH "$ORIGIN" BUILD_WITH_INSTALL_RPATH TRUE)
target_link_libraries(onnxruntime-genai PRIVATE dl) # For dlopen & co
endif()

Expand Down
1 change: 0 additions & 1 deletion src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ if(BUILD_WHEEL)
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/package_description.md" DESTINATION ${WHEEL_FILES_DIR}/)
file(COPY "${CMAKE_SOURCE_DIR}/ThirdPartyNotices.txt" DESTINATION ${WHEEL_TARGET_NAME}/)
file(COPY "${CMAKE_SOURCE_DIR}/LICENSE" DESTINATION ${WHEEL_TARGET_NAME}/)

add_custom_command(TARGET python POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${ortgenai_embed_libs} $<TARGET_FILE:python>
Expand Down

0 comments on commit 44d7bfe

Please sign in to comment.