Files
scylladb/cmake/Findcryptopp.cmake
Avi Kivity f3eade2f62 treewide: relicense to ScyllaDB-Source-Available-1.0
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/
2024-12-18 17:45:13 +02:00

36 lines
857 B
CMake

#
# Copyright (C) 2018-present ScyllaDB
#
# SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.0 and Apache-2.0)
#
find_library (cryptopp_LIBRARY
NAMES cryptopp)
find_path (cryptopp_INCLUDE_DIR
NAMES cryptopp/aes.h
PATH_SUFFIXES cryptopp)
mark_as_advanced (
cryptopp_LIBRARY
cryptopp_INCLUDE_DIR)
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (cryptopp
REQUIRED_VARS
cryptopp_LIBRARY
cryptopp_INCLUDE_DIR)
set (cryptopp_LIBRARIES ${cryptopp_LIBRARY})
set (cryptopp_INCLUDE_DIRS ${cryptopp_INCLUDE_DIR})
if (cryptopp_FOUND AND NOT (TARGET cryptopp::cryptopp))
add_library (cryptopp::cryptopp UNKNOWN IMPORTED)
set_target_properties (cryptopp::cryptopp
PROPERTIES
IMPORTED_LOCATION ${cryptopp_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${cryptopp_INCLUDE_DIRS})
endif ()