diff --git a/ports/kinectsdk1/Config.cmake.in b/ports/kinectsdk1/Config.cmake.in new file mode 100644 index 00000000000000..37b7a133ab306b --- /dev/null +++ b/ports/kinectsdk1/Config.cmake.in @@ -0,0 +1,33 @@ + +get_filename_component(_kinectsdk1_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_kinectsdk1_root "${_kinectsdk1_root}" PATH) +get_filename_component(_kinectsdk1_root "${_kinectsdk1_root}" PATH) + +set(_kinectsdk1_rel_lib "${_kinectsdk1_root}/lib/Kinect10.lib") +set(_kinectsdk1_dbg_lib "${_kinectsdk1_root}/debug/lib/Kinect10.lib") +if (EXISTS "${_kinectsdk1_rel_lib}" OR EXISTS "${_kinectsdk1_dbg_lib}") + + add_library(unofficial::kinectsdk1::kinectsdk1 INTERFACE IMPORTED) + set_target_properties(unofficial::kinectsdk1::kinectsdk1 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_kinectsdk1_root}/include") + + if (EXISTS "${_kinectsdk1_rel_lib}") + set_target_properties(unofficial::kinectsdk1::kinectsdk1 + PROPERTIES IMPORTED_LOCATION_RELEASE "${_kinectsdk1_rel_lib}") + set_property(TARGET unofficial::kinectsdk1::kinectsdk1 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + endif() + if (EXISTS "${_kinectsdk1_dbg_lib}") + set_target_properties(unofficial::kinectsdk1::kinectsdk1 + PROPERTIES IMPORTED_LOCATION_DEBUG "${_kinectsdk1_dbg_lib}") + set_property(TARGET unofficial::kinectsdk1::kinectsdk1 APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + endif() + +else() + + set(kinectsdk1_FOUND FALSE) + +endif() + +unset(_kinectsdk1_rel_lib) +unset(_kinectsdk1_dbg_lib) + +unset(_kinectsdk1_root) diff --git a/ports/kinectsdk1/portfile.cmake b/ports/kinectsdk1/portfile.cmake index 305f9d7bb5dbab..59c0ddf0166db8 100644 --- a/ports/kinectsdk1/portfile.cmake +++ b/ports/kinectsdk1/portfile.cmake @@ -1,4 +1,13 @@ set(KINECTSDK10_VERSION "v1.8") + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCHITECTURE x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCHITECTURE amd64) +else() + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + vcpkg_download_distfile(KINECTSDK10_INSTALLER URLS "https://download.microsoft.com/download/E/1/D/E1DEC243-0389-4A23-87BF-F47DE869FC1A/KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" FILENAME "KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" @@ -10,23 +19,22 @@ vcpkg_find_acquire_program(DARK) set(KINECTSDK10_WIX_INSTALLER "${KINECTSDK10_INSTALLER}") set(KINECTSDK10_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix") vcpkg_execute_required_process( - COMMAND ${DARK} -x ${KINECTSDK10_WIX_EXTRACT_DIR} ${KINECTSDK10_WIX_INSTALLER} + COMMAND "${DARK}" -x "${KINECTSDK10_WIX_EXTRACT_DIR}" "${KINECTSDK10_WIX_INSTALLER}" WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} - LOGNAME extract_wix_installer + LOGNAME extract-wix-${TARGET_TRIPLET} ) -file(TO_NATIVE_PATH "${KINECTSDK10_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK10_VERSION}-${VCPKG_TARGET_ARCHITECTURE}.msi" KINECTSDK10_MSI_INSTALLER) -file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}" KINECTSDK10_MSI_EXTRACT_DIR) -file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH) -set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) -file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK10_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK10_MSI_EXTRACT_DIR}\"") +file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/src/KinectSDK-${KINECTSDK10_VERSION}-${VCPKG_TARGET_ARCHITECTURE}") +set(KINECTSDK10_MSI_INSTALLER "installer\\wix\\AttachedContainer\\KinectSDK-${KINECTSDK10_VERSION}-${VCPKG_TARGET_ARCHITECTURE}.msi") vcpkg_execute_required_process( - COMMAND ${BATCH_FILE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} - LOGNAME extract_msi_installer_${VCPKG_TARGET_ARCHITECTURE} + COMMAND + "${CURRENT_HOST_INSTALLED_DIR}/tools/vcpkg-tool-lessmsi/lessmsi.exe" + x + "${KINECTSDK10_MSI_INSTALLER}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src" + LOGNAME extract-msi-${TARGET_TRIPLET} ) - -set(KINECTSDK10_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}/Microsoft SDKs/Kinect/${KINECTSDK10_VERSION}") +set(KINECTSDK10_DIR "${CURRENT_BUILDTREES_DIR}/src/KinectSDK-${KINECTSDK10_VERSION}-${VCPKG_TARGET_ARCHITECTURE}/SourceDir/Microsoft SDKs/Kinect/${KINECTSDK10_VERSION}") file( INSTALL @@ -35,30 +43,24 @@ file( "${KINECTSDK10_DIR}/inc/NuiSensor.h" "${KINECTSDK10_DIR}/inc/NuiSkeleton.h" DESTINATION - ${CURRENT_PACKAGES_DIR}/include + "${CURRENT_PACKAGES_DIR}/include" ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") - set(ARCHITECTURE x86) -elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - set(ARCHITECTURE amd64) -else() - message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() - file( INSTALL "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" DESTINATION - ${CURRENT_PACKAGES_DIR}/lib + "${CURRENT_PACKAGES_DIR}/lib" ) file( INSTALL "${KINECTSDK10_DIR}/lib/${ARCHITECTURE}/Kinect10.lib" DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/lib + "${CURRENT_PACKAGES_DIR}/debug/lib" ) +configure_file("${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-${PORT}-config.cmake" @ONLY) + # Handle copyright -file(INSTALL ${KINECTSDK10_DIR}/SDKEula.rtf DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${KINECTSDK10_DIR}/SDKEula.rtf" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/kinectsdk1/vcpkg.json b/ports/kinectsdk1/vcpkg.json index 225fe460e37185..7d4a3a029f8295 100644 --- a/ports/kinectsdk1/vcpkg.json +++ b/ports/kinectsdk1/vcpkg.json @@ -1,7 +1,14 @@ { "name": "kinectsdk1", "version": "1.8", - "port-version": 4, + "port-version": 5, "description": "Kinect for Windows SDK for Kinect v1 sensor.", - "supports": "!arm" + "license": null, + "supports": "!arm & windows", + "dependencies": [ + { + "name": "vcpkg-tool-lessmsi", + "host": true + } + ] } diff --git a/ports/kinectsdk2/Config.cmake.in b/ports/kinectsdk2/Config.cmake.in new file mode 100644 index 00000000000000..04291aa0969e28 --- /dev/null +++ b/ports/kinectsdk2/Config.cmake.in @@ -0,0 +1,33 @@ + +get_filename_component(_kinectsdk2_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_kinectsdk2_root "${_kinectsdk2_root}" PATH) +get_filename_component(_kinectsdk2_root "${_kinectsdk2_root}" PATH) + +set(_kinectsdk2_rel_lib "${_kinectsdk2_root}/lib/Kinect20.lib") +set(_kinectsdk2_dbg_lib "${_kinectsdk2_root}/debug/lib/Kinect20.lib") +if (EXISTS "${_kinectsdk2_rel_lib}" OR EXISTS "${_kinectsdk2_dbg_lib}") + + add_library(unofficial::kinectsdk2::kinectsdk2 INTERFACE IMPORTED) + set_target_properties(unofficial::kinectsdk2::kinectsdk2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_kinectsdk2_root}/include") + + if (EXISTS "${_kinectsdk2_rel_lib}") + set_target_properties(unofficial::kinectsdk2::kinectsdk2 + PROPERTIES IMPORTED_LOCATION_RELEASE "${_kinectsdk2_rel_lib}") + set_property(TARGET unofficial::kinectsdk2::kinectsdk2 APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + endif() + if (EXISTS "${_kinectsdk2_dbg_lib}") + set_target_properties(unofficial::kinectsdk2::kinectsdk2 + PROPERTIES IMPORTED_LOCATION_DEBUG "${_kinectsdk2_dbg_lib}") + set_property(TARGET unofficial::kinectsdk2::kinectsdk2 APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + endif() + +else() + + set(kinectsdk2_FOUND FALSE) + +endif() + +unset(_kinectsdk2_rel_lib) +unset(_kinectsdk2_dbg_lib) + +unset(_kinectsdk2_root) diff --git a/ports/kinectsdk2/portfile.cmake b/ports/kinectsdk2/portfile.cmake index 3ed2101721a0ab..8e8e3e5c0b4997 100644 --- a/ports/kinectsdk2/portfile.cmake +++ b/ports/kinectsdk2/portfile.cmake @@ -1,9 +1,5 @@ vcpkg_buildpath_length_warning(37) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") - message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") -endif() - set(KINECTSDK20_VERSION "v2.0_1409") vcpkg_download_distfile(KINECTSDK20_INSTALLER URLS "https://download.microsoft.com/download/F/2/D/F2D1012E-3BC6-49C5-B8B3-5ACFF58AF7B8/KinectSDK-${KINECTSDK20_VERSION}-Setup.exe" @@ -18,43 +14,43 @@ set(KINECTSDK20_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix") vcpkg_execute_required_process( COMMAND ${DARK} -x ${KINECTSDK20_WIX_EXTRACT_DIR} ${KINECTSDK20_WIX_INSTALLER} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} - LOGNAME extract_wix_installer + LOGNAME extract-wix-${TARGET_TRIPLET} ) -file(TO_NATIVE_PATH "${KINECTSDK20_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK20_VERSION}-x64.msi" KINECTSDK20_MSI_INSTALLER) -file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi" KINECTSDK20_MSI_EXTRACT_DIR) -file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH) -set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) -file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK20_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK20_MSI_EXTRACT_DIR}\"") +file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/src/KinectSDK-${KINECTSDK20_VERSION}-x64") +set(KINECTSDK20_MSI_INSTALLER "installer\\wix\\AttachedContainer\\KinectSDK-${KINECTSDK20_VERSION}-x64.msi") vcpkg_execute_required_process( - COMMAND ${BATCH_FILE} - WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} - LOGNAME extract_msi_installer + COMMAND + "${CURRENT_HOST_INSTALLED_DIR}/tools/vcpkg-tool-lessmsi/lessmsi.exe" + x + "${KINECTSDK20_MSI_INSTALLER}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src" + LOGNAME extract-msi-${TARGET_TRIPLET} ) - -set(KINECTSDK20_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/Microsoft SDKs/Kinect/${KINECTSDK20_VERSION}") +set(KINECTSDK20_DIR "${CURRENT_BUILDTREES_DIR}/src/KinectSDK-${KINECTSDK20_VERSION}-x64/SourceDir/Microsoft SDKs/Kinect/${KINECTSDK20_VERSION}") file( INSTALL "${KINECTSDK20_DIR}/inc/" DESTINATION - ${CURRENT_PACKAGES_DIR}/include + "${CURRENT_PACKAGES_DIR}/include" ) file( INSTALL "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib" DESTINATION - ${CURRENT_PACKAGES_DIR}/lib + "${CURRENT_PACKAGES_DIR}/lib" ) file( INSTALL "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib" DESTINATION - ${CURRENT_PACKAGES_DIR}/debug/lib + "${CURRENT_PACKAGES_DIR}/debug/lib" ) +configure_file("${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-${PORT}-config.cmake" @ONLY) + # Handle copyright -file(COPY "${KINECTSDK20_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk2) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/copyright) +file(INSTALL "${KINECTSDK20_DIR}/SDKEula.rtf" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/kinectsdk2/vcpkg.json b/ports/kinectsdk2/vcpkg.json index 5b065d28f6a6e2..def81862845891 100644 --- a/ports/kinectsdk2/vcpkg.json +++ b/ports/kinectsdk2/vcpkg.json @@ -1,7 +1,14 @@ { "name": "kinectsdk2", - "version-string": "2.0", - "port-version": 3, + "version": "2.0", + "port-version": 4, "description": "Kinect for Windows SDK for Kinect v2 sensor.", - "supports": "!arm" + "license": null, + "supports": "!arm & windows", + "dependencies": [ + { + "name": "vcpkg-tool-lessmsi", + "host": true + } + ] } diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index badbf8f376d987..b9d01b3cfbac99 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -416,14 +416,6 @@ jinja2cpplight:x64-uwp=fail kfr:arm64-windows=fail kfr:arm-uwp=fail kfr:x64-linux=fail -kinectsdk1:arm64-windows=fail -kinectsdk1:arm-uwp=fail -kinectsdk1:x64-linux=fail -kinectsdk1:x64-osx=fail -kinectsdk2:arm64-windows=fail -kinectsdk2:arm-uwp=fail -kinectsdk2:x64-linux=fail -kinectsdk2:x64-osx=fail lastools:arm-uwp=fail lastools:x64-uwp=fail laszip:arm-uwp=fail diff --git a/versions/baseline.json b/versions/baseline.json index af0c0f094854b8..17debef06d9389 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3278,11 +3278,11 @@ }, "kinectsdk1": { "baseline": "1.8", - "port-version": 4 + "port-version": 5 }, "kinectsdk2": { "baseline": "2.0", - "port-version": 3 + "port-version": 4 }, "kissfft": { "baseline": "2021-11-14", diff --git a/versions/k-/kinectsdk1.json b/versions/k-/kinectsdk1.json index 263c425735568d..5c8c5bfc22c45a 100644 --- a/versions/k-/kinectsdk1.json +++ b/versions/k-/kinectsdk1.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "688e49039e9c86fcb57c431b527a7f125a996857", + "version": "1.8", + "port-version": 5 + }, { "git-tree": "d49f0532a6e9776666ef3960a9b267f32ff3cfc4", "version": "1.8", diff --git a/versions/k-/kinectsdk2.json b/versions/k-/kinectsdk2.json index 0243bb1b496c7b..418b22af43461f 100644 --- a/versions/k-/kinectsdk2.json +++ b/versions/k-/kinectsdk2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2fc9568898ab7f14edea8ffb65da87161c9c0b6c", + "version": "2.0", + "port-version": 4 + }, { "git-tree": "a0a13df11c972355370eef866bd266e2ae7c90d5", "version-string": "2.0",