From 3c24aa351645c267bf3afef1e3a96125380a2f6c Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:09:56 +0100 Subject: [PATCH] [azure-kinect-sensor-sdk] fix single config builds (#42719) --- ports/azure-kinect-sensor-sdk/fix-builds.patch | 4 ++-- ports/azure-kinect-sensor-sdk/portfile.cmake | 14 ++++++++++---- ports/azure-kinect-sensor-sdk/vcpkg.json | 2 +- versions/a-/azure-kinect-sensor-sdk.json | 5 +++++ versions/baseline.json | 2 +- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ports/azure-kinect-sensor-sdk/fix-builds.patch b/ports/azure-kinect-sensor-sdk/fix-builds.patch index 881d5abe2e..aa839ca225 100644 --- a/ports/azure-kinect-sensor-sdk/fix-builds.patch +++ b/ports/azure-kinect-sensor-sdk/fix-builds.patch @@ -26,8 +26,8 @@ index 4f002b5..dd9b1df 100644 +add_library(libjpeg-turbo::libjpeg-turbo UNKNOWN IMPORTED) +set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TURBOJPEG_INCLUDE_DIR}) +set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION_RELEASE ${TURBOJPEG_LIBRARY_RELEASE}) -+if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib") -+ find_library(TURBOJPEG_LIBRARY_DEBUG NAMES turbojpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED) ++find_library(TURBOJPEG_LIBRARY_DEBUG NAMES turbojpeg PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) ++if(TURBOJPEG_LIBRARY_DEBUG) + set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION_DEBUG ${TURBOJPEG_LIBRARY_DEBUG}) +endif() +find_package(Matroska CONFIG REQUIRED) diff --git a/ports/azure-kinect-sensor-sdk/portfile.cmake b/ports/azure-kinect-sensor-sdk/portfile.cmake index cedac7bdfe..f20fe2a747 100644 --- a/ports/azure-kinect-sensor-sdk/portfile.cmake +++ b/ports/azure-kinect-sensor-sdk/portfile.cmake @@ -42,7 +42,9 @@ vcpkg_cmake_configure( vcpkg_cmake_install() # Avoid deleting debug/lib/cmake when fixing the first cmake -file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/cmake" "${CURRENT_PACKAGES_DIR}/debug/share") +if(NOT VCPKG_BUILD_TYPE) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/cmake" "${CURRENT_PACKAGES_DIR}/debug/share") +endif() file(RENAME "${CURRENT_PACKAGES_DIR}/lib/cmake" "${CURRENT_PACKAGES_DIR}/share") vcpkg_cmake_config_fixup(PACKAGE_NAME k4a CONFIG_PATH share/k4a) @@ -83,12 +85,16 @@ endif () if (VCPKG_TARGET_IS_LINUX) file(COPY "${PACKAGE_PATH}/linux/lib/native/${VCPKG_TARGET_ARCHITECTURE}/release/libdepthengine.so.2.0" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") - file(COPY "${PACKAGE_PATH}/linux/lib/native/${VCPKG_TARGET_ARCHITECTURE}/release/libdepthengine.so.2.0" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + if(NOT VCPKG_BUILD_TYPE) + file(COPY "${PACKAGE_PATH}/linux/lib/native/${VCPKG_TARGET_ARCHITECTURE}/release/libdepthengine.so.2.0" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + endif() else() file(COPY "${PACKAGE_PATH}/lib/native/${ARCHITECTURE}/release/depthengine_2_0.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/azure-kinect-sensor-sdk") - file(COPY "${PACKAGE_PATH}/lib/native/${ARCHITECTURE}/release/depthengine_2_0.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk") file(COPY "${CMAKE_CURRENT_LIST_DIR}/k4adeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/azure-kinect-sensor-sdk") - file(COPY "${CMAKE_CURRENT_LIST_DIR}/k4adeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk") + if(NOT VCPKG_BUILD_TYPE) + file(COPY "${PACKAGE_PATH}/lib/native/${ARCHITECTURE}/release/depthengine_2_0.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk") + file(COPY "${CMAKE_CURRENT_LIST_DIR}/k4adeploy.ps1" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk") + endif() endif() # Handle copyright diff --git a/ports/azure-kinect-sensor-sdk/vcpkg.json b/ports/azure-kinect-sensor-sdk/vcpkg.json index ced72efcfb..63c4ff4a8d 100644 --- a/ports/azure-kinect-sensor-sdk/vcpkg.json +++ b/ports/azure-kinect-sensor-sdk/vcpkg.json @@ -1,7 +1,7 @@ { "name": "azure-kinect-sensor-sdk", "version": "1.4.1", - "port-version": 7, + "port-version": 8, "description": "Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.", "homepage": "https://github.com/microsoft/Azure-Kinect-Sensor-SDK", "supports": "linux | windows", diff --git a/versions/a-/azure-kinect-sensor-sdk.json b/versions/a-/azure-kinect-sensor-sdk.json index 7c42d33390..158356d75e 100644 --- a/versions/a-/azure-kinect-sensor-sdk.json +++ b/versions/a-/azure-kinect-sensor-sdk.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f19cdb3144d4296ac862b6e94c9967c056325476", + "version": "1.4.1", + "port-version": 8 + }, { "git-tree": "a684e03aa0836ede2caba93683bee3fd3d1ed15f", "version": "1.4.1", diff --git a/versions/baseline.json b/versions/baseline.json index 0cae8b4d00..697917fcef 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -478,7 +478,7 @@ }, "azure-kinect-sensor-sdk": { "baseline": "1.4.1", - "port-version": 7 + "port-version": 8 }, "azure-macro-utils-c": { "baseline": "2022-01-21",