1 Star 0 Fork 0

loswdarmy/pbkdf2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMakeLists.txt 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
CryptoManiac 提交于 2021-12-17 10:05 . Don't build executables by default
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)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/loswdarmy/pbkdf2.git
git@gitee.com:loswdarmy/pbkdf2.git
loswdarmy
pbkdf2
pbkdf2
master

搜索帮助