From 3b9d086009cc1c2256e9c28ad44a00036fbd9b26 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Fri, 24 Oct 2025 09:55:40 +0200 Subject: [PATCH] [vsgqt] New port (#47899) --- ports/vsgqt/portfile.cmake | 30 +++++++++++++++++++ ports/vsgqt/vcpkg.json | 25 ++++++++++++++++ scripts/ci.baseline.txt | 4 +++ scripts/ci.feature.baseline.txt | 1 + .../test_ports/vcpkg-ci-vsgqt/portfile.cmake | 22 ++++++++++++++ .../vcpkg-ci-vsgqt/project/CMakeLists.txt | 15 ++++++++++ scripts/test_ports/vcpkg-ci-vsgqt/vcpkg.json | 28 +++++++++++++++++ versions/baseline.json | 4 +++ versions/v-/vsgqt.json | 9 ++++++ 9 files changed, 138 insertions(+) create mode 100644 ports/vsgqt/portfile.cmake create mode 100644 ports/vsgqt/vcpkg.json create mode 100644 scripts/test_ports/vcpkg-ci-vsgqt/portfile.cmake create mode 100644 scripts/test_ports/vcpkg-ci-vsgqt/project/CMakeLists.txt create mode 100644 scripts/test_ports/vcpkg-ci-vsgqt/vcpkg.json create mode 100644 versions/v-/vsgqt.json diff --git a/ports/vsgqt/portfile.cmake b/ports/vsgqt/portfile.cmake new file mode 100644 index 0000000000..bac89529c2 --- /dev/null +++ b/ports/vsgqt/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vsg-dev/vsgQt + REF v${VERSION} + SHA512 0c753d573eeec77bdddab0f3499b7fbabc4c0840246501dd83ef1e3a96effacf9cd9a84d5c1c35b49462520a2840ddd02eeefa92c55b23dc44ce9fc285cbee3b + HEAD_REF master +) +file(WRITE "${SOURCE_PATH}/examples/CMakeLists.txt" "# skipped by vcpkg\n") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DQT_PACKAGE_NAME=Qt6 +) +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/vsgQt") +vcpkg_copy_pdbs() + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/vsgqt/vsgQtConfig.cmake" + "#generated by cmake, do not change" [[ +include(CMakeFindDependencyMacro) +find_dependency(vsg) +find_dependency(Qt6 COMPONENTS Widgets) +]]) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") diff --git a/ports/vsgqt/vcpkg.json b/ports/vsgqt/vcpkg.json new file mode 100644 index 0000000000..0afcc9f2ea --- /dev/null +++ b/ports/vsgqt/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "vsgqt", + "version": "0.4.0", + "description": "Qt integration with VulkanSceneGraph", + "homepage": "https://github.com/vsg-dev/vsgQt/", + "license": "MIT", + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "widgets" + ] + }, + { + "name": "vcpkg-cmake", + "default-features": false + }, + { + "name": "vcpkg-cmake-config", + "default-features": false + }, + "vsg" + ] +} diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 4636b0bea9..2745fa1d27 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -809,6 +809,10 @@ v8:x64-windows-static-md=fail v8:x64-windows-static=fail v8:x64-windows=fail v8:x86-windows=fail +# https://github.com/vsg-dev/vsgQt/pull/53 +vsgqt:arm-neon-android=fail +vsgqt:arm64-android=fail +vsgqt:x64-android=fail wasmedge:arm-neon-android=fail # Collides with libpcap -> similar headers winpcap:x64-windows-release=skip diff --git a/scripts/ci.feature.baseline.txt b/scripts/ci.feature.baseline.txt index 0bddb2d6f6..cc5624b1a6 100644 --- a/scripts/ci.feature.baseline.txt +++ b/scripts/ci.feature.baseline.txt @@ -1940,6 +1940,7 @@ tgui[sdl2] = options # At least one of the backend features must be selected: sd vlfeat[openmp](osx) = feature-fails # No openmp on osx vlpp[tools](linux) = feature-fails # See https://github.com/microsoft/vcpkg/issues/32143 (error: inconsistent begin/end types in range-based ‘for’ statement) vlpp[tools](osx) = feature-fails # error: use of undeclared identifier 'PATH_MAX' +vsgqt(android) = fail # https://github.com/vsg-dev/vsgQt/pull/53 vtk[all](!windows & !android & !osx) = feature-fails # Wait for fix: https://github.com/microsoft/vcpkg/pull/29260 vtk[all,python]:x64-windows-static-md = feature-fails # vtk[*] dbg: defaultlib 'MSVCRT' conflicts with use of other libs due to python vtk[core,python,paraview]:x64-linux = options # paraview's transitive gfortran linkage breaks python diff --git a/scripts/test_ports/vcpkg-ci-vsgqt/portfile.cmake b/scripts/test_ports/vcpkg-ci-vsgqt/portfile.cmake new file mode 100644 index 0000000000..b7616f5641 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-vsgqt/portfile.cmake @@ -0,0 +1,22 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vsg-dev/vsgQt + REF v0.4.0 + SHA512 0c753d573eeec77bdddab0f3499b7fbabc4c0840246501dd83ef1e3a96effacf9cd9a84d5c1c35b49462520a2840ddd02eeefa92c55b23dc44ce9fc285cbee3b + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS options + FEATURES + vsgxchange USE_VSGXCHANGE +) + +vcpkg_cmake_configure( + SOURCE_PATH "${CURRENT_PORT_DIR}/project" + OPTIONS + "-DSOURCE_PATH=${SOURCE_PATH}" + ${options} +) +vcpkg_cmake_build() diff --git a/scripts/test_ports/vcpkg-ci-vsgqt/project/CMakeLists.txt b/scripts/test_ports/vcpkg-ci-vsgqt/project/CMakeLists.txt new file mode 100644 index 0000000000..114038632c --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-vsgqt/project/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.16) +project(vsgqt-test) + +set(CMAKE_CXX_STANDARD 17) + +find_package(vsgQt CONFIG REQUIRED) + +add_executable(vsgqtviewer "${SOURCE_PATH}/examples/vsgqtviewer/main.cpp") +target_link_libraries(vsgqtviewer PRIVATE vsgQt::vsgQt) + +if (USE_VSGXCHANGE) + find_package(vsgXchange CONFIG REQUIRED) + target_compile_definitions(vsgqtviewer PRIVATE vsgXchange_FOUND) + target_link_libraries(vsgqtviewer PRIVATE vsgXchange::vsgXchange) +endif() diff --git a/scripts/test_ports/vcpkg-ci-vsgqt/vcpkg.json b/scripts/test_ports/vcpkg-ci-vsgqt/vcpkg.json new file mode 100644 index 0000000000..c1052c06f7 --- /dev/null +++ b/scripts/test_ports/vcpkg-ci-vsgqt/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "vcpkg-ci-vsgqt", + "version-string": "ci", + "description": "Port to validate vsgqt in CI", + "homepage": "https://github.com/microsoft/vcpkg", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vsgqt", + "default-features": false + } + ], + "default-features": [ + "vsgxchange" + ], + "features": { + "vsgxchange": { + "description": "Build with vsgxchange", + "dependencies": [ + "vsgxchange" + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 62ea414417..634c48e8ff 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -10248,6 +10248,10 @@ "baseline": "0.7.0", "port-version": 0 }, + "vsgqt": { + "baseline": "0.4.0", + "port-version": 0 + }, "vsgxchange": { "baseline": "1.1.7", "port-version": 0 diff --git a/versions/v-/vsgqt.json b/versions/v-/vsgqt.json new file mode 100644 index 0000000000..fe3d102244 --- /dev/null +++ b/versions/v-/vsgqt.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "ab7cd857ba48cbd7e585de749fe82bd51cea5479", + "version": "0.4.0", + "port-version": 0 + } + ] +}