-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
39 lines (29 loc) · 972 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# https://github.com/rodlie/verifyrsa
# BSD 3-Clause License
cmake_minimum_required(VERSION 2.8)
project(VerifyRSA)
option(BUILD_SHARED_LIBS "Build Shared Libraries" ON)
set(LIB_TYPE STATIC)
if(BUILD_SHARED_LIBS)
set(LIB_TYPE SHARED)
endif(BUILD_SHARED_LIBS)
if(COMPILER_MSVC)
add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-DEXPORT_DLL)
endif()
add_library(VerifyRSA ${LIB_TYPE} verifyrsa.cpp)
find_package(OpenSSL REQUIRED)
target_link_libraries(VerifyRSA OpenSSL::SSL)
include(GenerateExportHeader)
GENERATE_EXPORT_HEADER( VerifyRSA
BASE_NAME VerifyRSA
EXPORT_MACRO_NAME VerifyRSA_EXPORT
EXPORT_FILE_NAME VerifyRSA_Export.h
STATIC_DEFINE VerifyRSA_BUILT_AS_STATIC
)
add_executable(rsa-sign rsa-sign.cpp)
target_link_libraries(rsa-sign VerifyRSA)
add_executable(rsa-verify rsa-verify.cpp)
target_link_libraries(rsa-verify VerifyRSA)
add_executable(rsa-generate rsa-generate.cpp)
target_link_libraries(rsa-generate VerifyRSA)