mirror of
https://github.com/steve-m/hsdaoh.git
synced 2026-01-28 01:07:19 +01:00
Typically, this CRC16 implementation is even faster, as it uses 32 bit SSE calculations and then trucates the output to 16 bits. Also comes with AVX-512 support. https://github.com/awesomized/crc-fast-rust
20 lines
493 B
CMake
20 lines
493 B
CMake
find_path(CRCFAST_INCLUDE_DIR
|
|
NAMES libcrc_fast.h
|
|
)
|
|
|
|
find_library(CRCFAST_LIBRARY
|
|
NAMES crc_fast
|
|
)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(CRCFAST
|
|
REQUIRED_VARS CRCFAST_LIBRARY CRCFAST_INCLUDE_DIR
|
|
)
|
|
|
|
if(CRCFAST_FOUND)
|
|
add_library(CRCFAST::CRCFAST UNKNOWN IMPORTED)
|
|
set_target_properties(CRCFAST::CRCFAST PROPERTIES
|
|
IMPORTED_LOCATION "${CRCFAST_LIBRARY}"
|
|
INTERFACE_INCLUDE_DIRECTORIES "${CRCFAST_INCLUDE_DIR}"
|
|
)
|
|
endif()
|