Skip to content

Commit 9c6882d

Browse files
committed
Revert "fix: move link dir to find package"
This reverts commit 115e589.
1 parent 115e589 commit 9c6882d

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ python_add_library(py_gd MODULE "${py_gd_c}" WITH_SOABI)
1616
target_link_libraries(py_gd PUBLIC GD::GD Python::NumPy)
1717
install(TARGETS py_gd DESTINATION py_gd)
1818

19+
get_filename_component(GD_LIBRARY_DIR "${GD_LIBRARIES}" DIRECTORY)
20+
set_target_properties(py_gd PROPERTIES INSTALL_RPATH "${GD_LIBRARY_DIR}")
21+
1922
cython_transpile(py_gd/spline.pyx LANGUAGE C OUTPUT_VARIABLE spline_c)
2023
python_add_library(spline MODULE "${spline_c}" WITH_SOABI)
2124
target_link_libraries(spline PUBLIC Python::NumPy)

cmake/FindGD.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ find_library(GD_LIBRARY
1717

1818
cmake_path(ABSOLUTE_PATH GD_LIBRARY)
1919
cmake_path(ABSOLUTE_PATH GD_INCLUDE_DIR)
20-
get_filename_component(GD_LIBRARY_DIR "${GD_LIBRARIES}" DIRECTORY)
2120

2221
message (STATUS "libgd found at ${GD_LIBRARY}, ${GD_INCLUDE_DIR}")
2322

@@ -41,7 +40,6 @@ if(GD_FOUND AND NOT TARGET GD::GD)
4140
IMPORTED_LOCATION "${GD_LIBRARY}"
4241
INTERFACE_COMPILE_OPTIONS "${PC_GD_CFLAGS_OTHER}"
4342
INTERFACE_INCLUDE_DIRECTORIES "${GD_INCLUDE_DIR}"
44-
INTERFACE_LINK_DIRECTORIES "${GD_LIBRARY_DIR}"
4543
)
4644
endif()
4745

0 commit comments

Comments
 (0)