Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
45 changes: 45 additions & 0 deletions ports/duvc-ctl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO allanhanan/duvc-ctl
REF "v${VERSION}"
SHA512 5cc63ef7c3a46fb351015ae2b1b96837ea46dbb7656ab1cf633af6027d32ae447dfc60a8757677eae07dabfb3ec1aca90f7019a6d7b5344c66324d39e9f0c464
HEAD_REF main
)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" DUVC_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DUVC_BUILD_SHARED)

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()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

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

find_package(duvc CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:duvc::core-static>,duvc::core-static,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": "1c50cac55382709d8b9a5b22250fd6f37d9566e8",
"version": "2.0.1",
"port-version": 0
}
]
}