Skip to content

Commit 65ade25

Browse files
committed
eigenpyConfig.cmake: find absolute library paths for all required libs
As cmake expects absolute library paths, while pkgconfig provides lib names only (together with LIBRARY_DIRS), one needs to find the full library path. This fixes 7854c0f.
1 parent d07cd61 commit 65ade25

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

eigenpyConfig.cmake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,13 @@ cmake_minimum_required(VERSION 2.8.3)
22

33
message(STATUS "Loading eigenpy from PkgConfig")
44

5-
find_package(PkgConfig)
5+
find_package(PkgConfig REQUIRED)
66
pkg_check_modules(eigenpy REQUIRED eigenpy)
7+
8+
# find absolute library paths for all eigenpy_LIBRARIES
9+
set(libs ${eigenpy_LIBRARIES})
10+
set(eigenpy_LIBRARIES "")
11+
foreach(lib ${libs})
12+
find_library(abs_lib_${lib} ${lib} HINTS ${eigenpy_LIBRARY_DIRS})
13+
list(APPEND eigenpy_LIBRARIES "${abs_lib_${lib}}")
14+
endforeach()

0 commit comments

Comments
 (0)