From: Matthias Maier Date: Wed, 23 Dec 2020 03:03:14 +0000 (-0600) Subject: CMake: FindGINKGO: recover full library paths X-Git-Tag: v9.3.0-rc1~719^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11413%2Fhead;p=dealii.git CMake: FindGINKGO: recover full library paths --- diff --git a/cmake/modules/FindGINKGO.cmake b/cmake/modules/FindGINKGO.cmake index 37648a26fe..2ab3fa18da 100644 --- a/cmake/modules/FindGINKGO.cmake +++ b/cmake/modules/FindGINKGO.cmake @@ -43,13 +43,29 @@ SET(CMAKE_MODULE_PATH ${_cmake_module_path}) # unset(GINKGO_CXX_COMPILER) +# +# We'd like to have the full library names but the Ginkgo package only +# exports a list with short names. So check again for every lib and store +# the full path: +# +SET(_libraries "") +FOREACH(_library ${GINKGO_INTERFACE_LINK_LIBRARIES}) + LIST(APPEND _libraries GINKGO_LIBRARY_${_library}) + DEAL_II_FIND_LIBRARY(GINKGO_LIBRARY_${_library} + NAMES ${_library} + HINTS ${GINKGO_INSTALL_LIBRARY_DIR} + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH + NO_CMAKE_FIND_ROOT_PATH + ) +ENDFOREACH() + DEAL_II_PACKAGE_HANDLE(GINKGO - LIBRARIES - REQUIRED GINKGO_INTERFACE_LINK_LIBRARIES - INCLUDE_DIRS - REQUIRED GINKGO_INSTALL_INCLUDE_DIR - USER_INCLUDE_DIRS - REQUIRED GINKGO_INSTALL_INCLUDE_DIR - CLEAR - Ginkgo_DIR + LIBRARIES REQUIRED ${_libraries} + INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR + USER_INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR + CLEAR Ginkgo_DIR ${_libraries} )