-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
53 lines (36 loc) · 1.14 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
cmake_minimum_required (VERSION 2.8.3)
## Project Metadata
project (zmqcpp)
set (zmqcpp_VERSION_MAJOR 1)
set (zmqcpp_VERSION_MINOR 1)
set (zmqcpp_VERSION_PATCH 0)
set (zmqcpp_VERSION "${zmqcpp_VERSION_MAJOR}.${zmqcpp_VERSION_MINOR}.${zmqcpp_VERSION_PATCH}")
## Configuration
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wno-long-long -pedantic")
include_directories(
${zmqcpp_SOURCE_DIR}/include
${zmqcpp_BINARY_DIR}
)
install(DIRECTORY ${zmqcpp_SOURCE_DIR}/include
DESTINATION include
)
set(PKGCONFIG_FILE ${zmqcpp_BINARY_DIR}/zmqcpp.pc)
configure_file(zmqcpp.pc.cmake ${PKGCONFIG_FILE} @ONLY)
install(FILES ${PKGCONFIG_FILE}
DESTINATION lib/pkgconfig
)
install(FILES include/zmqcpp.h
DESTINATION include
)
## Testing
enable_testing()
add_subdirectory(test)
## Report
message("** Build Summary **")
message(" Version: ${zmqcpp_VERSION}")
message(" Prefix: ${CMAKE_INSTALL_PREFIX}")
message(" Build Type: ${CMAKE_BUILD_TYPE}")
message(" Architecture: ${CMAKE_SYSTEM_PROCESSOR}")