Skip to content

Commit

Permalink
improve blasfeo find_package
Browse files Browse the repository at this point in the history
  • Loading branch information
RSchwan committed Oct 31, 2024
1 parent 533190e commit 1e47f17
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/Findblasfeo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ 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
# all listed variables are TRUE
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})
Expand Down

0 comments on commit 1e47f17

Please sign in to comment.