mirror of https://github.com/microsoft/vcpkg.git
[vcpkg-ci-libusb] New ci port (#52081)
This commit is contained in:
parent
9e53836916
commit
f95c7afcc0
|
|
@ -0,0 +1,10 @@
|
|||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${CURRENT_PORT_DIR}/project"
|
||||
OPTIONS
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
)
|
||||
vcpkg_cmake_build()
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.16)
|
||||
project(vcpkg-ci-libusb C)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(libusb IMPORTED_TARGET REQUIRED libusb-1.0)
|
||||
|
||||
add_executable(main main.c)
|
||||
target_link_libraries(main PRIVATE PkgConfig::libusb)
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#include <libusb.h>
|
||||
|
||||
int main() {
|
||||
libusb_context *ctx = NULL;
|
||||
int ret = libusb_init(&ctx);
|
||||
if (ret != 0) return 1;
|
||||
libusb_exit(ctx);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "vcpkg-ci-libusb",
|
||||
"version-string": "ci",
|
||||
"description": "Validates libusb",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "libusb"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue