Skip to content

Commit

Permalink
fix find_library variable cacheing
Browse files Browse the repository at this point in the history
  • Loading branch information
RSchwan committed Nov 1, 2024
1 parent afadc9c commit 239223c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,14 @@ else ()
endif ()

function(CREATE_BLASFEO_LIBRARY library_name library_dir)
find_library(library_lib NAMES blasfeo HINTS "${library_dir}/lib")
set(lib_var "${library_name}_lib")
find_library(${lib_var} NAMES blasfeo HINTS "${library_dir}/lib")

add_library(${library_name} UNKNOWN IMPORTED)
set_target_properties(${library_name} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${library_dir}/include")
set_property(TARGET ${library_name} APPEND PROPERTY IMPORTED_LOCATION "${library_lib}")
set_property(TARGET ${library_name} APPEND PROPERTY IMPORTED_LOCATION "${${lib_var}}")

message(STATUS "Found ${library_name}: ${library_dir}/include ${library_lib}")
message(STATUS "Found ${library_name}: ${library_dir}/include ${${lib_var}}")
endfunction()

if (BUILD_WITH_BLASFEO)
Expand Down

0 comments on commit 239223c

Please sign in to comment.