-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
43 lines (32 loc) · 1.36 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(BitcoinMessagingSystem)
# Set version number
SET(MAJOR_VERSION 1)
SET(MINOR_VERSION 0)
# Add source directory
ADD_SUBDIRECTORY(src)
# Find required packages
FIND_PACKAGE(Boost COMPONENTS system filesystem unit_test_framework)
IF(Boost_FOUND)
ADD_SUBDIRECTORY(src/test)
ENDIF()
IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
INCLUDE(InstallRequiredSystemLibraries)
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
SET(CPACK_GENERATOR "PackageMaker")
SET(CPACK_PACKAGING_INSTALL_PREFIX "/opt/local")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
# Set description
SET(CPACK_PACKAGE_DESCRIPTION "A messaging system for communication over Bitcoin's blockchain.")
SET(CPACK_PACKAGE_VENDOR "Krzysztof Okupski")
SET(CPACK_PACKAGE_CONTACT "Krzysztof Okupski <k.okupski@gmail.com>")
SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}")
SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")