mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
new port libfreenect2
This commit is contained in:
parent
084b1afe9a
commit
050a8bf617
4
ports/libfreenect2/CONTROL
Normal file
4
ports/libfreenect2/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: libfreenect2
|
||||
Version: 0.2.0
|
||||
Build-Depends:libusb
|
||||
Description: Open source drivers for the Kinect for Windows v2 device
|
41
ports/libfreenect2/portfile.cmake
Normal file
41
ports/libfreenect2/portfile.cmake
Normal file
@ -0,0 +1,41 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO OpenKinect/libfreenect2
|
||||
REF v0.2.0
|
||||
SHA512 3525e3f21462cecd3b198f64545786ffddc2cafdfd8146e5a46f0300b83f29f1ad0739618a07ab195c276149d7e2e909f7662e2d379a2880593cac75942b0666
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
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}")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DENABLE_CUDA=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/freenect2")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# The cmake config is actually called freenect2Config.cmake instead of libfreenect2Config.cmake ...
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2 ${CURRENT_PACKAGES_DIR}/share/freenect2)
|
||||
|
||||
# license file needs to be in share/libfreenect2 otherwise vcpkg will complain
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libfreenect2/)
|
||||
file(COPY ${SOURCE_PATH}/GPL2 DESTINATION ${CURRENT_PACKAGES_DIR}/share/libfreenect2/)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libfreenect2/GPL2 ${CURRENT_PACKAGES_DIR}/share/libfreenect2/copyright)
|
Loading…
x
Reference in New Issue
Block a user