Skip to content

Commit

Permalink
[openimageio] Separate feature flags for tools and viewer (microsoft#…
Browse files Browse the repository at this point in the history
…34556)

Add feature flag "viewer" which controls building the viewer "iv".
Drop feature flag "tools", build tools (excluding the viewer) unconditionally.
  • Loading branch information
jreichel-nvidia committed Oct 24, 2023
1 parent 3265c18 commit bf6b021
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions ports/openimageio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
webp USE_WEBP
libheif USE_LIBHEIF
pybind11 USE_PYTHON
tools OIIO_BUILD_TOOLS
tools USE_QT
viewer USE_QT
)

vcpkg_cmake_configure(
Expand All @@ -49,6 +48,7 @@ vcpkg_cmake_configure(
${FEATURE_OPTIONS}
-DBUILD_TESTING=OFF
-DOIIO_BUILD_TESTS=OFF
-DOIIO_BUILD_TOOLS=ON
-DUSE_DCMTK=OFF
-DUSE_NUKE=OFF
-DUSE_OpenVDB=OFF
Expand All @@ -73,9 +73,14 @@ vcpkg_cmake_install()

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
AUTO_CLEAN
)

if("viewer" IN_LIST FEATURES)
vcpkg_copy_tools(
TOOL_NAMES iconvert idiff igrep iinfo maketx oiiotool iv
TOOL_NAMES iv
AUTO_CLEAN
)
endif()
Expand Down
6 changes: 3 additions & 3 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 @@ -103,8 +103,8 @@
"python3"
]
},
"tools": {
"description": "Build openimageio tools",
"viewer": {
"description": "Build openimageio viewer",
"dependencies": [
"opengl",
{
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6170,7 +6170,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": "0f22b6f8b638d685c3ac8a1c473e6cc269d7b836",
"version": "2.4.14.0",
"port-version": 3
},
{
"git-tree": "fed3a9ba9a7731e30376ded1d6bdaba3e41b1ec6",
"version": "2.4.14.0",
Expand Down

0 comments on commit bf6b021

Please sign in to comment.