aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/openni2/CONTROL2
-rw-r--r--ports/openni2/portfile.cmake18
2 files changed, 12 insertions, 8 deletions
diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL
index 9dca0b47a..a68d575ba 100644
--- a/ports/openni2/CONTROL
+++ b/ports/openni2/CONTROL
@@ -1,5 +1,5 @@
Source: openni2
-Version: 2.2.0.33-9
+Version: 2.2.0.33-10
Build-Depends: kinectsdk1
Homepage: https://github.com/OpenNI/OpenNI2
Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera.
diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake
index d5be0e3d4..b7064a12c 100644
--- a/ports/openni2/portfile.cmake
+++ b/ports/openni2/portfile.cmake
@@ -1,8 +1,15 @@
include(vcpkg_common_functions)
+
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
endif()
+find_path(COR_H_PATH cor.h)
+if(COR_H_PATH MATCHES "NOTFOUND")
+ message(FATAL_ERROR "Could not find <cor.h>. Ensure the NETFXSDK is installed.")
+endif()
+get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE)
+
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
vcpkg_from_github(
@@ -11,13 +18,9 @@ vcpkg_from_github(
REF 2.2-beta2
SHA512 60a3a3043679f3069aea869e92dc5881328ce4393d4140ea8d089027321ac501ae27d283657214e2834d216d0d49bf4f29a4b3d3e43df27a6ed21f889cd0083f
HEAD_REF master
-)
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch"
- "${CMAKE_CURRENT_LIST_DIR}/inherit_from_parent_or_project_defaults.patch"
- "${CMAKE_CURRENT_LIST_DIR}/replace_environment_variable.patch"
+ PATCHES upgrade_projects.patch
+ inherit_from_parent_or_project_defaults.patch
+ replace_environment_variable.patch
)
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
@@ -34,6 +37,7 @@ configure_file("${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" "${SOURCE_P
# Build OpenNI2
vcpkg_build_msbuild(
PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln"
+ OPTIONS "/p:DotNetSdkRoot=${NETFXSDK_PATH}/"
)
# Install OpenNI2