forked from ethereum/cable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCablePackage.cmake
28 lines (26 loc) · 954 Bytes
/
CablePackage.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
# Cable: CMake Bootstrap Library.
# Copyright 2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
if(cable_package_included)
return()
endif()
set(cable_package_included TRUE)
# Configures CPack to build the archive package.
macro(cable_add_archive_package)
if(WIN32)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
else()
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
endif()
string(TOLOWER ${CMAKE_SYSTEM_NAME} system_name)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} system_processor)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-${system_name}-${system_processor})
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-source)
set(CPACK_PACKAGE_CHECKSUM SHA256)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY FALSE)
unset(system_name)
unset(system_processor)
include(CPack)
endmacro()