Add OpenNI2 port

Add OpenNI2 port
This commit is contained in:
Tsukasa Sugiura 2017-06-20 03:15:25 +09:00
parent c5ac989899
commit 23c718eeb2
4 changed files with 1868 additions and 0 deletions

3
ports/openni2/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: openni2
Version: 2.2.0.33
Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera.

View File

@ -0,0 +1,40 @@
diff --git a/OpenNI.sln b/OpenNI.sln
index 9af176a..3786850 100644
--- a/OpenNI.sln
+++ b/OpenNI.sln
@@ -86,12 +86,6 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Install", "Packaging\Instal
{5B74F010-8B79-46B5-B906-C2B56CDB3386} = {5B74F010-8B79-46B5-B906-C2B56CDB3386}
{D5709FB9-909D-415F-8F86-2F25BEF6CE23} = {D5709FB9-909D-415F-8F86-2F25BEF6CE23}
{1723CBBA-8EE7-439A-93FB-2E94B4DB2E63} = {1723CBBA-8EE7-439A-93FB-2E94B4DB2E63}
- {E636BACA-795F-41CF-BC52-14C727BF014E} = {E636BACA-795F-41CF-BC52-14C727BF014E}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Kinect", "Source\Drivers\Kinect\Kinect.vcxproj", "{E636BACA-795F-41CF-BC52-14C727BF014E}"
- ProjectSection(ProjectDependencies) = postProject
- {72D595BB-8C52-449B-91DB-0E9F6AEAF5BB} = {72D595BB-8C52-449B-91DB-0E9F6AEAF5BB}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DepthUtils", "Source\DepthUtils\DepthUtils.vcxproj", "{72D595BB-8C52-449B-91DB-0E9F6AEABBBB}"
@@ -252,14 +246,6 @@ Global
{BAEB9C48-562C-4D56-A6CD-18932265480A}.Debug|x86.ActiveCfg = Debug|x86
{BAEB9C48-562C-4D56-A6CD-18932265480A}.Release|x64.ActiveCfg = Release|x64
{BAEB9C48-562C-4D56-A6CD-18932265480A}.Release|x86.ActiveCfg = Release|x86
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x64.ActiveCfg = Debug|x64
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x64.Build.0 = Debug|x64
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x86.ActiveCfg = Debug|Win32
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x86.Build.0 = Debug|Win32
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x64.ActiveCfg = Release|x64
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x64.Build.0 = Release|x64
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x86.ActiveCfg = Release|Win32
- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x86.Build.0 = Release|Win32
{72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x64.ActiveCfg = Debug|x64
{72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x64.Build.0 = Debug|x64
{72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x86.ActiveCfg = Debug|Win32
@@ -317,7 +303,6 @@ Global
{9F6652AF-35F2-452E-A2D3-08D05F5C075E} = {238D091D-1A85-4A61-9DCD-483768C51804}
{31F0F25B-A84A-48AC-9716-5DF9137F3855} = {238D091D-1A85-4A61-9DCD-483768C51804}
{15ECC029-90DE-4D1D-B00A-4A8E647D8C24} = {238D091D-1A85-4A61-9DCD-483768C51804}
- {E636BACA-795F-41CF-BC52-14C727BF014E} = {238D091D-1A85-4A61-9DCD-483768C51804}
{5B74F010-8B79-46B5-B906-C2B56CDB3386} = {238D091D-1A85-4A61-9DCD-483768C51804}
{BDA3BF24-550A-4BF9-83E5-0056134EED40} = {20285393-1DB1-4300-8AD3-30AEAE3C5DA6}
{D39A4248-3985-41DE-AFD5-AEC58D29291F} = {20285393-1DB1-4300-8AD3-30AEAE3C5DA6}

View File

@ -0,0 +1,241 @@
# Common Ambient Variables:
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
# UWP Not Support
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Error: UWP builds are currently not supported.")
endif()
# Static Build Not Support
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(STATUS "Warning: Static building not supported. Building dynamic.")
set(VCPKG_LIBRARY_LINKAGE "dynamic")
endif()
# Download Source Code
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/OpenNI2-2.2-beta2)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/OpenNI/OpenNI2/archive/2.2-beta2.zip"
FILENAME "OpenNI2-2.2-beta.zip"
SHA512 9779161493114265745c9eb8b15db95a3ed2322cd75504931d0fb7b6214d7abc8a9eb2ea5f35e309bc4d2748f015eee27ada4974a2e9568b5ecb9d98099c84e9
)
vcpkg_extract_source_archive(${ARCHIVE})
# Apply Patches
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/upgrade_projects.patch"
)
set(KINECTSDK10_INSTALLED FALSE)
if(EXISTS "$ENV{KINECTSDK10_DIR}/inc/NuiApi.h")
set(KINECTSDK10_INSTALLED TRUE)
endif()
if(NOT ${KINECTSDK10_INSTALLED})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_kinect.patch"
)
endif()
# Build OpenNI2
vcpkg_build_msbuild(
PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln"
)
# Install OpenNI2
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(PLATFORM Win32)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(PLATFORM x64)
endif()
set(SOURCE_INCLUDE_PATH "${SOURCE_PATH}/Include")
set(SOURCE_BIN_PATH_RELEASE "${SOURCE_PATH}/Bin/${PLATFORM}-Release")
set(SOURCE_BIN_PATH_DEBUG "${SOURCE_PATH}/Bin/${PLATFORM}-Debug")
set(SOURCE_CONFIG_PATH "${SOURCE_PATH}/Config")
set(SOURCE_THIRDPARTY_PATH "${SOURCE_PATH}/ThirdParty")
file(
INSTALL
"${SOURCE_INCLUDE_PATH}/Android-Arm/OniPlatformAndroid-Arm.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include/Android-Arm
)
file(
INSTALL
"${SOURCE_INCLUDE_PATH}/Driver/OniDriverAPI.h"
"${SOURCE_INCLUDE_PATH}/Driver/OniDriverTypes.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include/Driver
)
file(
INSTALL
"${SOURCE_INCLUDE_PATH}/Linux-Arm/OniPlatformLinux-Arm.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include/Linux-Arm
)
file(
INSTALL
"${SOURCE_INCLUDE_PATH}/Linux-x86/OniPlatformLinux-x86.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include/Linux-x86
)
file(
INSTALL
"${SOURCE_INCLUDE_PATH}/MacOSX/OniPlatformMacOSX.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include/MacOSX
)
file(
INSTALL
"${SOURCE_INCLUDE_PATH}/Win32/OniPlatformWin32.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include/Win32
)
file(
INSTALL
"${SOURCE_INCLUDE_PATH}/OniCAPI.h"
"${SOURCE_INCLUDE_PATH}/OniCEnums.h"
"${SOURCE_INCLUDE_PATH}/OniCProperties.h"
"${SOURCE_INCLUDE_PATH}/OniCTypes.h"
"${SOURCE_INCLUDE_PATH}/OniEnums.h"
"${SOURCE_INCLUDE_PATH}/OniPlatform.h"
"${SOURCE_INCLUDE_PATH}/OniProperties.h"
"${SOURCE_INCLUDE_PATH}/OniVersion.h"
"${SOURCE_INCLUDE_PATH}/OpenNI.h"
"${SOURCE_INCLUDE_PATH}/PrimeSense.h"
"${SOURCE_INCLUDE_PATH}/PS1080.h"
"${SOURCE_INCLUDE_PATH}/PSLink.h"
DESTINATION
${CURRENT_PACKAGES_DIR}/include
)
file(
INSTALL
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2.lib"
DESTINATION
${CURRENT_PACKAGES_DIR}/lib
)
file(
INSTALL
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2.lib"
DESTINATION
${CURRENT_PACKAGES_DIR}/debug/lib
)
file(
INSTALL
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PSLink.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini"
DESTINATION
${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers
)
if(${KINECTSDK10_INSTALLED})
file(
INSTALL
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll"
DESTINATION
${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers
)
endif()
file(
INSTALL
"${SOURCE_CONFIG_PATH}/OpenNI.ini"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll"
DESTINATION
${CURRENT_PACKAGES_DIR}/bin
)
file(
INSTALL
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/OniFile.dll"
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PS1080.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini"
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PSLink.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini"
DESTINATION
${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers
)
if(${KINECTSDK10_INSTALLED})
file(
INSTALL
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll"
DESTINATION
${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers
)
endif()
file(
INSTALL
"${SOURCE_CONFIG_PATH}/OpenNI.ini"
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2.dll"
DESTINATION
${CURRENT_PACKAGES_DIR}/debug/bin
)
file(
INSTALL
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PSLink.dll"
"${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini"
DESTINATION
${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers
)
if(${KINECTSDK10_INSTALLED})
file(
INSTALL
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll"
DESTINATION
${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers
)
endif()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(NUMBEROFBIT 32)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(NUMBEROFBIT 64)
endif()
file(
INSTALL
"${SOURCE_THIRDPARTY_PATH}/GL/glut${NUMBEROFBIT}.dll"
"${SOURCE_BIN_PATH_RELEASE}/NiViewer.exe"
"${SOURCE_CONFIG_PATH}/OpenNI.ini"
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll"
"${SOURCE_BIN_PATH_RELEASE}/PS1080Console.exe"
"${SOURCE_BIN_PATH_RELEASE}/PSLinkConsole.exe"
DESTINATION
${CURRENT_PACKAGES_DIR}/tools/openni2/
)
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright)

File diff suppressed because it is too large Load Diff