代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.9)
project(pbkdf VERSION 1.0.0 DESCRIPTION "Password-based key derivation library")
if (NOT TARGET hashing)
# Hashing functions library
add_subdirectory(extras/hashing)
endif()
set(pbkdf_src
src/pbkdf.c
)
add_library(pbkdf ${pbkdf_src})
target_link_libraries(pbkdf hashing)
target_include_directories(pbkdf PRIVATE include)
target_include_directories(pbkdf PRIVATE extras/hashing/include)
set_target_properties(pbkdf PROPERTIES
VERSION ${PROJECT_VERSION}
POSITION_INDEPENDENT_CODE 1
PUBLIC_HEADER "include/pbkdf.h"
)
if (BUILD_UTILS)
add_executable(test_pbkdf2_sha2 misc/pbkdf2_test_sha2.c)
add_executable(test_pbkdf2_sha3 misc/pbkdf2_test_sha3.c)
target_include_directories(test_pbkdf2_sha2 PRIVATE include)
target_include_directories(test_pbkdf2_sha3 PRIVATE include)
target_link_libraries(test_pbkdf2_sha2 pbkdf)
target_link_libraries(test_pbkdf2_sha3 pbkdf)
endif()
include(GNUInstallDirs)
install(TARGETS pbkdf
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
configure_file(pbkdf.pc.in pbkdf.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/pbkdf.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。