2021-02-09 10:29:15 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libuvc/libuvc
|
2023-12-14 16:07:17 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 cf2c0a6cc04717f284f25bed17f178a4b2b2a2bb3e5937e50be144e88db2c481c5ea763c164fe0234834fea4837f96fcc13bdbdafd4610d2985943562dfcc72f
|
2021-02-09 10:29:15 +08:00
|
|
|
HEAD_REF master
|
2021-09-11 04:41:46 +08:00
|
|
|
PATCHES build_fix.patch
|
2021-02-09 10:29:15 +08:00
|
|
|
)
|
|
|
|
|
2021-09-11 04:41:46 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
set(BUILD_TARGET "Shared")
|
|
|
|
else()
|
|
|
|
set(BUILD_TARGET "Static")
|
|
|
|
endif()
|
2021-02-09 10:29:15 +08:00
|
|
|
|
2024-05-29 16:06:23 +08:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
2021-09-11 04:41:46 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2024-05-29 16:06:23 +08:00
|
|
|
-DPKG_CONFIG_EXECUTABLE="${PKGCONFIG}"
|
2021-09-11 04:41:46 +08:00
|
|
|
-DCMAKE_BUILD_TARGET=${BUILD_TARGET}
|
|
|
|
-DBUILD_EXAMPLE=OFF
|
2024-05-29 16:06:23 +08:00
|
|
|
-DBUILD_TEST=OFF
|
2021-09-11 04:41:46 +08:00
|
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
2021-02-09 10:29:15 +08:00
|
|
|
|
2024-05-29 16:06:23 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-09-11 04:41:46 +08:00
|
|
|
|
2024-05-29 16:06:23 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-02-09 10:29:15 +08:00
|
|
|
|
2023-12-14 16:07:17 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
2024-05-29 16:06:23 +08:00
|
|
|
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|