2023-12-30 22:42:11 +00:00
|
|
|
#SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
|
|
|
|
#SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2023-12-20 22:42:13 +00:00
|
|
|
find_library(Argon2_LIBRARIES argon2)
|
|
|
|
find_path(Argon2_INCLUDE_DIR argon2.h)
|
|
|
|
|
|
|
|
if (Argon2_LIBRARIES AND Argon2_INCLUDE_DIR)
|
|
|
|
set(Argon2_FOUND TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (Argon2_FOUND)
|
|
|
|
add_library(Argon2::Argon2 SHARED IMPORTED)
|
|
|
|
set_target_properties(Argon2::Argon2 PROPERTIES
|
|
|
|
IMPORTED_LOCATION "${Argon2_LIBRARIES}"
|
|
|
|
INTERFACE_LINK_LIBRARIES "${Argon2_LIBRARIES}"
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES ${Argon2_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
if (NOT Argon2_FIND_QUIETLY)
|
|
|
|
message(STATUS "Found Argon2 includes: ${Argon2_INCLUDE_DIR}")
|
|
|
|
message(STATUS "Found Argon2 library: ${Argon2_LIBRARIES}")
|
|
|
|
endif ()
|
|
|
|
else ()
|
|
|
|
if (Argon2_FIND_REQUIRED)
|
|
|
|
message(FATAL_ERROR "Could NOT find Argon2 development files")
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|