forked from SviatoslavKomkov/cryptoniteHmacCppWrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (27 loc) · 944 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
cmake_minimum_required(VERSION 3.05)
project(cryptonite-hmacpp VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
set(DEFAULT_BUILD_TYPE "Release")
add_definitions(-DCRYPTONITE_EXPORT=extern)
include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/core/cpp
)
add_subdirectory(src/core)
add_subdirectory(src/cryptonite)
add_subdirectory(src/tests)
if(CMAKE_BUILD_TYPE STREQUAL Release)
add_definitions(-DNDEBUG)
add_compile_options(-Werror -Wall)
add_compile_options(-O2)
add_compile_options(-march=native)
endif()
if(CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-DDEBUG)
add_compile_options(-O0 -g)
endif()
# Install library
install(TARGETS hmacpp_static cryptonite DESTINATION lib)
# Install library headers
file(GLOB HEADERS ${CMAKE_SOURCE_DIR}/src/core/cpp/*.h)
install(FILES ${HEADERS} DESTINATION include/${CMAKE_PROJECT_NAME})