generate .zip package with ocloc on Windows

Related-To: NEO-5417

Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk 2021-03-02 18:05:11 +01:00 committed by Compute-Runtime-Automation
parent dca33e10ec
commit 85b72563f4
3 changed files with 40 additions and 11 deletions

View File

@ -14,7 +14,7 @@ components:
infra:
branch: infra
dest_dir: infra
revision: 6ca4868d24ef3aa24efca8efc444a8050d553318
revision: 1d7afe0385e1c41956475d328d38a8d604006291
type: git
internal:
branch: master

View File

@ -4,6 +4,24 @@
# SPDX-License-Identifier: MIT
#
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_PACKAGE_ARCHITECTURE "x86_64")
else()
set(CPACK_PACKAGE_ARCHITECTURE "x86")
endif()
set(CPACK_PACKAGE_RELOCATABLE FALSE)
set(CPACK_PACKAGE_NAME "intel")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Intel(R) Graphics Compute Runtime")
set(CPACK_PACKAGE_VENDOR "Intel")
if(NEO_BUILD_L0_PACKAGE)
set(CPACK_PACKAGE_VERSION_MAJOR ${NEO_L0_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${NEO_L0_VERSION_MINOR})
else()
set(CPACK_PACKAGE_VERSION_MAJOR ${NEO_OCL_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${NEO_OCL_VERSION_MINOR})
endif()
set(CPACK_PACKAGE_VERSION_PATCH ${NEO_VERSION_BUILD})
if(UNIX)
set(package_input_dir ${NEO_BINARY_DIR}/packageinput)
set(package_output_dir ${NEO_BINARY_DIR}/packages)
@ -72,14 +90,6 @@ if(UNIX)
endif()
set(CPACK_SET_DESTDIR TRUE)
set(CPACK_PACKAGE_ARCHITECTURE "x86_64")
set(CPACK_PACKAGE_RELOCATABLE FALSE)
set(CPACK_PACKAGE_NAME "intel")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Intel(R) Graphics Compute Runtime")
set(CPACK_PACKAGE_VENDOR "Intel")
set(CPACK_PACKAGE_VERSION_MAJOR ${NEO_OCL_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${NEO_OCL_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${NEO_VERSION_BUILD})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "postinst;postrm")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://01.org/compute-runtime")
@ -104,8 +114,6 @@ if(UNIX)
get_property(CPACK_COMPONENTS_ALL GLOBAL PROPERTY NEO_OCL_COMPONENTS_LIST)
endif()
if(NEO_BUILD_L0_PACKAGE)
set(CPACK_PACKAGE_VERSION_MAJOR ${NEO_L0_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${NEO_L0_VERSION_MINOR})
get_property(CPACK_COMPONENTS_ALL GLOBAL PROPERTY NEO_L0_COMPONENTS_LIST)
endif()
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
@ -192,4 +200,10 @@ if(UNIX)
if(__HAS_PARENT)
set(NEO__COMPONENT_NAME "opencl" PARENT_SCOPE)
endif()
elseif(WIN32)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL ocloc)
set(CPACK_ARCHIVE_OCLOC_FILE_NAME "ocloc-${NEO_OCL_VERSION_MAJOR}.${NEO_OCL_VERSION_MINOR}.${NEO_VERSION_BUILD}-${CPACK_PACKAGE_ARCHITECTURE}")
include(CPack)
endif()

View File

@ -223,6 +223,21 @@ if(UNIX)
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
COMPONENT ${OCLOC_NAME}
)
elseif(WIN32)
if(NEO_WINDOWS_INSTALL)
install(TARGETS ${OCLOC_NAME}
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT ocloc
)
install(TARGETS ${OCLOC_NAME}_lib
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ocloc
)
install(FILES ${OCLOC_DIRECTORY}/source/ocloc_api.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT ocloc
)
endif()
endif()
set(OCLOC_OUTPUT_NAME "${OCLOC_NAME}${OCLOC_BITNESS_SUFFIX}")