From 65ade259193c85c79701530bae70f80bc3af05d8 Mon Sep 17 00:00:00 2001
From: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
Date: Fri, 8 Nov 2019 15:32:23 +0800
Subject: [PATCH] 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.
---
 eigenpyConfig.cmake | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/eigenpyConfig.cmake b/eigenpyConfig.cmake
index 468431b5..d39ef7d8 100644
--- a/eigenpyConfig.cmake
+++ b/eigenpyConfig.cmake
@@ -2,5 +2,13 @@ cmake_minimum_required(VERSION 2.8.3)
 
 message(STATUS "Loading eigenpy from PkgConfig")
 
-find_package(PkgConfig)
+find_package(PkgConfig REQUIRED)
 pkg_check_modules(eigenpy REQUIRED eigenpy)
+
+# find absolute library paths for all eigenpy_LIBRARIES
+set(libs ${eigenpy_LIBRARIES})
+set(eigenpy_LIBRARIES "")
+foreach(lib ${libs})
+  find_library(abs_lib_${lib} ${lib} HINTS ${eigenpy_LIBRARY_DIRS})
+  list(APPEND eigenpy_LIBRARIES "${abs_lib_${lib}}")
+endforeach()
-- 
GitLab