Skip to content

Commit

Permalink
Merge pull request #226 from lawruble13/provides-hotfix
Browse files Browse the repository at this point in the history
Cherry-pick PROVIDES field fixes for header-only components
  • Loading branch information
lawruble13 authored Sep 12, 2024
2 parents e494a50 + 5c11142 commit 489ef56
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions share/rocmcmakebuildtools/cmake/ROCMCreatePackage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,29 @@ macro(rocm_create_package)
)
endif()
if(PARSE_HEADER_ONLY OR NOT BUILD_SHARED_LIBS)
rocm_join_if_set(", "
CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES
CPACK_DEBIAN_PACKAGE_PROVIDES
"${CPACK_PACKAGE_NAME} (= ${CPACK_PACKAGE_VERSION})")
rocm_join_if_set(", "
CPACK_RPM_DEVEL_PACKAGE_PROVIDES
CPACK_DEBIAN_PACKAGE_PROVIDES
"${CPACK_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}")
if(DEFINED CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES)
rocm_join_if_set(", "
CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES
"${CPACK_PACKAGE_NAME} (= ${CPACK_PACKAGE_VERSION})"
)
else()
rocm_join_if_set(", "
CPACK_DEBIAN_DEVEL_PACKAGE_PROVIDES
"${CPACK_DEBIAN_PACKAGE_PROVIDES}"
"${CPACK_PACKAGE_NAME} (= ${CPACK_PACKAGE_VERSION})")
endif()

if(DEFINED CPACK_RPM_DEVEL_PACKAGE_PROVIDES)
rocm_join_if_set(", "
CPACK_RPM_DEVEL_PACKAGE_PROVIDES
"${CPACK_PACKAGE_NAME}"
)
else()
rocm_join_if_set(", "
CPACK_RPM_DEVEL_PACKAGE_PROVIDES
"${CPACK_RPM_PACKAGE_PROVIDES}"
"${CPACK_PACKAGE_NAME}")
endif()
else()
rocm_package_add_dependencies(COMPONENT devel DEPENDS "${CPACK_PACKAGE_NAME} >= ${CPACK_PACKAGE_VERSION}")
endif()
Expand Down

0 comments on commit 489ef56

Please sign in to comment.