From 5db545950d273aa3af8f18a159d851a62274cc7c Mon Sep 17 00:00:00 2001 From: jreichel-nvidia <43646584+jreichel-nvidia@users.noreply.github.com> Date: Sat, 28 Oct 2023 03:54:58 +0200 Subject: [PATCH] [openimageio] Separate feature flags for tools and viewer (#34556) (#34699) * [openimageio] Separate feature flags for tools and viewer (#34556) Add feature flag "viewer" which controls building the viewer "iv". Drop feature flag "tools", build tools (excluding the viewer) unconditionally. * Re-add "tools" flag. Make "viewer" flag depend on "tools" flag. * Ensure that Qt does not get picked up by accident if the "viewer" flag is not selected. Make hidden dependency of theia on OpenImageIO::iv explicit. * Fix syntax error in USE_QT option. * Use ENABLE_IV instead of USE_QT. Remove explicit setting of -DUSE_QT=OFF. --- ports/openimageio/portfile.cmake | 11 +++++++++-- ports/openimageio/vcpkg.json | 13 +++++++++++-- ports/theia/vcpkg.json | 7 ++++++- versions/baseline.json | 2 +- versions/o-/openimageio.json | 5 +++++ versions/t-/theia.json | 5 +++++ 6 files changed, 37 insertions(+), 6 deletions(-) diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index d56f4ed2bb25e9..ec4f38526e797e 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -40,7 +40,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS libheif USE_LIBHEIF pybind11 USE_PYTHON tools OIIO_BUILD_TOOLS - tools USE_QT + viewer ENABLE_IV ) vcpkg_cmake_configure( @@ -75,7 +75,14 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenImageIO) if("tools" IN_LIST FEATURES) vcpkg_copy_tools( - TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool iv + TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool + AUTO_CLEAN + ) +endif() + +if("viewer" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES iv AUTO_CLEAN ) endif() diff --git a/ports/openimageio/vcpkg.json b/ports/openimageio/vcpkg.json index a2b67d66495bdd..542742e24bc5fa 100644 --- a/ports/openimageio/vcpkg.json +++ b/ports/openimageio/vcpkg.json @@ -1,7 +1,7 @@ { "name": "openimageio", "version": "2.4.14.0", - "port-version": 2, + "port-version": 3, "description": "A library for reading and writing images, and a bunch of related classes, utilities, and application.", "homepage": "https://github.com/OpenImageIO/oiio", "license": "BSD-3-Clause", @@ -104,9 +104,18 @@ ] }, "tools": { - "description": "Build openimageio tools", + "description": "Build openimageio tools" + }, + "viewer": { + "description": "Build openimageio viewer", "dependencies": [ "opengl", + { + "name": "openimageio", + "features": [ + "tools" + ] + }, { "name": "qtbase", "default-features": false diff --git a/ports/theia/vcpkg.json b/ports/theia/vcpkg.json index 2ccb278665858a..19788cbb3fde04 100644 --- a/ports/theia/vcpkg.json +++ b/ports/theia/vcpkg.json @@ -20,7 +20,12 @@ "platform": "!osx" }, "glew", - "openimageio", + { + "name": "openimageio", + "features": [ + "viewer" + ] + }, { "name": "vcpkg-cmake", "host": true diff --git a/versions/baseline.json b/versions/baseline.json index 7468b3412f48b0..c36319272da4b3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6182,7 +6182,7 @@ }, "openimageio": { "baseline": "2.4.14.0", - "port-version": 2 + "port-version": 3 }, "openjpeg": { "baseline": "2.5.0", diff --git a/versions/o-/openimageio.json b/versions/o-/openimageio.json index 49da4aa3b11724..22f1419abef71a 100644 --- a/versions/o-/openimageio.json +++ b/versions/o-/openimageio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "76cadb5ec79b57f840f2dae9dc39501b027f6a9f", + "version": "2.4.14.0", + "port-version": 3 + }, { "git-tree": "fed3a9ba9a7731e30376ded1d6bdaba3e41b1ec6", "version": "2.4.14.0", diff --git a/versions/t-/theia.json b/versions/t-/theia.json index f0635cef394eeb..de8ab5f9cef438 100644 --- a/versions/t-/theia.json +++ b/versions/t-/theia.json @@ -3,6 +3,11 @@ { "git-tree": "244b1ee4928a23a5394691a642a1b56125198228", "version": "0.8", + "port-version": 10 + }, + { + "git-tree": "f33100aa143474a7207ee0f2ec7daf0fda3a74a5", + "version": "0.8", "port-version": 9 }, {