Skip to content

Commit 115e589

Browse files
committed
fix: move link dir to find package
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 16b5138 commit 115e589

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ 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-
2219
cython_transpile(py_gd/spline.pyx LANGUAGE C OUTPUT_VARIABLE spline_c)
2320
python_add_library(spline MODULE "${spline_c}" WITH_SOABI)
2421
target_link_libraries(spline PUBLIC Python::NumPy)

cmake/FindGD.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ 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)
2021

2122
message (STATUS "libgd found at ${GD_LIBRARY}, ${GD_INCLUDE_DIR}")
2223

@@ -40,6 +41,7 @@ if(GD_FOUND AND NOT TARGET GD::GD)
4041
IMPORTED_LOCATION "${GD_LIBRARY}"
4142
INTERFACE_COMPILE_OPTIONS "${PC_GD_CFLAGS_OTHER}"
4243
INTERFACE_INCLUDE_DIRECTORIES "${GD_INCLUDE_DIR}"
44+
INTERFACE_LINK_DIRECTORIES "${GD_LIBRARY_DIR}"
4345
)
4446
endif()
4547

0 commit comments

Comments
 (0)