[azure-kinect-sensor-sdk] Fix supports and build issue in feature 'tool' (#22647)

* [azure-kinect-sensor-sdk] Fix supports and build issue in feature 'tool'

* Update the version database
This commit is contained in:
Phoebe 2022-01-21 07:53:02 +08:00 committed by GitHub
parent 6e1449b30a
commit 43966c5116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 31 deletions

View File

@ -0,0 +1,13 @@
diff --git a/tools/k4aviewer/k4alogdockcontrol.cpp b/tools/k4aviewer/k4alogdockcontrol.cpp
index 4289f71..407e912 100644
--- a/tools/k4aviewer/k4alogdockcontrol.cpp
+++ b/tools/k4aviewer/k4alogdockcontrol.cpp
@@ -161,7 +161,7 @@ K4ADockControlStatus K4ALogDockControl::Show()
if (updated)
{
- ImGui::SetScrollHere(1.0f);
+ ImGui::SetScrollHereY(1.0f);
}
ImGui::EndChild();

View File

@ -10,6 +10,7 @@ vcpkg_from_github(
fix-dependency-imgui.patch
fix-linux.patch
fix-calibration-c.patch
fix-build-imgui.patch
)
vcpkg_find_acquire_program(PYTHON3)
@ -23,43 +24,36 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
)
# .rc file needs windows.h, so do not use PREFER_NINJA here
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS ${FEATURE_OPTIONS}
-DK4A_SOURCE_LINK=OFF
-DK4A_MTE_VERSION=ON
-DBUILD_EXAMPLES=OFF
-DWITH_TEST=OFF
-DIMGUI_EXTERNAL_PATH=${CURRENT_INSTALLED_DIR}/include/bindings
-DIMGUI_EXTERNAL_PATH="${CURRENT_INSTALLED_DIR}/include/bindings"
)
vcpkg_install_cmake()
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)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/k4a TARGET_PATH share/k4a)
vcpkg_fixup_cmake_targets(CONFIG_PATH share/k4arecord TARGET_PATH share/k4arecord)
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/cmake" "${CURRENT_PACKAGES_DIR}/debug/share")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/cmake" "${CURRENT_PACKAGES_DIR}/share")
vcpkg_cmake_config_fixup(PACKAGE_NAME k4a CONFIG_PATH share/k4a)
vcpkg_cmake_config_fixup(PACKAGE_NAME k4arecord CONFIG_PATH share/k4arecord)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if ("tool" IN_LIST FEATURES)
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
file(COPY ${AZURE_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${AZURE_TOOLS})
endif()
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX})
file(REMOVE ${AZURE_TOOLS})
endif()
vcpkg_copy_tools(TOOL_NAMES k4arecorder k4aviewer AzureKinectFirmwareTool AUTO_CLEAN)
endif()
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
# Install Depth Engine
@ -84,14 +78,14 @@ else ()
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)
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")
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)
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")
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,10 +1,10 @@
{
"name": "azure-kinect-sensor-sdk",
"version": "1.4.1",
"port-version": 3,
"port-version": 4,
"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",
"supports": "linux | windows",
"dependencies": [
"azure-c-shared-utility",
"cjson",
@ -21,7 +21,15 @@
},
"libyuv",
"matroska",
"spdlog"
"spdlog",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"docs": {
@ -36,7 +44,7 @@
"name": "imgui",
"features": [
"glfw-binding",
"opengl3-glew-binding"
"opengl3-binding"
]
}
]

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "379c37baf28190bb33ccf1d512c22a21c664e41e",
"version": "1.4.1",
"port-version": 4
},
{
"git-tree": "11fbd98a9560da0ad96abf61d8731778db6e5b8b",
"version": "1.4.1",

View File

@ -330,7 +330,7 @@
},
"azure-kinect-sensor-sdk": {
"baseline": "1.4.1",
"port-version": 3
"port-version": 4
},
"azure-macro-utils-c": {
"baseline": "2020-06-17",