diff options
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-gz-common')
4 files changed, 52 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/portfile.cmake new file mode 100644 index 0000000..dd25706 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/portfile.cmake @@ -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() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/project/CMakeLists.txt b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/project/CMakeLists.txt new file mode 100644 index 0000000..a7dfd85 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/project/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.30) +project(gz-common-test) + +find_package(gz-common6 QUIET REQUIRED COMPONENTS av) + +add_executable(main main.cpp) +target_link_libraries(main PRIVATE gz-common6::gz-common6-av) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(gz-common_pc gz-common6-av REQUIRED IMPORTED_TARGET) + +add_executable(main-pkconfig main.cpp) +target_link_libraries(main-pkconfig PRIVATE PkgConfig::gz-common_pc) +if(MSVC) + target_compile_features(main-pkconfig PRIVATE cxx_std_17) +endif() diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/project/main.cpp b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/project/main.cpp new file mode 100644 index 0000000..916dda8 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/project/main.cpp @@ -0,0 +1,9 @@ +#include <gz/common/Console.hh> +#include <gz/common/VideoEncoder.hh> + +int main() +{ + gz::common::VideoEncoder v{}; + gzwarn << "Hello vcpkg" << std::endl; + return 0; +} diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/vcpkg.json b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/vcpkg.json new file mode 100644 index 0000000..d08b106 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-gz-common/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "vcpkg-ci-gz-common", + "version-string": "ci", + "description": "Port to force features of gz-common within CI", + "homepage": "https://github.com/microsoft/vcpkg", + "license": "MIT", + "dependencies": [ + { + "name": "gz-common", + "default-features": false + }, + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |