Skip to content

Commit

Permalink
[openni2]Add warning message when cannot find NETFXSDK. (microsoft#7809)
Browse files Browse the repository at this point in the history
* [openni2]Add warning message when cannot find NETFXSDK.

* [openni2]Move warning at top.
  • Loading branch information
JackBoosY authored and Rastaban committed Aug 27, 2019
1 parent 85d575c commit b23e2fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ports/openni2/CONTROL
Original file line number Diff line number Diff line change
@@ -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.
18 changes: 11 additions & 7 deletions ports/openni2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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})
Expand All @@ -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
Expand Down

0 comments on commit b23e2fc

Please sign in to comment.