-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
39 lines (30 loc) · 1006 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
39
# cmake version to be used
cmake_minimum_required(VERSION 3.5)
# project name
project(NDNREVOKE)
# flags
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)
if (HAVE_TESTS)
add_compile_definitions(NDNREVOKE_HAVE_TESTS)
endif(HAVE_TESTS)
# dependencies
find_package(PkgConfig REQUIRED)
pkg_check_modules(NDN_CXX REQUIRED libndn-cxx)
pkg_check_modules(CERT_LEDGER REQUIRED libcert-ledger)
find_package(SQLite3 REQUIRED)
find_package(OpenSSL REQUIRED)
# files
file(GLOB_RECURSE NDNREVOKE_LIB_SOURCE_FILES "src/*.cpp" "src/**/*.cpp")
# include
include_directories(${NDN_CXX_INCLUDE_DIRS})
include_directories(src)
include_directories(build/src)
# link
link_directories(${NDN_CXX_LIBRARY_DIRS})
# target
add_library(ndn-revoke SHARED ${NDNREVOKE_LIB_SOURCE_FILES})
target_compile_options(ndn-revoke PUBLIC ${NDN_CXX_CFLAGS} ${CERT_LEDGER_CFLAGS})
target_link_libraries(ndn-revoke PUBLIC ${NDN_CXX_LIBRARIES} ${CERT_LEDGER_LIBRARIES})
add_subdirectory(tests)
add_subdirectory(examples)