@@ -29,7 +29,7 @@ if(BUILD_WITH_L0 AND "${NEO_BITS}" STREQUAL "64")
2929 endif ()
3030 endif ()
3131
32- project (intel- level-zero-gpu VERSION 0.4.1)
32+ project (level-zero-gpu VERSION 0.4.1)
3333 include (cmake/source_tree.cmake)
3434 if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /cmake/${BRANCH_TYPE} /platforms.cmake AND NOT SKIP_L0_UNIT_TESTS)
3535 include (cmake/${BRANCH_TYPE} /platforms.cmake)
@@ -382,62 +382,10 @@ endif()
382382
383383 add_subdirectories()
384384
385- if (UNIX AND ( NOT NEO_BUILD_PACKAGE) )
385+ if (UNIX )
386386 message (STATUS "Building LevelZero package" )
387- if (DEFINED L0_CPACK_GENERATOR)
388- set (CPACK_GENERATOR ${L0_CPACK_GENERATOR} )
389- else ()
390- # If generators list was not define build native package for current distro
391- if (EXISTS "/etc/debian_version" )
392- set (CPACK_GENERATOR "DEB" )
393-
394- set (file_path "/etc/lsb-release" )
395- if (EXISTS "${file_path} " )
396- file (STRINGS "${file_path} " data_list REGEX "^(DISTRIB_ID|DISTRIB_CODENAME)=" )
397-
398- # Look for lines like "DISTRIB_ID="..." and DISTRIB_CODENAME="..."
399- foreach (_var ${data_list} )
400- if ("${_var} " MATCHES "^(DISTRIB_ID)=(.*)$" )
401- set (DEB_DISTRIB_ID "${CMAKE_MATCH_2} " )
402- elseif ("${_var} " MATCHES "^(DISTRIB_CODENAME)=(.*)$" )
403- set (DEB_DISTRIB_CODENAME "${CMAKE_MATCH_2} " )
404- endif ()
405- endforeach ()
406- endif ()
407-
408- elseif (EXISTS "/etc/redhat-release" )
409- set (CPACK_GENERATOR "RPM" )
410- else ()
411- set (CPACK_GENERATOR "TXZ" )
412- endif ()
413- endif ()
414387
415- set (CPACK_PACKAGE_CONTACT "Intel Corporation" )
416- set (CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR} " )
417- set (CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR} " )
418- set (CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH} " )
419- if (NOT DEFINED L0_VERSION_BUILD)
420- set (L0_VERSION_BUILD 0)
421- endif ()
422- set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Level Zero driver written for Intel GPU devices." )
423-
424- set (CPACK_DEB_COMPONENT_INSTALL ON )
425- set (CPACK_RPM_COMPONENT_INSTALL ON )
426- set (CPACK_ARCHIVE_COMPONENT_INSTALL ON )
427-
428- set (CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64" )
429- set (CPACK_DEBIAN_PACKAGE_RELEASE ${L0_VERSION_BUILD} )
430- set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
431-
432- set (CPACK_RPM_COMPRESSION_TYPE "xz" )
433- set (CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64" )
434- set (CPACK_RPM_PACKAGE_AUTOREQ OFF )
435- set (CPACK_RPM_PACKAGE_GROUP "System Environment/Libraries" )
436- set (CPACK_RPM_PACKAGE_LICENSE "MIT" )
437- set (CPACK_RPM_PACKAGE_RELEASE ${L0_VERSION_BUILD} )
438- set (CPACK_RPM_PACKAGE_RELEASE_DIST ON )
439-
440- set_property (GLOBAL APPEND PROPERTY L0_COMPONENTS_LIST ${PROJECT_NAME} )
388+ set_property (GLOBAL APPEND PROPERTY NEO_COMPONENTS_LIST ${PROJECT_NAME} )
441389
442390 set (L0_PACKAGE_VERSION_DEB "${CPACK_PACKAGE_VERSION_MAJOR} .${CPACK_PACKAGE_VERSION_MINOR} .${CPACK_PACKAGE_VERSION_PATCH} " )
443391 set (L0_PACKAGE_VERSION_RPM "${CPACK_PACKAGE_VERSION_MAJOR} .${CPACK_PACKAGE_VERSION_MINOR} .${CPACK_PACKAGE_VERSION_PATCH} " )
@@ -458,23 +406,6 @@ endif()
458406 list (APPEND _external_package_dependencies_rpm "intel-igc-opencl" )
459407 endif ()
460408
461- list (APPEND _external_package_dependencies_deb "level-zero" )
462- list (APPEND _external_package_dependencies_rpm "level-zero" )
463-
464- # Consecutive build number
465- if (NOT DEFINED NEO_VERSION_BUILD)
466- set (PACKAGE_VERSION_BUILD ${BUILD_VERSION} )
467- else ()
468- set (PACKAGE_VERSION_BUILD ${NEO_VERSION_BUILD} )
469- endif ()
470-
471- set (CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT" )
472-
473- include ("os_release_info.cmake" )
474- get_os_release_info(os_name os_version os_codename)
475- #Pick only first character of os_name
476- string (SUBSTRING "${os_name} " 0 1 os_name)
477-
478409 find_program (GIT_EXE NAMES "git" )
479410 if (GIT_EXE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR} /.git" )
480411 if (MSVC )
@@ -491,44 +422,16 @@ endif()
491422 endif ()
492423 string (STRIP "${VERSION_SUFFIX} " VERSION_SUFFIX)
493424
494- if (NOT DEFINED ${PACKAGE_VERSION_BUILD} )
495- set (PACKAGE_RELEASE_VERSION ${VERSION_SUFFIX} )
496- else ()
497- set (PACKAGE_RELEASE_VERSION ${PACKAGE_VERSION_BUILD} )
498- endif ()
499-
500425 string (REPLACE ";" ", " CPACK_DEBIAN_INTEL-LEVEL-ZERO-GPU_PACKAGE_DEPENDS "${_external_package_dependencies_deb} " )
501426 string (REPLACE ";" ", " CPACK_RPM_INTEL-LEVEL-ZERO-GPU_PACKAGE_REQUIRES "${_external_package_dependencies_rpm} " )
502- set (CPACK_DEBIAN_INTEL-LEVEL -ZERO-GPU_PACKAGE_DEPENDS ${CPACK_DEBIAN_INTEL-LEVEL-ZERO-GPU_PACKAGE_DEPENDS} PARENT_SCOPE)
503- set (CPACK_RPM_INTEL-LEVEL -ZERO-GPU_PACKAGE_REQUIRES ${CPACK_RPM_INTEL-LEVEL-ZERO-GPU_PACKAGE_REQUIRES} PARENT_SCOPE)
427+ set (CPACK_DEBIAN_LEVEL -ZERO-GPU_PACKAGE_DEPENDS ${CPACK_DEBIAN_INTEL-LEVEL-ZERO-GPU_PACKAGE_DEPENDS} PARENT_SCOPE)
428+ set (CPACK_RPM_LEVEL -ZERO-GPU_PACKAGE_REQUIRES ${CPACK_RPM_INTEL-LEVEL-ZERO-GPU_PACKAGE_REQUIRES} PARENT_SCOPE)
504429
505- set (CPACK_DEBIAN_INTEL-LEVEL-ZERO-GPU_PACKAGE_NAME ${PROJECT_NAME} )
506- if ("${BUILD_TYPE} " STREQUAL "debug" )
507- set (CPACK_DEBIAN_INTEL-LEVEL-ZERO-GPU_FILE_NAME "${PROJECT_NAME} _${L0_PACKAGE_VERSION_DEB} -${PACKAGE_RELEASE_VERSION} +${os_name}${os_version} -dbg_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE} .deb" )
508- else ()
509- set (CPACK_DEBIAN_INTEL-LEVEL-ZERO-GPU_FILE_NAME "${PROJECT_NAME} _${L0_PACKAGE_VERSION_DEB} -${PACKAGE_RELEASE_VERSION} +${os_name}${os_version} _${CPACK_DEBIAN_PACKAGE_ARCHITECTURE} .deb" )
510- endif ()
511-
512- set (CPACK_RPM_INTEL-LEVEL-ZERO-GPU_PACKAGE_NAME ${PROJECT_NAME} )
513- set (CPACK_RPM_INTEL-LEVEL-ZERO-GPU_FILE_NAME "${PROJECT_NAME} -${L0_PACKAGE_VERSION_RPM} %{?dist}.${CPACK_RPM_PACKAGE_ARCHITECTURE} .rpm" )
430+ set (CPACK_RPM_LEVEL-ZERO-GPU_FILE_NAME "intel-level-zero-gpu-${NEO_VERSION_MAJOR} .${NEO_VERSION_MINOR} .${NEO_VERSION_BUILD} -${CPACK_RPM_PACKAGE_RELEASE} %{?dist}.${CPACK_RPM_PACKAGE_ARCHITECTURE} .rpm" PARENT_SCOPE)
514431
515432 if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /cmake/${BRANCH_TYPE} /cpack.cmake)
516433 include (${CMAKE_CURRENT_SOURCE_DIR} /cmake/${BRANCH_TYPE} /cpack.cmake)
517434 endif ()
518435
519- set (CPACK_SOURCE_GENERATOR "TGZ" )
520- set (CPACK_SOURCE_IGNORE_FILES
521- /.git/
522- /.gitignore
523- /build /
524- /manifests/
525- )
526- set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME} _${L0_PACKAGE_VERSION_DEB} -${PACKAGE_RELEASE_VERSION} _${BUILD_TYPE} " )
527-
528- get_property (CPACK_COMPONENTS_ALL GLOBAL PROPERTY L0_COMPONENTS_LIST)
529- set (CPACK_PROPERTIES_FILE "${NEO_SOURCE_DIR} /package_config.cmake" )
530- set (CPACK_LD_LIBRARY_PATH "${NEO__GMM_LIBRARY_PATH} " )
531-
532- include (CPack)
533436 endif ()
534437endif ()
0 commit comments