From 1e47f17aad0a64a8a1d7a607869d9eee73705965 Mon Sep 17 00:00:00 2001 From: Roland Schwan Date: Thu, 31 Oct 2024 12:29:58 +0100 Subject: [PATCH] improve blasfeo find_package --- cmake/Findblasfeo.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/Findblasfeo.cmake b/cmake/Findblasfeo.cmake index d1c48c4..7742522 100644 --- a/cmake/Findblasfeo.cmake +++ b/cmake/Findblasfeo.cmake @@ -8,7 +8,7 @@ mark_as_advanced(blasfeo_INCLUDE_DIR) # Look for the library. find_library(blasfeo_LIBRARY - HINTS ${blasfeo_DIR}/lib + HINTS ${blasfeo_DIR}/lib "/opt/blasfeo/lib" NAMES blasfeo) # handle the QUIETLY and REQUIRED arguments and set blasfeo_FOUND to TRUE if @@ -16,6 +16,12 @@ find_library(blasfeo_LIBRARY include(FindPackageHandleStandardArgs) find_package_handle_standard_args(blasfeo DEFAULT_MSG blasfeo_LIBRARY blasfeo_INCLUDE_DIR) +if (NOT blasfeo_FOUND) + # try to find blasfeo installed via cmake + find_package(blasfeo CONFIG) + set(blasfeo_LIBRARIES blasfeo) +endif () + if (blasfeo_FOUND) message(STATUS "Found blasfeo: ${blasfeo_INCLUDE_DIR}") set(blasfeo_LIBRARIES ${blasfeo_LIBRARY})