-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
30 lines (26 loc) · 1.07 KB
/
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
cmake_minimum_required(VERSION 3.5.0)
project(PhigrosLibrary)
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/MT)
endif()
set(ENABLE_COMMONCRYPTO OFF CACHE BOOL ENABLE_COMMONCRYPTO)
set(ENABLE_GNUTLS OFF CACHE BOOL ENABLE_GNUTLS)
set(ENABLE_MBEDTLS OFF CACHE BOOL ENABLE_MBEDTLS)
set(ENABLE_OPENSSL OFF CACHE BOOL ENABLE_OPENSSL)
set(ENABLE_WINDOWS_CRYPTO OFF CACHE BOOL ENABLE_WINDOWS_CRYPTO)
set(ENABLE_BZIP2 OFF CACHE BOOL ENABLE_BZIP2)
set(ENABLE_LZMA OFF CACHE BOOL ENABLE_LZMA)
set(ENABLE_ZSTD OFF CACHE BOOL ENABLE_ZSTD)
set(BUILD_TOOLS OFF CACHE BOOL BUILD_TOOLS)
set(BUILD_REGRESS OFF CACHE BOOL BUILD_REGRESS)
set(BUILD_DOC OFF CACHE BOOL BUILD_DOC)
set(BUILD_SHARED_LIBS OFF CACHE BOOL BUILD_SHARED_LIBS)
set(LIBZIP_DO_INSTALL OFF CACHE BOOL LIBZIP_DO_INSTALL)
add_subdirectory(libzip)
include_directories(src)
add_library(phigros SHARED src/cJSON.c src/save.c src/phigros.cxx)
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
target_link_libraries(phigros zip ../../libssl ../../libcrypto Ws2_32 Crypt32)
else()
target_link_libraries(phigros zip ssl crypto)
endif()