forked from hyperledger-iroha/iroha-dco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.cmake
50 lines (38 loc) · 1.34 KB
/
release.cmake
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
INCLUDE(InstallRequiredSystemLibraries)
if(PACKAGE_TGZ)
list(APPEND CPACK_GENERATOR TGZ)
endif()
if(PACKAGE_ZIP)
list(APPEND CPACK_GENERATOR ZIP)
endif()
set(CPACK_PACKAGE_NAME "iroha")
set(CPACK_PACKAGE_VENDOR "Soramitsu LLC")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Iroha - simple decentralized blockchain")
SET(CPACK_PACKAGE_VENDOR "Soramitsu LLC")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
SET(CPACK_PACKAGE_CONTACT "Bogdan Vaneev <[email protected]>")
if(NOT IROHA_VERSION)
message(WARNING "IROHA_VERSION is not specified, using commit hash as version")
get_git_revision(GIT_SHA1)
remove_line_terminators(${GIT_SHA1} GIT_SHA1)
set(IROHA_VERSION "0x${GIT_SHA1}")
endif()
SET(CPACK_PACKAGE_VERSION ${IROHA_VERSION})
message(STATUS "[IROHA_VERSION] '${IROHA_VERSION}'")
SET(CPACK_STRIP_FILES TRUE)
set(CPACK_COMPONENTS_ALL binaries libraries)
if (APPLE)
# cmake is running on mac os
message(WARNING "On OSX only TGZ/ZIP packaging is supported")
elseif(UNIX)
# cmake is running on unix
if(PACKAGE_DEB)
include(cmake/release/linux/deb/iroha.cmake)
endif()
if(PACKAGE_RPM)
include(cmake/release/linux/rpm/iroha.cmake)
endif()
else()
message(WARNING "Packaging is supported only for APPLE and UNIX operating systems.")
endif()
INCLUDE(CPack)