mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 18:40:38 +00:00
Drop the AGPL license in favor of a source-available license. See the blog post [1] for details. [1] https://www.scylladb.com/2024/12/18/why-were-moving-to-a-source-available-license/
49 lines
983 B
CMake
49 lines
983 B
CMake
#
|
|
# Copyright 2024-present ScyllaDB
|
|
#
|
|
|
|
#
|
|
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.0
|
|
#
|
|
|
|
find_package (PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules (PC_zstd QUIET libzstd)
|
|
|
|
find_library (zstd_LIBRARY
|
|
NAMES zstd
|
|
HINTS
|
|
${PC_zstd_LIBDIR}
|
|
${PC_zstd_LIBRARY_DIRS})
|
|
|
|
find_path (zstd_INCLUDE_DIR
|
|
NAMES zstd.h
|
|
HINTS
|
|
${PC_zstd_INCLUDEDIR}
|
|
${PC_zstd_INCLUDE_DIRS})
|
|
|
|
mark_as_advanced (
|
|
zstd_LIBRARY
|
|
zstd_INCLUDE_DIR)
|
|
|
|
include (FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args (zstd
|
|
REQUIRED_VARS
|
|
zstd_LIBRARY
|
|
zstd_INCLUDE_DIR
|
|
VERSION_VAR PC_zstd_VERSION)
|
|
|
|
if (zstd_FOUND)
|
|
set (zstd_LIBRARIES ${zstd_LIBRARY})
|
|
set (zstd_INCLUDE_DIRS ${zstd_INCLUDE_DIR})
|
|
if (NOT (TARGET zstd::libzstd))
|
|
add_library (zstd::libzstd UNKNOWN IMPORTED)
|
|
|
|
set_target_properties (zstd::libzstd
|
|
PROPERTIES
|
|
IMPORTED_LOCATION ${zstd_LIBRARY}
|
|
INTERFACE_INCLUDE_DIRECTORIES ${zstd_INCLUDE_DIR})
|
|
endif ()
|
|
endif ()
|