-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathpackaging.cmake
60 lines (47 loc) · 1.96 KB
/
packaging.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
51
52
53
54
55
56
57
58
59
60
#
# Copyright 2020 Toyota Connected North America
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(CPACK_GENERATOR "TGZ;RPM;DEB")
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(CPACK_PACKAGE_NAME ${EXE_OUTPUT_NAME}-dbg)
else ()
set(CPACK_PACKAGE_NAME ${EXE_OUTPUT_NAME})
endif ()
set(CPACK_DEFAULT_PACKAGE_DESCRIPTION_SUMMARY "${EXE_OUTPUT_NAME} - ${CMAKE_BUILD_TYPE}")
set(CPACK_PACKAGE_VENDOR "Toyota Connected North America")
set(CPACK_PACKAGE_CONTACT "[email protected]")
set(CPACK_VERBATIM_VARIABLES YES)
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/_packages")
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
set(CPACK_DEB_COMPONENT_INSTALL YES)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Joel Winarske <[email protected]>")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS NO)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_RPM_COMPONENT_INSTALL YES)
set(CPACK_RPM_FILE_NAME RPM-DEFAULT)
set(CPACK_RPM_PACKAGE_LICENSE "Apache-2.0")
set(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}")
set(CPACK_RPM_PACKAGE_DESCRIPTION "${CPACK_DEFAULT_PACKAGE_DESCRIPTION_SUMMARY}")
set(CPACK_TGZ_FILE_NAME TGZ-DEFAULT)
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
set(CPACK_STRIP_FILES ${EXE_OUTPUT_NAME})
endif ()
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
set(CMAKE_RPM_DEBUGINFO_PACKAGE ON)
set(CMAKE_TGZ_DEBUGINFO_PACKAGE ON)
endif ()
include(CPack)