Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions ports/duvc-ctl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO allanhanan/duvc-ctl
REF "v${VERSION}"
SHA512 5cc63ef7c3a46fb351015ae2b1b96837ea46dbb7656ab1cf633af6027d32ae447dfc60a8757677eae07dabfb3ec1aca90f7019a6d7b5344c66324d39e9f0c464
HEAD_REF main
)

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(DUVC_BUILD_SHARED ON)
set(DUVC_BUILD_STATIC OFF)
else()
set(DUVC_BUILD_SHARED OFF)
set(DUVC_BUILD_STATIC ON)
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DDUVC_BUILD_SHARED=${DUVC_BUILD_SHARED}
-DDUVC_BUILD_STATIC=${DUVC_BUILD_STATIC}
-DDUVC_BUILD_C_API=OFF
-DDUVC_BUILD_CLI=OFF
-DDUVC_BUILD_TESTS=OFF
-DDUVC_BUILD_EXAMPLES=OFF
-DDUVC_BUILD_PYTHON=OFF
-DDUVC_BUILD_DOCS=OFF
-DDUVC_INSTALL=ON
-DDUVC_INSTALL_CMAKE_CONFIG=ON
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/duvc-ctl")
vcpkg_fixup_pkgconfig()


vcpkg_copy_pdbs()

if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
endif()

file(INSTALL "${SOURCE_PATH}/LICENSE"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright)

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
11 changes: 11 additions & 0 deletions ports/duvc-ctl/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
duvc-ctl provides CMake targets:

find_package(duvc CONFIG REQUIRED)

for static linking:

target_link_libraries(main PRIVATE duvc::core-static)

Or for shared linking:

target_link_libraries(main PRIVATE duvc::core-shared)
19 changes: 19 additions & 0 deletions ports/duvc-ctl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "duvc-ctl",
"version": "2.0.1",
"description": "Windows DirectShow UVC camera control library",
"homepage": "https://github.com/allanhanan/duvc-ctl",
"license": "MIT",
"supports": "windows & !uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,10 @@
"baseline": "2.0.3",
"port-version": 0
},
"duvc-ctl": {
"baseline": "2.0.1",
"port-version": 0
},
"dv-processing": {
"baseline": "2.0.2",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/d-/duvc-ctl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "97dd1e5a642ee69388849c84db7aaa522d3af4a6",
"version": "2.0.1",
"port-version": 0
}
]
}