aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Facioni <francisco@remyrobotics.com>2021-03-29 19:17:50 +0200
committerGitHub <noreply@github.com>2021-03-29 10:17:50 -0700
commit5eae23f558cdae22bd894c450dbb43d26e916467 (patch)
tree405e3a1f63b26e795a8625fb7d5a089d181731e3
parent7adc87efe1a4d04d60c271c6d3f63a1505e3bf9d (diff)
downloadvcpkg-5eae23f558cdae22bd894c450dbb43d26e916467.tar.gz
vcpkg-5eae23f558cdae22bd894c450dbb43d26e916467.zip
[azure-kinect-sensor-sdk] not working on Linux (#14750)
* [azure-kinect-sensor-sdk] fix linux build and other issues - linux: warnings stopping the build - linux: set correct casing for dependecies - linux: depthengine - upgrade to 1.4.1 * Update ports/azure-kinect-sensor-sdk/CONTROL * Update ports/azure-kinect-sensor-sdk/portfile.cmake * Force to re-download archive, revert 9cd44db8e32939fa6f5fa4c2166d32d3ce63ff16 * update version record * Update ports/azure-kinect-sensor-sdk/CONTROL * Update versions/a-/azure-kinect-sensor-sdk.json Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
-rw-r--r--ports/azure-c-shared-utility/CONTROL1
-rw-r--r--ports/azure-c-shared-utility/disable-error.patch26
-rw-r--r--ports/azure-c-shared-utility/portfile.cmake2
-rw-r--r--ports/azure-kinect-sensor-sdk/CONTROL6
-rw-r--r--ports/azure-kinect-sensor-sdk/add-MATROSKA_VERSION-define.patch3
-rw-r--r--ports/azure-kinect-sensor-sdk/disable-c4275.patch13
-rw-r--r--ports/azure-kinect-sensor-sdk/fix-builds.patch57
-rw-r--r--ports/azure-kinect-sensor-sdk/fix-calibration-c.patch70
-rw-r--r--ports/azure-kinect-sensor-sdk/fix-linux.patch39
-rw-r--r--ports/azure-kinect-sensor-sdk/fix-uvc.patch36
-rw-r--r--ports/azure-kinect-sensor-sdk/portfile.cmake21
-rw-r--r--versions/a-/azure-c-shared-utility.json5
-rw-r--r--versions/a-/azure-kinect-sensor-sdk.json2
-rw-r--r--versions/baseline.json2
14 files changed, 216 insertions, 67 deletions
diff --git a/ports/azure-c-shared-utility/CONTROL b/ports/azure-c-shared-utility/CONTROL
index 4a2422cfb..e3ed1f609 100644
--- a/ports/azure-c-shared-utility/CONTROL
+++ b/ports/azure-c-shared-utility/CONTROL
@@ -1,5 +1,6 @@
Source: azure-c-shared-utility
Version: 2020-12-09
+Port-Version: 1
Description: Azure C SDKs common code
Homepage: https://github.com/Azure/azure-c-shared-utility
Build-Depends: curl (linux), openssl (linux), azure-macro-utils-c, umock-c
diff --git a/ports/azure-c-shared-utility/disable-error.patch b/ports/azure-c-shared-utility/disable-error.patch
new file mode 100644
index 000000000..b2fd2f8d2
--- /dev/null
+++ b/ports/azure-c-shared-utility/disable-error.patch
@@ -0,0 +1,26 @@
+diff --git a/configs/azure_iot_build_rules.cmake b/configs/azure_iot_build_rules.cmake
+index be3e14fe..aa402902 100644
+--- a/configs/azure_iot_build_rules.cmake
++++ b/configs/azure_iot_build_rules.cmake
+@@ -71,8 +71,6 @@ if(MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
+ elseif(UNIX) #LINUX OR APPLE
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ if(NOT (IN_OPENWRT OR APPLE))
+ set (CMAKE_C_FLAGS "-D_POSIX_C_SOURCE=200112L ${CMAKE_C_FLAGS}")
+ endif()
+@@ -191,12 +189,6 @@ endfunction()
+ IF((WIN32) AND (NOT(MINGW)))
+ #windows needs this define
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+- # Make warning as error
+- add_definitions(/WX)
+-ELSE()
+- # Make warning as error
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ ENDIF()
+
+
diff --git a/ports/azure-c-shared-utility/portfile.cmake b/ports/azure-c-shared-utility/portfile.cmake
index f35e5ea30..98893392d 100644
--- a/ports/azure-c-shared-utility/portfile.cmake
+++ b/ports/azure-c-shared-utility/portfile.cmake
@@ -11,6 +11,7 @@ if("public-preview" IN_LIST FEATURES)
HEAD_REF master
PATCHES
fix-utilityFunctions-conditions-preview.patch
+ disable-error.patch
)
else()
vcpkg_from_github(
@@ -21,6 +22,7 @@ else()
HEAD_REF master
PATCHES
fix-utilityFunctions-conditions.patch
+ disable-error.patch
)
endif()
diff --git a/ports/azure-kinect-sensor-sdk/CONTROL b/ports/azure-kinect-sensor-sdk/CONTROL
index 710ceb460..8b2137de4 100644
--- a/ports/azure-kinect-sensor-sdk/CONTROL
+++ b/ports/azure-kinect-sensor-sdk/CONTROL
@@ -2,12 +2,12 @@ Source: azure-kinect-sensor-sdk
Version: 1.4.1
Homepage: https://github.com/microsoft/Azure-Kinect-Sensor-SDK
Description: Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.
-Build-Depends: azure-c-shared-utility, glfw3, gtest, imgui, libusb, spdlog, cjson, ebml, libjpeg-turbo, matroska, libsoundio, libyuv
-Supports: windows
+Build-Depends: azure-c-shared-utility, glfw3, gtest, imgui, libusb, spdlog, cjson, ebml, libjpeg-turbo, matroska, libsoundio, libyuv, libuvc (linux)
+Supports: !osx
Feature: docs
Description: Build K4A doxygen documentation.
Feature: tool
Description: Build tools.
-Build-Depends: gl3w, glew, imgui[glfw-binding,opengl3-glew-binding] \ No newline at end of file
+Build-Depends: gl3w, glew, imgui[glfw-binding,opengl3-glew-binding]
diff --git a/ports/azure-kinect-sensor-sdk/add-MATROSKA_VERSION-define.patch b/ports/azure-kinect-sensor-sdk/add-MATROSKA_VERSION-define.patch
index d715cf599..b830fd5df 100644
--- a/ports/azure-kinect-sensor-sdk/add-MATROSKA_VERSION-define.patch
+++ b/ports/azure-kinect-sensor-sdk/add-MATROSKA_VERSION-define.patch
@@ -8,5 +8,6 @@ index 58a092e..ed4a6d2 100644
find_package(Matroska CONFIG REQUIRED)
+add_definitions(-DMATROSKA_VERSION=2)
find_package(libsoundio CONFIG REQUIRED)
- find_library(LibUSB libusb-1.0 REQUIRED)
+ find_package(libusb CONFIG REQUIRED)
+ find_package(libuvc CONFIG REQUIRED)
find_package(libyuv CONFIG REQUIRED)
diff --git a/ports/azure-kinect-sensor-sdk/disable-c4275.patch b/ports/azure-kinect-sensor-sdk/disable-c4275.patch
deleted file mode 100644
index 354d1cce3..000000000
--- a/ports/azure-kinect-sensor-sdk/disable-c4275.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e36009e..58a092e 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -117,7 +117,7 @@ endif()
- # add jpeg-turbo library to jpeg libraries.
- set(JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_TURBO})
- # Fix embl error
--add_compile_options(/wd4828 /wd4251)
-+add_compile_options(/wd4828 /wd4251 /wd4275)
-
- # Find all dependencies
- add_subdirectory(extern)
diff --git a/ports/azure-kinect-sensor-sdk/fix-builds.patch b/ports/azure-kinect-sensor-sdk/fix-builds.patch
index 5426cca27..4dbc61b36 100644
--- a/ports/azure-kinect-sensor-sdk/fix-builds.patch
+++ b/ports/azure-kinect-sensor-sdk/fix-builds.patch
@@ -11,35 +11,44 @@ index 4f002b5..cef79d6 100644
# Set the project version
include(K4AProjectVersion)
-@@ -100,6 +98,27 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL
+@@ -100,6 +98,36 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
endif()
+find_package(azure_c_shared_utility CONFIG REQUIRED)
+find_package(glfw3 CONFIG REQUIRED)
+find_package(cJSON CONFIG REQUIRED)
-+find_package(gtest CONFIG REQUIRED)
++find_package(GTest CONFIG REQUIRED)
+find_package(imgui CONFIG REQUIRED)
+find_package(EBML CONFIG REQUIRED)
+find_package(JPEG REQUIRED)
+find_library(JPEG_TURBO turbojpeg REQUIRED)
+find_package(Matroska CONFIG REQUIRED)
+find_package(libsoundio CONFIG REQUIRED)
-+find_library(LibUSB libusb-1.0 REQUIRED)
++find_package(libusb CONFIG REQUIRED)
++find_package(libuvc CONFIG REQUIRED)
+find_package(libyuv CONFIG REQUIRED)
+find_package(spdlog CONFIG REQUIRED)
++find_package(OpenSSL REQUIRED)
++find_package(ZLIB REQUIRED)
+if (BUILD_TOOLS)
+ find_package(gl3w CONFIG REQUIRED)
+endif()
++add_library(libuvc::libuvc ALIAS LibUVC::UVCStatic)
++add_library(libjpeg-turbo::libjpeg-turbo STATIC IMPORTED)
++set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR})
++set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION ${JPEG_LIBRARIES})
+# add jpeg-turbo library to jpeg libraries.
+set(JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_TURBO})
+# Fix embl error
-+add_compile_options(/wd4828 /wd4251)
++if ("MSVC")
++add_compile_options(/wd4828 /wd4251 /wd4275)
++endif()
+
# Find all dependencies
add_subdirectory(extern)
-@@ -161,10 +180,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
+@@ -160,10 +188,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
endif()
endif()
@@ -61,7 +70,6 @@ index 4f002b5..cef79d6 100644
if (K4A_BUILD_DOCS)
find_package(Doxygen 1.8.14 EXACT)
diff --git a/examples/transformation/CMakeLists.txt b/examples/transformation/CMakeLists.txt
-index e5b41e6..8f7f7f3 100644
--- a/examples/transformation/CMakeLists.txt
+++ b/examples/transformation/CMakeLists.txt
@@ -9,5 +9,5 @@ add_executable(transformation_example
@@ -72,7 +80,6 @@ index e5b41e6..8f7f7f3 100644
+ ${JPEG_LIBRARIES}
)
diff --git a/examples/viewer/opengl/CMakeLists.txt b/examples/viewer/opengl/CMakeLists.txt
-index 166fe2a..a3db07f 100644
--- a/examples/viewer/opengl/CMakeLists.txt
+++ b/examples/viewer/opengl/CMakeLists.txt
@@ -14,6 +14,6 @@ add_executable(viewer_opengl
@@ -97,7 +104,7 @@ index cb4f7b4..c3eab98 100644
find_package(Git REQUIRED QUIET)
if (Git_FOUND)
get_git_dir(${K4A_SOURCE_DIR} GIT_DIR)
-@@ -57,18 +56,5 @@ endif()
+@@ -57,18 +56,4 @@ endif()
# lower than CMake 3.3
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
@@ -111,7 +118,7 @@ index cb4f7b4..c3eab98 100644
-add_subdirectory(libmatroska)
-add_subdirectory(libsoundio)
-add_subdirectory(libyuv)
- add_subdirectory(libuvc)
+-add_subdirectory(libuvc)
-add_subdirectory(spdlog)
-if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
- add_subdirectory(libusb)
@@ -131,7 +138,6 @@ index 7140274..3bb6747 100644
k4ainternal::logging)
diff --git a/src/calibration/CMakeLists.txt b/src/calibration/CMakeLists.txt
-index e96b7d0..ed69f41 100644
--- a/src/calibration/CMakeLists.txt
+++ b/src/calibration/CMakeLists.txt
@@ -11,7 +11,7 @@ target_include_directories(k4a_calibration PUBLIC
@@ -157,7 +163,6 @@ index bf5f34a..d37c4e6 100644
// System dependencies
diff --git a/src/capturesync/CMakeLists.txt b/src/capturesync/CMakeLists.txt
-index a434593..bcb19ba 100644
--- a/src/capturesync/CMakeLists.txt
+++ b/src/capturesync/CMakeLists.txt
@@ -11,7 +11,7 @@ target_include_directories(k4a_capturesync PUBLIC
@@ -170,7 +175,6 @@ index a434593..bcb19ba 100644
# Define alias for other targets to link against
diff --git a/src/dewrapper/CMakeLists.txt b/src/dewrapper/CMakeLists.txt
-index 2756e43..f736fd1 100644
--- a/src/dewrapper/CMakeLists.txt
+++ b/src/dewrapper/CMakeLists.txt
@@ -10,7 +10,7 @@ target_include_directories(k4a_dewrapper PUBLIC
@@ -183,7 +187,6 @@ index 2756e43..f736fd1 100644
k4ainternal::calibration
k4ainternal::logging
diff --git a/src/image/CMakeLists.txt b/src/image/CMakeLists.txt
-index c40999b..82406e2 100644
--- a/src/image/CMakeLists.txt
+++ b/src/image/CMakeLists.txt
@@ -11,7 +11,7 @@ target_include_directories(k4a_image PUBLIC
@@ -196,7 +199,6 @@ index c40999b..82406e2 100644
k4ainternal::logging)
diff --git a/src/logging/CMakeLists.txt b/src/logging/CMakeLists.txt
-index cbf0e4d..ca81c41 100644
--- a/src/logging/CMakeLists.txt
+++ b/src/logging/CMakeLists.txt
@@ -11,7 +11,7 @@ target_include_directories(k4a_logging PUBLIC
@@ -209,7 +211,6 @@ index cbf0e4d..ca81c41 100644
k4ainternal::rwlock
k4ainternal::global
diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp
-index 05264c5..41185de 100644
--- a/src/logging/logging.cpp
+++ b/src/logging/logging.cpp
@@ -24,6 +24,9 @@
@@ -223,7 +224,6 @@ index 05264c5..41185de 100644
#pragma warning(default : 4702)
#endif
diff --git a/src/queue/CMakeLists.txt b/src/queue/CMakeLists.txt
-index 03d15f4..a42a135 100644
--- a/src/queue/CMakeLists.txt
+++ b/src/queue/CMakeLists.txt
@@ -10,7 +10,7 @@ target_include_directories(k4a_queue PUBLIC
@@ -236,7 +236,6 @@ index 03d15f4..a42a135 100644
k4ainternal::logging
)
diff --git a/src/record/internal/CMakeLists.txt b/src/record/internal/CMakeLists.txt
-index 97c6cf3..e9f5b1a 100644
--- a/src/record/internal/CMakeLists.txt
+++ b/src/record/internal/CMakeLists.txt
@@ -22,17 +22,17 @@ target_include_directories(k4a_playback PUBLIC
@@ -279,7 +278,6 @@ index 2e23295..d150e70 100644
target_link_libraries(k4arecord PUBLIC
diff --git a/src/tewrapper/CMakeLists.txt b/src/tewrapper/CMakeLists.txt
-index e4a696e..6ee6696 100644
--- a/src/tewrapper/CMakeLists.txt
+++ b/src/tewrapper/CMakeLists.txt
@@ -10,7 +10,7 @@ target_include_directories(k4a_tewrapper PUBLIC
@@ -292,7 +290,6 @@ index e4a696e..6ee6696 100644
k4ainternal::deloader)
diff --git a/src/usbcommand/CMakeLists.txt b/src/usbcommand/CMakeLists.txt
-index f75bd55..5403216 100644
--- a/src/usbcommand/CMakeLists.txt
+++ b/src/usbcommand/CMakeLists.txt
@@ -12,8 +12,8 @@ target_include_directories(k4a_usb_cmd PUBLIC
@@ -307,7 +304,6 @@ index f75bd55..5403216 100644
k4ainternal::image
k4ainternal::logging)
diff --git a/src/usbcommand/usb_cmd_priv.h b/src/usbcommand/usb_cmd_priv.h
-index 0aa502c..0405b58 100644
--- a/src/usbcommand/usb_cmd_priv.h
+++ b/src/usbcommand/usb_cmd_priv.h
@@ -20,7 +20,7 @@
@@ -320,7 +316,6 @@ index 0aa502c..0405b58 100644
// Ensure we have LIBUSB_API_VERSION defined if not defined by libusb.h
#ifndef LIBUSB_API_VERSION
diff --git a/tests/Calibration/CMakeLists.txt b/tests/Calibration/CMakeLists.txt
-index ea6a9dd..c107269 100644
--- a/tests/Calibration/CMakeLists.txt
+++ b/tests/Calibration/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -335,7 +330,6 @@ index ea6a9dd..c107269 100644
k4ainternal::utcommon)
diff --git a/tests/CaptureSync/CMakeLists.txt b/tests/CaptureSync/CMakeLists.txt
-index 0a9a8e2..f7bff42 100644
--- a/tests/CaptureSync/CMakeLists.txt
+++ b/tests/CaptureSync/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -350,7 +344,6 @@ index 0a9a8e2..f7bff42 100644
k4ainternal::capturesync
k4ainternal::image
diff --git a/tests/ColorTests/FunctionalTest/CMakeLists.txt b/tests/ColorTests/FunctionalTest/CMakeLists.txt
-index 1e65ad7..709dfb0 100644
--- a/tests/ColorTests/FunctionalTest/CMakeLists.txt
+++ b/tests/ColorTests/FunctionalTest/CMakeLists.txt
@@ -6,7 +6,7 @@ add_executable(color_ft color_ft.cpp)
@@ -364,7 +357,6 @@ index 1e65ad7..709dfb0 100644
k4a_add_tests(TARGET color_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL)
diff --git a/tests/ColorTests/UnitTest/CMakeLists.txt b/tests/ColorTests/UnitTest/CMakeLists.txt
-index f8f49c1..541548f 100644
--- a/tests/ColorTests/UnitTest/CMakeLists.txt
+++ b/tests/ColorTests/UnitTest/CMakeLists.txt
@@ -42,7 +42,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
@@ -377,7 +369,6 @@ index f8f49c1..541548f 100644
k4a_add_tests(TARGET color_ut TEST_TYPE UNIT)
diff --git a/tests/DepthTests/FunctionalTest/CMakeLists.txt b/tests/DepthTests/FunctionalTest/CMakeLists.txt
-index 469c125..00f15f8 100644
--- a/tests/DepthTests/FunctionalTest/CMakeLists.txt
+++ b/tests/DepthTests/FunctionalTest/CMakeLists.txt
@@ -6,7 +6,7 @@ add_executable(depth_ft depth_ft.cpp)
@@ -391,7 +382,6 @@ index 469c125..00f15f8 100644
k4a_add_tests(TARGET depth_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL)
diff --git a/tests/ExternLibraries/azure_c_shared/CMakeLists.txt b/tests/ExternLibraries/azure_c_shared/CMakeLists.txt
-index a487cde..44170f4 100644
--- a/tests/ExternLibraries/azure_c_shared/CMakeLists.txt
+++ b/tests/ExternLibraries/azure_c_shared/CMakeLists.txt
@@ -6,7 +6,7 @@ add_executable(azure_c_shared_test
@@ -405,7 +395,6 @@ index a487cde..44170f4 100644
k4a_add_tests(TARGET azure_c_shared_test TEST_TYPE UNIT)
diff --git a/tests/IMUTests/FunctionalTest/CMakeLists.txt b/tests/IMUTests/FunctionalTest/CMakeLists.txt
-index cc6b3c2..d8762f6 100644
--- a/tests/IMUTests/FunctionalTest/CMakeLists.txt
+++ b/tests/IMUTests/FunctionalTest/CMakeLists.txt
@@ -6,7 +6,7 @@ add_executable(imu_ft imu_ft.cpp)
@@ -419,7 +408,6 @@ index cc6b3c2..d8762f6 100644
k4a_add_tests(TARGET imu_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL)
diff --git a/tests/Transformation/CMakeLists.txt b/tests/Transformation/CMakeLists.txt
-index 7f11a2f..c4ddaf8 100644
--- a/tests/Transformation/CMakeLists.txt
+++ b/tests/Transformation/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -434,7 +422,6 @@ index 7f11a2f..c4ddaf8 100644
k4ainternal::transformation
k4ainternal::utcommon
diff --git a/tests/UnitTests/allocator_ut/CMakeLists.txt b/tests/UnitTests/allocator_ut/CMakeLists.txt
-index 913a7d8..0b7baeb 100644
--- a/tests/UnitTests/allocator_ut/CMakeLists.txt
+++ b/tests/UnitTests/allocator_ut/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -449,7 +436,6 @@ index 913a7d8..0b7baeb 100644
k4ainternal::image
k4ainternal::utcommon)
diff --git a/tests/UnitTests/dynlib_ut/CMakeLists.txt b/tests/UnitTests/dynlib_ut/CMakeLists.txt
-index fbecc17..af73be2 100644
--- a/tests/UnitTests/dynlib_ut/CMakeLists.txt
+++ b/tests/UnitTests/dynlib_ut/CMakeLists.txt
@@ -34,7 +34,7 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
@@ -462,7 +448,6 @@ index fbecc17..af73be2 100644
k4ainternal::utcommon)
diff --git a/tests/UnitTests/queue_ut/CMakeLists.txt b/tests/UnitTests/queue_ut/CMakeLists.txt
-index cf9b040..ec4a024 100644
--- a/tests/UnitTests/queue_ut/CMakeLists.txt
+++ b/tests/UnitTests/queue_ut/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -477,7 +462,6 @@ index cf9b040..ec4a024 100644
k4ainternal::image
k4ainternal::queue
diff --git a/tests/UnitTests/utcommon/CMakeLists.txt b/tests/UnitTests/utcommon/CMakeLists.txt
-index cca52c6..dfdd13d 100644
--- a/tests/UnitTests/utcommon/CMakeLists.txt
+++ b/tests/UnitTests/utcommon/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -492,7 +476,6 @@ index cca52c6..dfdd13d 100644
)
diff --git a/tests/example/CMakeLists.txt b/tests/example/CMakeLists.txt
-index 3305a1a..be0b667 100644
--- a/tests/example/CMakeLists.txt
+++ b/tests/example/CMakeLists.txt
@@ -3,6 +3,6 @@
@@ -504,7 +487,6 @@ index 3305a1a..be0b667 100644
k4a_add_tests(TARGET k4a_example_test HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL)
diff --git a/tests/executables/CMakeLists.txt b/tests/executables/CMakeLists.txt
-index 7b03d15..6c070ee 100644
--- a/tests/executables/CMakeLists.txt
+++ b/tests/executables/CMakeLists.txt
@@ -17,12 +17,12 @@ target_compile_definitions(executables_ft_custom PRIVATE -DUSE_CUSTOM_TEST_CONFI
@@ -523,7 +505,6 @@ index 7b03d15..6c070ee 100644
k4a_add_tests(TARGET executables_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL)
k4a_add_tests(TARGET executables_ft_custom HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL_CUSTOM)
diff --git a/tests/global/CMakeLists.txt b/tests/global/CMakeLists.txt
-index ea0a0e5..d85728d 100644
--- a/tests/global/CMakeLists.txt
+++ b/tests/global/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -538,7 +519,6 @@ index ea0a0e5..d85728d 100644
k4ainternal::utcommon)
diff --git a/tests/multidevice/CMakeLists.txt b/tests/multidevice/CMakeLists.txt
-index 3fe044b..85f3058 100644
--- a/tests/multidevice/CMakeLists.txt
+++ b/tests/multidevice/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -553,7 +533,6 @@ index 3fe044b..85f3058 100644
k4ainternal::utcommon)
diff --git a/tests/projections/cpp/CMakeLists.txt b/tests/projections/cpp/CMakeLists.txt
-index 2fdfa2c..09b5303 100644
--- a/tests/projections/cpp/CMakeLists.txt
+++ b/tests/projections/cpp/CMakeLists.txt
@@ -6,6 +6,6 @@ add_executable(cpp_projection_ft cpp_projection_ft.cpp)
@@ -565,7 +544,6 @@ index 2fdfa2c..09b5303 100644
k4a_add_tests(TARGET cpp_projection_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL)
diff --git a/tests/rwlock/CMakeLists.txt b/tests/rwlock/CMakeLists.txt
-index 5889435..c6c1f73 100644
--- a/tests/rwlock/CMakeLists.txt
+++ b/tests/rwlock/CMakeLists.txt
@@ -4,8 +4,8 @@
@@ -580,7 +558,6 @@ index 5889435..c6c1f73 100644
k4ainternal::utcommon)
diff --git a/tests/throughput/CMakeLists.txt b/tests/throughput/CMakeLists.txt
-index c544e1e..9489bf8 100644
--- a/tests/throughput/CMakeLists.txt
+++ b/tests/throughput/CMakeLists.txt
@@ -6,8 +6,8 @@ add_executable(throughput_perf throughput_perf.cpp)
@@ -595,7 +572,6 @@ index c544e1e..9489bf8 100644
k4ainternal::logging
k4ainternal::utcommon)
diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt
-index 98578c0..6ab38d9 100644
--- a/tools/k4aviewer/CMakeLists.txt
+++ b/tools/k4aviewer/CMakeLists.txt
@@ -58,12 +58,13 @@ set(EXTERNAL_LIBRARIES
@@ -617,7 +593,6 @@ index 98578c0..6ab38d9 100644
# On Windows, we need to call into setupapi to get USB container ID information
diff --git a/tools/k4aviewer/k4aaudiomanager.cpp b/tools/k4aviewer/k4aaudiomanager.cpp
-index 243c800..ef85d45 100644
--- a/tools/k4aviewer/k4aaudiomanager.cpp
+++ b/tools/k4aviewer/k4aaudiomanager.cpp
@@ -11,7 +11,7 @@
diff --git a/ports/azure-kinect-sensor-sdk/fix-calibration-c.patch b/ports/azure-kinect-sensor-sdk/fix-calibration-c.patch
new file mode 100644
index 000000000..59251912a
--- /dev/null
+++ b/ports/azure-kinect-sensor-sdk/fix-calibration-c.patch
@@ -0,0 +1,70 @@
+diff --git a/src/calibration/calibration.c b/src/calibration/calibration.c
+index d37c4e6..ec477f5 100644
+--- a/src/calibration/calibration.c
++++ b/src/calibration/calibration.c
+@@ -7,7 +7,6 @@
+ // Dependent libraries
+ #include <k4ainternal/common.h>
+ #include <cjson/cJSON.h>
+-#include <locale.h> //cJSON.h need this set correctly.
+
+ // System dependencies
+ #include <stdlib.h>
+@@ -637,27 +636,6 @@ k4a_result_t calibration_create_from_raw(char *raw_calibration,
+
+ k4a_result_t result = K4A_RESULT_SUCCEEDED;
+
+-#ifdef _WIN32
+- int previous_thread_locale = -1;
+- if (K4A_SUCCEEDED(result))
+- {
+- previous_thread_locale = _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
+- result = K4A_RESULT_FROM_BOOL(previous_thread_locale == _ENABLE_PER_THREAD_LOCALE ||
+- previous_thread_locale == _DISABLE_PER_THREAD_LOCALE);
+- }
+-
+- if (K4A_SUCCEEDED(result))
+- {
+- result = K4A_RESULT_FROM_BOOL(setlocale(LC_ALL, "C") != NULL);
+- }
+-
+-#else // NOT _WIN32
+-
+- locale_t thread_locale = newlocale(LC_ALL_MASK, "C", (locale_t)0);
+- locale_t previous_locale = uselocale(thread_locale);
+-
+-#endif
+-
+ if (K4A_SUCCEEDED(result) && depth_calibration != NULL)
+ {
+ result = get_camera_calibration(raw_calibration, depth_calibration, "CALIBRATION_CameraLocationD0");
+@@ -680,29 +658,6 @@ k4a_result_t calibration_create_from_raw(char *raw_calibration,
+ "CALIBRATION_InertialSensorType_Accelerometer");
+ }
+
+-#ifdef _WIN32
+- if (previous_thread_locale == _ENABLE_PER_THREAD_LOCALE || previous_thread_locale == _DISABLE_PER_THREAD_LOCALE)
+- {
+- if (K4A_FAILED(K4A_RESULT_FROM_BOOL(_configthreadlocale(previous_thread_locale) != -1)))
+- {
+- // Only set result to failed, don't let this call succeed and clear a failure that might have happened
+- // already.
+- result = K4A_RESULT_FAILED;
+- }
+- }
+-#else // NOT _WIN32
+- if ((previous_locale != NULL) && (K4A_FAILED(K4A_RESULT_FROM_BOOL(uselocale(previous_locale) != NULL))))
+- {
+- // Only set result to failed, don't let this call succeed and clear a failure that might have happened
+- // already.
+- result = K4A_RESULT_FAILED;
+- }
+- if (thread_locale)
+- {
+- freelocale(thread_locale);
+- }
+-#endif
+-
+ return result;
+ }
+
diff --git a/ports/azure-kinect-sensor-sdk/fix-linux.patch b/ports/azure-kinect-sensor-sdk/fix-linux.patch
new file mode 100644
index 000000000..0dd8a15ae
--- /dev/null
+++ b/ports/azure-kinect-sensor-sdk/fix-linux.patch
@@ -0,0 +1,39 @@
+diff --git a/cmake/k4aCompilerFlags.cmake b/cmake/k4aCompilerFlags.cmake
+index e938c907..ccea0a8e 100644
+--- a/cmake/k4aCompilerFlags.cmake
++++ b/cmake/k4aCompilerFlags.cmake
+@@ -34,22 +34,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
+ list(APPEND CLANG_ALL_WARNINGS "-Wno-extra-semi-stmt") # Allow semi-colons to be used after #define's
+ list(APPEND CLANG_ALL_WARNINGS "-Wno-atomic-implicit-seq-cst") # Allow use of __sync_add_and_fetch() atomic
+ endif()
+- set(CLANG_WARNINGS_AS_ERRORS "-Werror")
+ add_compile_options(${CLANG_ALL_WARNINGS})
+- add_compile_options(${CLANG_WARNINGS_AS_ERRORS})
+ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
+ set(GNU_ALL_WARNINGS "-Wall" "-Wextra")
+ list(APPEND GNU_ALL_WARNINGS "-Wno-missing-field-initializers") # Allow c structs without all fields initialized
+- set(GNU_WARNINGS_AS_ERRORS "-Werror")
+ add_compile_options(${GNU_ALL_WARNINGS})
+- add_compile_options(${GNU_WARNINGS_AS_ERRORS})
+ elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
+ set(MSVC_ALL_WARNINGS "/W4" "/wd4200") #Note: allow zero length arrays
+- set(MSVC_WARNINGS_AS_ERRORS "/WX")
+ string(REGEX REPLACE " /W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ string(REGEX REPLACE " /W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+ add_compile_options(${MSVC_ALL_WARNINGS})
+- add_compile_options(${MSVC_WARNINGS_AS_ERRORS})
+ else()
+ message(FATAL_ERROR "Unknown C++ compiler: ${CMAKE_CXX_COMPILER_ID}")
+ endif()
+diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp
+index 05264c5f..6cd41d32 100644
+--- a/src/logging/logging.cpp
++++ b/src/logging/logging.cpp
+@@ -15,6 +15,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <stdarg.h>
+
+ // External dependencies
+
diff --git a/ports/azure-kinect-sensor-sdk/fix-uvc.patch b/ports/azure-kinect-sensor-sdk/fix-uvc.patch
new file mode 100644
index 000000000..d9eaa9c1e
--- /dev/null
+++ b/ports/azure-kinect-sensor-sdk/fix-uvc.patch
@@ -0,0 +1,36 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 672f6e2..555cb8f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -109,19 +109,23 @@ find_library(JPEG_TURBO turbojpeg REQUIRED)
+ find_package(Matroska CONFIG REQUIRED)
+ add_definitions(-DMATROSKA_VERSION=2)
+ find_package(libsoundio CONFIG REQUIRED)
+-find_package(libusb CONFIG REQUIRED)
+-find_package(libuvc CONFIG REQUIRED)
++if (NOT WIN32)
++ find_package(libusb CONFIG REQUIRED)
++ find_package(libuvc CONFIG REQUIRED)
++ add_library(libuvc::libuvc ALIAS LibUVC::UVCStatic)
++ find_package(OpenSSL REQUIRED)
++ find_package(ZLIB REQUIRED)
++ add_library(libjpeg-turbo::libjpeg-turbo STATIC IMPORTED)
++ set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR})
++ set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION ${JPEG_LIBRARIES})
++else()
++ find_library(LibUSB libusb-1.0 REQUIRED)
++endif()
+ find_package(libyuv CONFIG REQUIRED)
+ find_package(spdlog CONFIG REQUIRED)
+-find_package(OpenSSL REQUIRED)
+-find_package(ZLIB REQUIRED)
+ if (BUILD_TOOLS)
+ find_package(gl3w CONFIG REQUIRED)
+ endif()
+-add_library(libuvc::libuvc ALIAS LibUVC::UVCStatic)
+-add_library(libjpeg-turbo::libjpeg-turbo STATIC IMPORTED)
+-set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${JPEG_INCLUDE_DIR})
+-set_property(TARGET libjpeg-turbo::libjpeg-turbo PROPERTY IMPORTED_LOCATION ${JPEG_LIBRARIES})
+ # add jpeg-turbo library to jpeg libraries.
+ set(JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_TURBO})
+ # Fix embl error
diff --git a/ports/azure-kinect-sensor-sdk/portfile.cmake b/ports/azure-kinect-sensor-sdk/portfile.cmake
index 0ced2d268..742298adf 100644
--- a/ports/azure-kinect-sensor-sdk/portfile.cmake
+++ b/ports/azure-kinect-sensor-sdk/portfile.cmake
@@ -7,9 +7,11 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-builds.patch
- disable-c4275.patch
fix-dependency-imgui.patch
add-MATROSKA_VERSION-define.patch
+ fix-linux.patch
+ fix-uvc.patch
+ fix-calibration-c.patch
)
vcpkg_find_acquire_program(PYTHON3)
@@ -64,8 +66,8 @@ endif()
# Install Depth Engine
vcpkg_download_distfile(ARCHIVE
URLS "https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.Sensor/${VERSION}"
- FILENAME "azure-kinect-sensor-sdk.zip"
- SHA512 17630a00f4e9ff3ef68945b62021f6d0390030b43c120c207afe934075a7a87c5848be1f46f4c35c7ecd5698012452ffcbb67f739e9048857410ec7077e5e8c6
+ FILENAME "azure-kinect-sensor-sdk_17630a00.zip"
+ SHA512 17630a00f4e9ff3ef68945b62021f6d0390030b43c120c207afe934075a7a87c5848be1f46f4c35c7ecd5698012452ffcbb67f739e9048857410ec7077e5e8c6
)
vcpkg_extract_source_archive_ex(
@@ -82,10 +84,15 @@ else ()
message(FATAL_ERROR "this architecture is not supported.")
endif ()
-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 (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)
+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)
+endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/versions/a-/azure-c-shared-utility.json b/versions/a-/azure-c-shared-utility.json
index b1f90d9a3..e6558df34 100644
--- a/versions/a-/azure-c-shared-utility.json
+++ b/versions/a-/azure-c-shared-utility.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "aeea4eb6de3e3db197e350ba3e8ebb6a9bfaa154",
+ "version-string": "2020-12-09",
+ "port-version": 1
+ },
+ {
"git-tree": "67f510493f8011d403918b4da617f970d9cff74c",
"version-string": "2020-12-09",
"port-version": 0
diff --git a/versions/a-/azure-kinect-sensor-sdk.json b/versions/a-/azure-kinect-sensor-sdk.json
index 8e0136949..e7a2d37b5 100644
--- a/versions/a-/azure-kinect-sensor-sdk.json
+++ b/versions/a-/azure-kinect-sensor-sdk.json
@@ -1,7 +1,7 @@
{
"versions": [
{
- "git-tree": "c1df96d95d7403ee8b37344e4caf39184b410cb5",
+ "git-tree": "28c9dbd6d17602e942cd81f9d70aeff80f3d83f0",
"version-string": "1.4.1",
"port-version": 0
},
diff --git a/versions/baseline.json b/versions/baseline.json
index 6a4cd93e1..a3f1b4b83 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -242,7 +242,7 @@
},
"azure-c-shared-utility": {
"baseline": "2020-12-09",
- "port-version": 0
+ "port-version": 1
},
"azure-core-cpp": {
"baseline": "1.0.0-beta.7",