Skip to content

Commit

Permalink
deps: Add build recipe for PNG
Browse files Browse the repository at this point in the history
Signed-off-by: Zach Lewis <[email protected]>

fix: Only build static, and turn off Framework build

MacOS builds require that PNG_FRAMEWORK=OFF in order to find and install dynamic libraries...
...but Windows still has trouble finding and installing dynamic libraries.

Only building static libraries seems to work, as far as building wheels is concerned; but I fear older dynamic libpngs found on the system will be preferred over newer static libpngs freshly-built by OIIO when linking.

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): set CMAKE_FIND_ROOT_PATH in build recipe

Attempt to force the build system to always find the locally-built PNG before any system-installed PNGs

Signed-off-by: Zach Lewis <[email protected]>

fix: use find_package HINTS option

Signed-off-by: Zach Lewis <[email protected]>

fix(PNG): typo in build recipe version comparison

*Now* it should use PNG's CMake Config....

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): force build recipe to always (re)find the static PNG libs

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): force build recipe to always build dynamic libs

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): hint libpng16.cmake location to find_package

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): if building PNG, guard against refinding system PNG

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): unset PNG_VERSION etc. at top of build recipe

To keep the build system from getting confused and trying to link found-but-too-old libraries if it can't find the recipe's libpng. So, if our libpng can't be found for whatever reason, this should prevent the build system from silently failing over to linking the found-but-too-old libraries.

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): try using pkg-config to find libpng

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): cleanup build recipe

once more, with feeling.

Signed-off-by: Zach Lewis <[email protected]>

deps(PNG): use find_package in build recipe

Signed-off-by: Zach Lewis <[email protected]>

build: add build_dependency_with_fetchcontent macro

Adds and uses a new macro which attempts to do exactly what the existing `build_dependency_with_cmake` macro does, but with FetchContent_Declare and FetchContent_Populate.

Signed-off-by: Zach Lewis <[email protected]>

Revert "Merge branch 'main' into build_PNG"

This reverts commit 7d82e61, reversing
changes made to bccf100.

Signed-off-by: Zach Lewis <[email protected]>

test: try updating CMake to 3.24 for the `linux-disabled` CI test

Temporary change -- testing to see if using a version of CMake that supports the FetchContent_Declare OVERRIDE_FIND_PACKAGE option

Signed-off-by: Zach Lewis <[email protected]>

Revert "test: try updating CMake to 3.24 for the `linux-disabled` CI test"

This reverts commit f746c73.

Signed-off-by: Zach Lewis <[email protected]>

build(PNG): try find_package instead of re-finding package

Signed-off-by: Zach Lewis <[email protected]>

build(PNG): unset PNG_* vars at top of build rx

Signed-off-by: Zach Lewis <[email protected]>

build(PNG): also unset PNG_INCLUDE_DIR at top of build rx

Signed-off-by: Zach Lewis <[email protected]>
  • Loading branch information
zachlewis committed Oct 31, 2024
1 parent f6c7e4f commit 90f4b4e
Show file tree
Hide file tree
Showing 152 changed files with 7,729 additions and 1,750 deletions.
1 change: 1 addition & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
CMAKE_UNITY_BUILD=OFF
CODECOV=1
CTEST_TEST_TIMEOUT=1200
OIIO_CMAKE_FLAGS="-DOIIO_TEX_IMPLEMENT_VARYINGREF=OFF"

runs-on: ${{ matrix.os }}
container:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
openexr_ver: v3.1.0
pybind11_ver: v2.7.0
python_ver: 3.7
setenvs: export CMAKE_VERSION=3.18.2
setenvs: export CMAKE_VERSION=3.15.5
PTEX_VERSION=v2.3.2
WEBP_VERSION=v1.1.0
depcmds: sudo rm -rf /usr/local/include/OpenEXR
Expand All @@ -189,7 +189,7 @@ jobs:
python_ver: 3.7
simd: 0
setenvs: export EMBEDPLUGINS=0
CMAKE_VERSION=3.18.2
CMAKE_VERSION=3.15.5
PTEX_VERSION=v2.3.2
WEBP_VERSION=v1.1.0
USE_JPEGTURBO=0
Expand Down Expand Up @@ -358,11 +358,11 @@ jobs:
PUGIXML_VERSION=master
WEBP_VERSION=main
OIIO_CMAKE_FLAGS="-DFORTIFY_SOURCE=2"
QT_VERSION=6
EXTRA_DEP_PACKAGES="python3.12-dev python3-numpy"
USE_OPENVDB=0
SKIP_APT_GET_UPDATE=1
FREETYPE_VERSION=master
QT_VERSION=0 INSTALL_OPENCV=0
# The installed OpenVDB has a TLS conflict with Python 3.8
# Disabling the `apt-get update` in gh-installdeps.bash
# addresses a job killing problem in the GHA Ubuntu
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,16 @@ on:
# Skip jobs when only cpp files are changed. The materials for
# docs are all in md, rst, and .h files.
paths-ignore:
- '**/ci.yml'
- '**/analysis.yml'
- '**.properties'
- 'src/**.cpp'
- '**.cpp'
- '**.cmake'
- '**/run.py'
pull_request:
paths-ignore:
- '**/ci.yml'
- '**/analysis.yml'
- '**.properties'
- 'src/**.cpp'
- '**.cpp'
- '**.cmake'
- '**/run.py'
schedule:
# Full nightly build
- cron: "0 8 * * *"
Expand Down
5,220 changes: 5,123 additions & 97 deletions CHANGES.md

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
# https://github.com/AcademySoftwareFoundation/OpenImageIO

cmake_minimum_required (VERSION 3.18.2)
cmake_minimum_required (VERSION 3.15)

set (OpenImageIO_VERSION "3.1.0.0")
set (OpenImageIO_VERSION "2.6.7.0")
set (OpenImageIO_VERSION_OVERRIDE "" CACHE STRING
"Version override (use with caution)!")
mark_as_advanced (OpenImageIO_VERSION_OVERRIDE)
Expand Down Expand Up @@ -140,6 +140,10 @@ set (TEX_BATCH_SIZE "" CACHE STRING "Force TextureSystem SIMD batch size (e.g. 1
if (TEX_BATCH_SIZE)
add_compile_definitions (OIIO_TEXTURE_SIMD_BATCH_WIDTH=${TEX_BATCH_SIZE})
endif ()
option (OIIO_TEX_IMPLEMENT_VARYINGREF "Implement the deprecated batch texture functions taking VaryingRef params" ON)
if (NOT OIIO_TEX_IMPLEMENT_VARYINGREF)
add_compile_definitions (OIIO_TEX_NO_IMPLEMENT_VARYINGREF=1)
endif ()

# Set the default namespace
set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING
Expand Down
8 changes: 0 additions & 8 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ [email protected]
* Andy Chan
* AngryLoki
* Angus Davis
* Ankit Sinha
* Anton Dukhovnikov
* Anthony Nemoff
* Aras Pranckevičius
Expand All @@ -39,7 +38,6 @@ [email protected]
* Blair Tennessy
* Blazej Floch
* Brad Smith
* Bram Stolk
* Brecht Van Lommel
* Brent Davis
* Brian Hall
Expand All @@ -66,8 +64,6 @@ [email protected]
* Daniel Wyatt
* Danny Greenstein
* Darby Johnston
* Dharshan Vishwanatha
* David Adler
* David Aguilar
* David Gordon
* Deepak Gopinath
Expand Down Expand Up @@ -139,7 +135,6 @@ [email protected]
* Lukas Schrangl
* Lukasz Maliszewski
* Luke Emrose
* Lydia Zheng
* M Joonas Pihlaja
* Malcolm Humphreys
* Manuel Gamito
Expand Down Expand Up @@ -176,7 +171,6 @@ [email protected]
* Pascal Lecocq
* Patrick Hodoul
* Patrick Piché
* Paul Franz
* Paul Melis
* Paul Molodowitch
* Pavel Karneliuk
Expand Down Expand Up @@ -219,7 +213,6 @@ [email protected]
* Till Dechent
* Tim D. Smith
* Tim Grant
* Todica Ionut
* Tom Knowles
* Troy James Sobotka
* Vic P
Expand All @@ -235,5 +228,4 @@ [email protected]
* Yang Yang
* Yann Lanthony
* Zach Lewis
* Ziad Khouri
* zomgrolf
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
* **C++17 or higher** (also builds with C++20)
* The default build mode is C++17. This can be controlled by via the
CMake configuration flag: `-DCMAKE_CXX_STANDARD=20`, etc.
* Compilers: **gcc 9.3** - 14.2, **clang 5** - 19, MSVS 2017 - 2019 (**v19.14
* Compilers: **gcc 9.3** - 14.1, **clang 5** - 18, MSVS 2017 - 2019 (**v19.14
and up**), **Intel icc 19+**, Intel OneAPI C++ compiler 2022+.
* **CMake >= 3.18.2** (tested through 3.30)
* **CMake >= 3.15** (tested through 3.30)
* **Imath >= 3.1** (tested through 3.1.x and main)
* **OpenEXR >= 3.1** (tested through 3.3 and main)
* **libTIFF >= 4.0** (tested through 4.7)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ decisions, etc. Please be aware of our [Code of Conduct](CODE_OF_CONDUCT.md).
💁 User Documentation
---------------------

[OpenImageIO Documentation](https://docs.openimageio.org)
[OpenImageIO Documentation on ReadTheDocs](https://openimageio.readthedocs.io/)
is the best place to start if you are interested in how to use OpenImageIO,
its APIs, its component programs (once they are built). There is also a [PDF
version](https://readthedocs.org/projects/openimageio/downloads/pdf/latest/).
Expand Down
6 changes: 3 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ security vulnerabilities.
| Version / branch | Supported |
| ----------------- | ---------------------------------------------------- |
| main | :white_check_mark: :construction: ALL fixes immediately, but this is a branch under development with a frequently unstable ABI and occasionally unstable API. |
| 3.0.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. |
| 2.5.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. But be warned that probably by mid-2025, the 2.5.x family will move to a state of only receiving critical fixes, upon request, only if they can be easily backported. |
| <= 2.4.x | :x: No longer receiving patches of any kind. |
| 2.5.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. |
| 2.4.x | :warning: Only receives occasional critical fixes, upon request, only if they can be easily backported. |
| <= 2.3.x | :x: No longer receiving patches of any kind. |


## Reporting a Vulnerability
Expand Down
41 changes: 38 additions & 3 deletions THIRD-PARTY.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,6 @@ SPDX-License-Identifier: Apache-2.0
This is licensed under the Apache 2.0 license with LLVM Exceptions.
https://llvm.org/docs/DeveloperPolicy.html#open-source-licensing-terms

* ninjatracing.py utility for build profiling is Apache-2.0 licensed
and comes from https://github.com/nico/ninjatracing.
Copyright 2018 Nico Weber.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -232,6 +229,44 @@ DEALINGS IN THE SOFTWARE.

-------------------------------------------------------------------------

PNG Reference Library License version 2
SPDX-License-Identifier: libpng-2.0

* libpng https://github.com/pnggroup/libpng
Copyright (c) 1995-2024 The PNG Reference Library Authors.
Copyright (c) 1995-2024 The PNG Reference Library Authors.
Copyright (c) 2018-2024 Cosmin Truta.
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
Copyright (c) 1996-1997 Andreas Dilger.
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.

The software is supplied "as is", without warranty of any kind,
express or implied, including, without limitation, the warranties
of merchantability, fitness for a particular purpose, title, and
non-infringement. In no event shall the Copyright owners, or
anyone distributing the software, be liable for any damages or
other liability, whether in contract, tort or otherwise, arising
from, out of, or in connection with the software, or the use or
other dealings in the software, even if advised of the possibility
of such damage.

Permission is hereby granted to use, copy, modify, and distribute
this software, or portions hereof, for any purpose, without fee,
subject to the following restrictions:

1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the product
documentation would be appreciated, but is not required.

2. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.

3. This Copyright notice may not be removed or altered from any
source or altered source distribution.

-------------------------------------------------------------------------

Zlib license
SPDX-License-Identifier: Zlib

Expand Down
2 changes: 0 additions & 2 deletions docs/CHANGES-1.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -4037,5 +4037,3 @@ Developer goodies:
* testtex improvements: --wrap


For older release notes, see:
* [CHANGES-0.x](https://github.com/AcademySoftwareFoundation/OpenImageIO/blob/main/docs/CHANGES-0.x.md).
53 changes: 2 additions & 51 deletions docs/Deprecations-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ about being deprecated will be removed in the final 3.0 release.

---

## argparse.h

* Several long-deprecated old method names now will give deprecation warnings
if used. Most notable are `parse()` (you should use `parse_args()` instead)
and `usage()` (use `print_help()` instead).

## array_view.h

* This header has been eliminated. It originally had the template `array_view`,
Expand Down Expand Up @@ -69,13 +63,6 @@ about being deprecated will be removed in the final 3.0 release.
* The versions of `createDisplayTransform()` that lack an `inverse` parameter
now have deprecation warnings. Use the version that takes an `inverse` bool.

## dassert.h

* Poorly named `ASSERT`, `DASSERT`, and `ASSERTMSG` macros have been removed.
They were deprecated since 2.1, since they could easily clash with macros
from other projects. Please instead use the `OIIO_ASSERT`, `OIIO_DASSERT`,
and `OIIO_ASSERT_MSG` macros.

## errorhandler.h

* All of the old methods that did printf-style formatting have been deprecated
Expand Down Expand Up @@ -106,25 +93,6 @@ about being deprecated will be removed in the final 3.0 release.
against it. (However, the IBA functions involving OpenCV still exist and are
defined in `imagebufalgo_opencv.h` as inline functions, so it is up to the
application calling these API functions to find and link against OpenCV.)
* The old varieties of ImageInput::read_scanlines, read_tiles, and read_image
that did not take `subimage` and `miplevel` parameters, and were not
thread-safe, have been removed. These have been marked as deprecated since
OIIO 2.0.
* The type aliases ImageIOParameter and ImageIOParameterList, which have been
marked as deprecated since OIIO 2.0, have been removed. Use ParamValue and
ParamValueList instead.
* The utility functions convert_image and parallel_convert_image (the variety
that took alpha_channel and z_channel arguments) that have been deprecated
since OIIO 2.0 have been removed.

## imagebuf.h

* The style of ImageBuf constructor that "wraps" a caller-owned memory buffer
now has a new, preferred, version that takes a `span<>` or `cspan<>` instead
of a raw pointer. The old versions is considered deprecated.
* New span-based versions of get_pixels, set_pixels, setpixel, getpixel,
interppixel, interppixel_NDC, interppixel_bicubic, interppixel_bicubic_NDC.
These are preferred over the old versions that took raw pointers.

## imagebufalgo.h

Expand Down Expand Up @@ -215,9 +183,6 @@ about being deprecated will be removed in the final 3.0 release.

## strutil.h

* The default behavior of `Strutil::format()` has been changed to use the
`std::format` conventions. If you want the old behavior, use
`Strutil::old::format()` instead.
* Added deprecation warnings to all the old (printf-convention) string
`format()` function.

Expand Down Expand Up @@ -255,7 +220,7 @@ about being deprecated will be removed in the final 3.0 release.
## ustring.h

* Removed old `ustringHash` (which was just an alias for `std::hash<ustring>`,
which should be used instead).
which should be used instead.

## varyingref.h

Expand All @@ -269,18 +234,4 @@ about being deprecated will be removed in the final 3.0 release.
Python bindings. Python scripts that wish to capture images from live
cameras should use OpenCV or other capture APIs of choice and then
pass the results to OIIO to construct an ImageBuf.
* Static type names within the `TypeDesc` class (such as `TypeDesc.TypeFloat`)
have been removed after being considered deprecated since OIIO 1.8. Use the
names in the overall OpenImageIO namespace instead.
* Older versions of `ImageBufAlgo.fit()` have been removed. Use the newer
function signatures.
* Older versions of `ImageInput::read_native_deep_scanlines()` and
`read_native_deep_tiles()` have been removed. They had been deprecated
since OIIO 2.0.

## maketx

* The `--noresize` option has been removed. It was deprecated since OIIO 2.0,
when it became the default behavior.
* The `--stats` option has been removed. It was deprecated since OIIO 1.6,
when it was renamed `--runstats`.

17 changes: 8 additions & 9 deletions docs/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ See the [Dependency proposal wiki page](https://github.com/AcademySoftwareFounda
- [x] Python 3.7 [#4157](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4157)
- [x] OpenEXR/Imath 3.1 [#4156](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4156)

* [x] Miscellaneous optional upgrades whose changes will be very localized
* [ ] Miscellaneous optional upgrades whose changes will be very localized

This isn't a complete list, nor do we need to do all of these, but the
highest priorities are:

- [X] CMake 3.18 (from 3.15). [#4472](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4472)
- [x] OpenColorIO 2.2, and make it required. [#4367](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4367)
- [ ] fmt 8.0 (from 7.0), which has many improvements. CANCELLED: fmt 8.0+
does not work with the old icc compiler.
- [x] GIFlib 5.0 (from 4.0), which adds thread safety. [#4349](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4349)
- [x] libheif 1.11 (from 1.3), which supports many additional features of that format. [#4380](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4380)
- [x] WebP 1.2 (from 0.6) which lets us use their exported CMake configs and retire FindWebP.cmake. [#4354](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4354)
- [x] pybind11 2.6 or 2.7 (from 2.4). [#4297](https://github.com/AcademySoftwareFoundation/OpenImageIO/pull/4297)
- [ ] CMake 3.18 (from 3.15). Or possibly newer if there's a good reason? (3.19 or 3.20 are also reasonable.)
- [x] OpenColorIO 2.2, or possibly 2.1 (from 1.1). Open for debate: should it be a required dependency rather than optional?
- [ ] fmt 8.0 (from 7.0), which has many improvements.
- [x] GIFlib 5.0 (from 4.0), which adds thread safety.
- [x] libheif 1.11 (from 1.3), which supports many additional features of that format.
- [x] WebP 1.2 (from 0.6) which lets us use their exported CMake configs and retire FindWebP.cmake.
- [x] pybind11 2.6 or 2.7 (from 2.4).


- [x] [#4158](https://github.com/AcademySoftwareFoundation/OpenImageIO/issues/4158) Eliminate the last few places where we use Boost and eliminate it as a dependency.
Expand Down
Loading

0 comments on commit 90f4b4e

Please sign in to comment.