mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 06:08:59 +08:00
[libfreenect2] Fix MACOS build error (#24265)
* [libfreenect2] Fix MACOS build error * update vcpkg.json * update version * Disable build example * update version Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
This commit is contained in:
parent
ac6a9dcfce
commit
8223177f4d
22
ports/libfreenect2/fix-macbuild.patch
Normal file
22
ports/libfreenect2/fix-macbuild.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index aedc576..4f16abc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -165,6 +165,8 @@ SET(LIBFREENECT2_DLLS
|
||||
SET(HAVE_VideoToolbox "no (Apple only)")
|
||||
IF(APPLE)
|
||||
FIND_LIBRARY(VIDEOTOOLBOX_LIBRARY VideoToolbox)
|
||||
+ FIND_LIBRARY(CF_LIBRARY CoreFoundation)
|
||||
+ FIND_LIBRARY(IOK_LIBRARY IOKit)
|
||||
|
||||
SET(HAVE_VideoToolbox no)
|
||||
IF(VIDEOTOOLBOX_LIBRARY)
|
||||
@@ -184,6 +186,8 @@ IF(APPLE)
|
||||
${COREFOUNDATION_LIBRARY}
|
||||
${COREMEDIA_LIBRARY}
|
||||
${COREVIDEO_LIBRARY}
|
||||
+ ${CF_LIBRARY}
|
||||
+ ${IOK_LIBRARY}
|
||||
)
|
||||
ENDIF(VIDEOTOOLBOX_LIBRARY)
|
||||
ENDIF(APPLE)
|
@ -4,41 +4,37 @@ vcpkg_from_github(
|
||||
REF v0.2.0
|
||||
SHA512 3525e3f21462cecd3b198f64545786ffddc2cafdfd8146e5a46f0300b83f29f1ad0739618a07ab195c276149d7e2e909f7662e2d379a2880593cac75942b0666
|
||||
HEAD_REF master
|
||||
PATCHES fix-dependency-libusb.patch
|
||||
PATCHES
|
||||
fix-dependency-libusb.patch
|
||||
fix-macbuild.patch
|
||||
)
|
||||
|
||||
file(READ ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake FINDLIBUSB)
|
||||
file(READ "${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake" FINDLIBUSB)
|
||||
string(REPLACE "(WIN32)"
|
||||
"(WIN32_DISABLE)" FINDLIBUSB "${FINDLIBUSB}")
|
||||
file(WRITE ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake "${FINDLIBUSB}")
|
||||
|
||||
file(READ ${SOURCE_PATH}/examples/CMakeLists.txt EXAMPLECMAKE)
|
||||
string(REPLACE "(WIN32)"
|
||||
"(WIN32_DISABLE)" EXAMPLECMAKE "${EXAMPLECMAKE}")
|
||||
file(WRITE ${SOURCE_PATH}/examples/CMakeLists.txt "${EXAMPLECMAKE}")
|
||||
file(WRITE "${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake" "${FINDLIBUSB}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
opengl ENABLE_OPENGL
|
||||
opencl ENABLE_OPENCL
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DENABLE_CUDA=OFF
|
||||
# FEATURES
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freenect2 TARGET_PATH share/freenect2)
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME freenect2 CONFIG_PATH lib/cmake/freenect2)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/GPL2 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/GPL2" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
@ -1,12 +1,21 @@
|
||||
{
|
||||
"name": "libfreenect2",
|
||||
"version-string": "0.2.0",
|
||||
"port-version": 7,
|
||||
"version": "0.2.0",
|
||||
"port-version": 8,
|
||||
"description": "Open source drivers for the Kinect for Windows v2 device",
|
||||
"homepage": "https://github.com/OpenKinect/libfreenect2",
|
||||
"license": "GPL-2.0-only",
|
||||
"dependencies": [
|
||||
"libjpeg-turbo",
|
||||
"libusb"
|
||||
"libusb",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"opengl"
|
||||
|
@ -496,7 +496,6 @@ libevhtp:arm-uwp=fail
|
||||
libexif:arm-uwp=fail
|
||||
libexif:x64-uwp=fail
|
||||
libfreenect2:arm64-windows=fail
|
||||
libfreenect2:x64-osx=fail
|
||||
libgit2:arm-uwp=fail
|
||||
libgit2:x64-uwp=fail
|
||||
libgo:arm-uwp=fail
|
||||
|
@ -3558,7 +3558,7 @@
|
||||
},
|
||||
"libfreenect2": {
|
||||
"baseline": "0.2.0",
|
||||
"port-version": 7
|
||||
"port-version": 8
|
||||
},
|
||||
"libftdi": {
|
||||
"baseline": "0.20",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ce8aefbc76e982371258202989111294d9a5221d",
|
||||
"version": "0.2.0",
|
||||
"port-version": 8
|
||||
},
|
||||
{
|
||||
"git-tree": "cdedefe776984f442e8af70b0e0738d12d56fafa",
|
||||
"version-string": "0.2.0",
|
||||
|
Loading…
Reference in New Issue
Block a user