XNSim/Login/test_encrypt/CMakeLists.txt

20 lines
648 B
CMake
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cmake_minimum_required(VERSION 3.16)
project(test_access_level_encrypt)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 查找依赖包
find_package(OpenSSL REQUIRED)
find_package(SQLite3 REQUIRED)
find_package(nlohmann_json 3.9.1 REQUIRED)
add_executable(test_access_level_encrypt test_access_level_encrypt.cpp)
# 包含上级目录头文件login.cpp依赖
target_include_directories(test_access_level_encrypt PRIVATE ${CMAKE_SOURCE_DIR}/..)
# 链接OpenSSL
if(OpenSSL_FOUND)
target_link_libraries(test_access_level_encrypt PRIVATE OpenSSL::SSL OpenSSL::Crypto SQLite::SQLite3 nlohmann_json::nlohmann_json)
endif()