b504a9bfae
Change-Id: I6bb27650f74372dae6e29c79fd6bb2022cc062fe
62 wiersze
2.9 KiB
Plaintext
62 wiersze
2.9 KiB
Plaintext
# Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All rights reserved.
|
|
#
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
# in the Software without restriction, including without limitation the rights
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
# furnished to do so, subject to the following conditions:
|
|
#
|
|
# The above copyright notice and this permission notice shall be included in
|
|
# all copies or substantial portions of the Software.
|
|
#
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
# THE SOFTWARE.
|
|
|
|
cmake_minimum_required(VERSION 2.8.3)
|
|
project(hip_samples)
|
|
|
|
install(DIRECTORY @hip_SOURCE_DIR@/samples DESTINATION .)
|
|
|
|
#############################
|
|
# Packaging steps
|
|
#############################
|
|
set(CPACK_SET_DESTDIR TRUE)
|
|
set(CPACK_INSTALL_PREFIX @CPACK_INSTALL_PREFIX@ )
|
|
set(CPACK_PACKAGE_NAME "hip-samples")
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "HIP: Heterogenous-computing Interface for Portability [SAMPLES]")
|
|
set(CPACK_PACKAGE_DESCRIPTION "HIP:
|
|
Heterogenous-computing Interface for Portability [SAMPLES]")
|
|
set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc.")
|
|
set(CPACK_PACKAGE_CONTACT "HIP Support <hip.support@amd.com>")
|
|
set(CPACK_PACKAGE_VERSION_MAJOR @HIP_VERSION_MAJOR@)
|
|
set(CPACK_PACKAGE_VERSION_MINOR @HIP_VERSION_MINOR@)
|
|
set(CPACK_PACKAGE_VERSION_PATCH @HIP_VERSION_PATCH@)
|
|
set(CPACK_PACKAGE_VERSION @HIP_VERSION_MAJOR@.@HIP_VERSION_MINOR@.@HIP_PACKAGING_VERSION_PATCH@)
|
|
set(CPACK_GENERATOR "TGZ;DEB;RPM")
|
|
|
|
set(CPACK_BINARY_DEB "ON")
|
|
set(CPACK_DEBIAN_PACKAGE_RELEASE @CPACK_DEBIAN_PACKAGE_RELEASE@)
|
|
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")
|
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "hip-base (= ${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE})")
|
|
set(CPACK_DEBIAN_PACKAGE_PROVIDES "hip-samples")
|
|
set(CPACK_DEBIAN_PACKAGE_REPLACES "hip_samples")
|
|
|
|
set(CPACK_BINARY_RPM "ON")
|
|
set(CPACK_RPM_PACKAGE_RELEASE @CPACK_RPM_PACKAGE_RELEASE@)
|
|
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
|
|
set(CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
|
|
set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
|
|
string(REPLACE "-" "_" HIP_BASE_VERSION ${CPACK_PACKAGE_VERSION})
|
|
set(CPACK_RPM_PACKAGE_REQUIRES "hip-base = ${HIP_BASE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}")
|
|
set(CPACK_RPM_PACKAGE_OBSOLETES "hip_samples")
|
|
set(CPACK_RPM_PACKAGE_CONFLICTS "hip_samples")
|
|
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/opt")
|
|
set(CPACK_SOURCE_GENERATOR "TGZ")
|
|
include(CPack)
|