2017-09-27 15:23:27 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenKinect/libfreenect2
|
|
|
|
REF v0.2.0
|
|
|
|
SHA512 3525e3f21462cecd3b198f64545786ffddc2cafdfd8146e5a46f0300b83f29f1ad0739618a07ab195c276149d7e2e909f7662e2d379a2880593cac75942b0666
|
|
|
|
HEAD_REF master
|
2022-04-21 05:43:38 +08:00
|
|
|
PATCHES
|
|
|
|
fix-dependency-libusb.patch
|
|
|
|
fix-macbuild.patch
|
2017-09-27 15:23:27 +08:00
|
|
|
)
|
|
|
|
|
2022-04-21 05:43:38 +08:00
|
|
|
file(READ "${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake" FINDLIBUSB)
|
2017-09-27 15:23:27 +08:00
|
|
|
string(REPLACE "(WIN32)"
|
|
|
|
"(WIN32_DISABLE)" FINDLIBUSB "${FINDLIBUSB}")
|
2022-04-21 05:43:38 +08:00
|
|
|
file(WRITE "${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake" "${FINDLIBUSB}")
|
2017-09-27 15:23:27 +08:00
|
|
|
|
2020-01-07 02:49:04 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2022-07-07 04:47:36 +08:00
|
|
|
FEATURES
|
|
|
|
opengl ENABLE_OPENGL
|
|
|
|
opencl ENABLE_OPENCL
|
|
|
|
openni2 BUILD_OPENNI2_DRIVER
|
2020-01-07 02:49:04 +08:00
|
|
|
)
|
|
|
|
|
2022-04-21 05:43:38 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-09-27 15:23:27 +08:00
|
|
|
OPTIONS
|
|
|
|
-DENABLE_CUDA=OFF
|
2022-04-21 05:43:38 +08:00
|
|
|
-DBUILD_EXAMPLES=OFF
|
2020-01-07 02:49:04 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2017-09-27 15:23:27 +08:00
|
|
|
)
|
|
|
|
|
2022-04-21 05:43:38 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-09-27 15:23:27 +08:00
|
|
|
|
2022-04-21 05:43:38 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME freenect2 CONFIG_PATH lib/cmake/freenect2)
|
2017-09-27 15:23:27 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-04-21 05:43:38 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-09-27 15:23:27 +08:00
|
|
|
|
2022-04-21 05:43:38 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/GPL2" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2021-10-28 06:19:28 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|