Files
scylladb/cmake/Findcryptopp.cmake
Avi Kivity 0ae22a09d4 LICENSE: Update to version 1.1
Updated terms of non-commercial use (must be a never-customer).
2026-04-12 19:46:33 +03:00

36 lines
857 B
CMake

#
# Copyright (C) 2018-present ScyllaDB
#
# SPDX-License-Identifier: (LicenseRef-ScyllaDB-Source-Available-1.1 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 ()