forked from HBPVIS/ZeroEQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (60 loc) · 2.21 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright (c) HBP 2014-2017 [email protected]
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(ZeroEQ VERSION 0.9.0)
set(ZeroEQ_VERSION_ABI 9)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/common)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/CMake/common/Common.cmake)
message(FATAL_ERROR "CMake/common missing, run: git submodule update --init")
endif()
set(ZEROEQ_DEB_DEPENDS
libboost-test-dev
libzmq3-dev
# cppnetlib dependencies
libboost-atomic-dev
libboost-chrono-dev
libboost-date-time-dev
libboost-filesystem-dev
libboost-program-options-dev
libboost-regex-dev
libboost-system-dev
libboost-thread-dev
libssl-dev
)
include(Common)
set(COMMON_PROJECT_DOMAIN eu.humanbrainproject)
set(ZEROEQ_DESCRIPTION "ZeroEQ - Zero Event Queue")
set(ZEROEQ_MAINTAINER "Human Brain Project <[email protected]>")
set(ZEROEQ_LICENSE LGPL)
set(ZEROEQ_DEPENDENT_LIBRARIES Servus)
if(NOT MSVC)
option(CPP-NETLIB_BUILD_SHARED_LIBS "Build cpp-netlib as shared libraries." ON)
endif()
option(CPP-NETLIB_BUILD_TESTS "Build the cpp-netlib project tests." OFF)
option(CPP-NETLIB_BUILD_EXAMPLES "Build the cpp-netlib project examples." OFF)
common_find_package(Boost SYSTEM COMPONENTS unit_test_framework)
if(Boost_VERSION GREATER 105799)
add_subproject(cppnetlib ${PROJECT_SOURCE_DIR}/cppnetlib) # from .gitmodules
common_find_package(cppnetlib SYSTEM NO_DEFAULT_PATH)
endif()
if(TARGET libzmq)
set(ZeroMQ_LIBRARY libzmq)
else()
common_find_package(ZeroMQ) # new-ish CMake-based build
if(NOT ZeroMQ_FOUND)
common_find_package(libzmq 4 REQUIRED) # old-ish autopain/pkgconfig build
set(ZeroMQ_LIBRARY ${libzmq_LIBRARIES})
endif()
endif()
common_find_package(Servus REQUIRED)
common_find_package(Threads REQUIRED)
common_find_package_post()
set(LCOV_EXCLUDE "zeroeq/http/jsoncpp/*;cppnetlib/boost/network/*;cppnetlib/libs/network/src/uri/*")
add_subdirectory(zeroeq)
add_subdirectory(tests)
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
set(ZEROEQ_PACKAGE_DEB_DEPENDS ${ZEROEQ_DEB_DEPENDS})
include(CommonCPack)
set(DOXYGEN_MAINPAGE_MD README.md)
set(DOXYGEN_EXTRA_INPUT ${PROJECT_SOURCE_DIR}/README.md)
include(DoxygenRule)