27 lines
759 B
CMake
27 lines
759 B
CMake
|
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 ()
|
||
|
|
||
|
|