2017-08-14 04:29:53 +00:00
|
|
|
# - Find zstd
|
|
|
|
# Find the zstd compression library and includes
|
|
|
|
#
|
2019-08-06 02:47:33 +00:00
|
|
|
# zstd_INCLUDE_DIRS - where to find zstd.h, etc.
|
|
|
|
# zstd_LIBRARIES - List of libraries when using zstd.
|
|
|
|
# zstd_FOUND - True if zstd found.
|
2017-08-14 04:29:53 +00:00
|
|
|
|
2019-08-06 02:47:33 +00:00
|
|
|
find_path(zstd_INCLUDE_DIRS
|
2017-08-14 04:29:53 +00:00
|
|
|
NAMES zstd.h
|
2019-08-06 02:47:33 +00:00
|
|
|
HINTS ${zstd_ROOT_DIR}/include)
|
2017-08-14 04:29:53 +00:00
|
|
|
|
2019-08-06 02:47:33 +00:00
|
|
|
find_library(zstd_LIBRARIES
|
2017-08-14 04:29:53 +00:00
|
|
|
NAMES zstd
|
2019-08-06 02:47:33 +00:00
|
|
|
HINTS ${zstd_ROOT_DIR}/lib)
|
2017-08-14 04:29:53 +00:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2024-01-25 20:35:27 +00:00
|
|
|
find_package_handle_standard_args(zstd DEFAULT_MSG zstd_LIBRARIES ZSTD_INCLUDE_DIRS)
|
2017-08-14 04:29:53 +00:00
|
|
|
|
|
|
|
mark_as_advanced(
|
2019-08-06 02:47:33 +00:00
|
|
|
zstd_LIBRARIES
|
|
|
|
zstd_INCLUDE_DIRS)
|
|
|
|
|
|
|
|
if(zstd_FOUND AND NOT (TARGET zstd::zstd))
|
|
|
|
add_library (zstd::zstd UNKNOWN IMPORTED)
|
|
|
|
set_target_properties(zstd::zstd
|
|
|
|
PROPERTIES
|
|
|
|
IMPORTED_LOCATION ${zstd_LIBRARIES}
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES ${zstd_INCLUDE_DIRS})
|
|
|
|
endif()
|