Skip to content

Commit

Permalink
[openimageio] Separate feature flags for tools and viewer (#34556) (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
jreichel-nvidia authored Oct 28, 2023
1 parent 9ffbe67 commit 5db5459
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 6 deletions.
11 changes: 9 additions & 2 deletions ports/openimageio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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()
Expand Down
13 changes: 11 additions & 2 deletions ports/openimageio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion ports/theia/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
"platform": "!osx"
},
"glew",
"openimageio",
{
"name": "openimageio",
"features": [
"viewer"
]
},
{
"name": "vcpkg-cmake",
"host": true
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6182,7 +6182,7 @@
},
"openimageio": {
"baseline": "2.4.14.0",
"port-version": 2
"port-version": 3
},
"openjpeg": {
"baseline": "2.5.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openimageio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "76cadb5ec79b57f840f2dae9dc39501b027f6a9f",
"version": "2.4.14.0",
"port-version": 3
},
{
"git-tree": "fed3a9ba9a7731e30376ded1d6bdaba3e41b1ec6",
"version": "2.4.14.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/t-/theia.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
{
"git-tree": "244b1ee4928a23a5394691a642a1b56125198228",
"version": "0.8",
"port-version": 10
},
{
"git-tree": "f33100aa143474a7207ee0f2ec7daf0fda3a74a5",
"version": "0.8",
"port-version": 9
},
{
Expand Down

0 comments on commit 5db5459

Please sign in to comment.