mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
Optionally use system jerasure and add Bullseye CI
This commit is contained in:
parent
9200c0b893
commit
03c82ea515
7 changed files with 115 additions and 31 deletions
26
cmake/FindJerasure.cmake
Normal file
26
cmake/FindJerasure.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Provides Jerasure::Jerasure
|
||||
|
||||
find_path(Jerasure_INCLUDE_DIR NAMES jerasure.h)
|
||||
find_path(Jerasure_INCLUDE_DIR2 NAMES galois.h PATH_SUFFIXES jerasure)
|
||||
find_library(Jerasure_LIBRARY NAMES Jerasure)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Jerasure
|
||||
FOUND_VAR Jerasure_FOUND
|
||||
REQUIRED_VARS
|
||||
Jerasure_LIBRARY
|
||||
Jerasure_INCLUDE_DIR
|
||||
Jerasure_INCLUDE_DIR2
|
||||
)
|
||||
|
||||
if(Jerasure_FOUND)
|
||||
set(Jerasure_LIBRARIES ${Jerasure_LIBRARY})
|
||||
set(Jerasure_INCLUDE_DIRS ${Jerasure_INCLUDE_DIR} ${Jerasure_INCLUDE_DIR2})
|
||||
if(NOT TARGET Jerasure::Jerasure)
|
||||
add_library(Jerasure::Jerasure UNKNOWN IMPORTED)
|
||||
set_target_properties(Jerasure::Jerasure PROPERTIES
|
||||
IMPORTED_LOCATION "${Jerasure_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Jerasure_INCLUDE_DIRS}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue