czmq: Fix install conflict when enable multilib.

Error: Transaction test error:
  file /usr/share/cmake/czmq/czmqConfigVersion.cmake conflicts between attempted installs of lib32-libczmq-dev-4.2.1-r0.armv7ahf_neon and libczmq-dev-4.2.1-r0.cortexa57
  file /usr/share/cmake/czmq/czmqTargets-release.cmake conflicts between attempted installs of lib32-libczmq-dev-4.2.1-r0.armv7ahf_neon and libczmq-dev-4.2.1-r0.cortexa57
  file /usr/share/cmake/czmq/czmqTargets.cmake conflicts between attempted installs of lib32-libczmq-dev-4.2.1-r0.armv7ahf_neon and libczmq-dev-4.2.1-r0.cortexa57

The differences of czmqConfigVersion.cmake are as follows:
@@ -31,13 +31,13 @@

 # if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "4" STREQUAL "")
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
   return()
 endif()

 # check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "4")
-  math(EXPR installedBits "4 * 8")
+if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
+  math(EXPR installedBits "8 * 8")
   set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
   set(PACKAGE_VERSION_UNSUITABLE TRUE)
 endif()

The differences of czmqTargets-release.cmake are as follows:
@@ -8,22 +8,22 @@
 # Import target "czmq" for configuration "Release"
 set_property(TARGET czmq APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
 set_target_properties(czmq PROPERTIES
-  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libczmq.so.4.2.1"
+  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib64/libczmq.so.4.2.1"
   IMPORTED_SONAME_RELEASE "libczmq.so.4"
   )

 list(APPEND _cmake_import_check_targets czmq )
-list(APPEND _cmake_import_check_files_for_czmq "${_IMPORT_PREFIX}/lib/libczmq.so.4.2.1" )
+list(APPEND _cmake_import_check_files_for_czmq "${_IMPORT_PREFIX}/lib64/libczmq.so.4.2.1" )

 # Import target "czmq-static" for configuration "Release"
 set_property(TARGET czmq-static APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
 set_target_properties(czmq-static PROPERTIES
   IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
-  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libczmq.a"
+  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib64/libczmq.a"
   )

 list(APPEND _cmake_import_check_targets czmq-static )
-list(APPEND _cmake_import_check_files_for_czmq-static "${_IMPORT_PREFIX}/lib/libczmq.a" )
+list(APPEND _cmake_import_check_files_for_czmq-static "${_IMPORT_PREFIX}/lib64/libczmq.a" )

The differences of czmqTargets.cmake are as follows:
@@ -60,7 +60,7 @@

 set_target_properties(czmq PROPERTIES
   INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
-  INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libcurl.so"
+  INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libcurl.so"
 )

 # Create imported target czmq-static
@@ -69,7 +69,7 @@
 set_target_properties(czmq-static PROPERTIES
   INTERFACE_COMPILE_DEFINITIONS "CZMQ_STATIC"
   INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
-  INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/armv7ahf-neon-pokymllib32-linux-gnueabi/lib32-czmq/4.2.1/lib32-recipe-sysroot/usr/lib/libcurl.so"
+  INTERFACE_LINK_LIBRARIES "/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libzmq.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libuuid.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libsystemd.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/liblz4.so;/ubinux-dev/ubinux001/contribution/build_xh/tmp/work/cortexa57-poky-linux/czmq/4.2.1/recipe-sysroot/usr/lib64/libcurl.so"
 )

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Wang Mingyu
2024-02-02 14:35:45 +08:00
committed by Khem Raj
parent b239853fd3
commit 14e2e3a434
@@ -15,9 +15,13 @@ inherit cmake pkgconfig
PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-staticdev ${PN} ${PN}-dbg"
EXTRA_OECMAKE = " \
-DCMAKECONFIG_INSTALL_DIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/') + "/cmake/"} \
"
FILES:${PN} = "${bindir}/*"
FILES:lib${BPN} = "${libdir}/*.so.*"
FILES:lib${BPN}-dev = "${libdir}/*.so ${libdir}/pkgconfig ${includedir} ${datadir}/cmake"
FILES:lib${BPN}-dev = "${libdir}/*.so ${libdir}/pkgconfig ${includedir} ${libdir}/cmake"
FILES:lib${BPN}-staticdev = "${libdir}/lib*.a"
RDEPENDS:lib${BPN}-dev = "zeromq-dev"