Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b9f903e441 | ||
|
|
3c4c9f3163 | ||
|
|
be39e448f4 | ||
|
|
3dabbd80d4 | ||
|
|
beaa7feb12 | ||
|
|
407b3f9ea9 | ||
|
|
5ae1fe0b2d | ||
|
|
363cf22492 | ||
|
|
b4fedf2ab1 | ||
|
|
b6f5f92add | ||
|
|
09028b27ae | ||
|
|
1f4d7247d4 | ||
|
|
7224c06c03 | ||
|
|
86222fa067 | ||
|
|
75d04f9597 | ||
|
|
553e2ef77e | ||
|
|
f7845333ff | ||
|
|
573f2dfc45 | ||
|
|
51eb7a3ba0 | ||
|
|
5f532c3461 | ||
|
|
8c1ab4bb18 | ||
|
|
2aa4e56a0f | ||
|
|
19f2946bf4 | ||
|
|
7022828ce5 | ||
|
|
70fb4878f1 | ||
|
|
792292179c | ||
|
|
2dd84e1286 | ||
|
|
84027f028b | ||
|
|
be559ed23b | ||
|
|
1b5f278fc0 | ||
|
|
c233694d93 | ||
|
|
4082b689d4 | ||
|
|
a50964ac8c | ||
|
|
ec2fe43d75 | ||
|
|
e023a98a58 | ||
|
|
ef19ba5c5d | ||
|
|
f34df70f6c | ||
|
|
06444a7af6 | ||
|
|
fa1cc230d9 | ||
|
|
21103c7da8 | ||
|
|
36d1d8449c | ||
|
|
581ab53fc9 | ||
|
|
98e554bcdc | ||
|
|
b99b7c57e7 | ||
|
|
6ccee8ffba | ||
|
|
e340504f8d | ||
|
|
fb017b24f4 | ||
|
|
a674f70b2f | ||
|
|
d99dd49f6c | ||
|
|
30a2eb3fc4 | ||
|
|
099c8585e3 | ||
|
|
d5a03e0579 | ||
|
|
e7ec6b3f7a | ||
|
|
244a9d6492 | ||
|
|
b293db1bbe | ||
|
|
f2590bcbc8 | ||
|
|
031dbdfc2a | ||
|
|
2589c70e34 | ||
|
|
173e6e30a1 | ||
|
|
f0b30f3550 | ||
|
|
037f783c6d | ||
|
|
5808911125 | ||
|
|
d56916c525 | ||
|
|
8e2bdd35ab | ||
|
|
077e30c08d | ||
|
|
20e14b8e54 | ||
|
|
8ede469092 | ||
|
|
7b0d6c4588 | ||
|
|
fb3ad5e529 | ||
|
|
75f77bd249 | ||
|
|
28771ee3d7 | ||
|
|
5beaec9dbd | ||
|
|
fad752bac2 | ||
|
|
1f4115f005 | ||
|
|
ba39d09482 | ||
|
|
7bf125c2c1 | ||
|
|
ce85d69d13 | ||
|
|
fdbae68903 | ||
|
|
ee676653ee | ||
|
|
1a66e6090e | ||
|
|
fbb8e01e00 | ||
|
|
7f71640f58 | ||
|
|
28e0820567 | ||
|
|
8c6b526792 | ||
|
|
d3eb4f1f07 | ||
|
|
afcf58e43b | ||
|
|
2bf67bd96e | ||
|
|
31394ebdb9 | ||
|
|
8d09f3984e | ||
|
|
45221dc447 | ||
|
|
7f8db2dbe8 | ||
|
|
84566283b1 | ||
|
|
1ed188e277 | ||
|
|
0b64ec8c66 | ||
|
|
eb4de4241f | ||
|
|
410de67c8c | ||
|
|
89256f6f2d | ||
|
|
169549c5e2 | ||
|
|
af764e9aaa | ||
|
|
dd029cdbb1 | ||
|
|
831263ef67 | ||
|
|
e3c4ff23a4 | ||
|
|
adc159a967 | ||
|
|
72bdc35f19 | ||
|
|
1833916ac5 | ||
|
|
51b2a669fd | ||
|
|
15a7da7e5d | ||
|
|
adef20d4eb | ||
|
|
34d16a5a6a | ||
|
|
8cab83499b | ||
|
|
396057d54c | ||
|
|
5d6bb77c35 | ||
|
|
db679d4e57 | ||
|
|
3e79658454 | ||
|
|
214d62b81d | ||
|
|
b4217ebffa | ||
|
|
766692f9d9 | ||
|
|
0bd647e00a | ||
|
|
420ee218f2 | ||
|
|
b378576471 | ||
|
|
d545fb77bd | ||
|
|
151b69506e | ||
|
|
32d4c25c41 | ||
|
|
05661f8a2b | ||
|
|
af949b73dc | ||
|
|
ce58cc6db1 | ||
|
|
3b9b4f1bb8 | ||
|
|
7f4f9a7adc | ||
|
|
5beebb3df8 | ||
|
|
894e4667c4 | ||
|
|
448e03cb8f | ||
|
|
963632bf4e | ||
|
|
05345677a5 | ||
|
|
d2f16f4037 | ||
|
|
4bf6df17cd | ||
|
|
22762b6bbb | ||
|
|
09203688de | ||
|
|
c22c67842a | ||
|
|
19d65ec1d5 | ||
|
|
45107d2d44 | ||
|
|
ac4c90e87b | ||
|
|
2f1bdb601c | ||
|
|
8ad4afd697 | ||
|
|
8dc01f250e | ||
|
|
87c9f1a26e | ||
|
|
a4bb2367cd | ||
|
|
4a75da3a5f | ||
|
|
c7070e15f4 | ||
|
|
8e568b8c0a | ||
|
|
ccb61011d9 | ||
|
|
5159490195 | ||
|
|
ce467d34ed | ||
|
|
c3e5511ddc | ||
|
|
cb11829541 | ||
|
|
a3c79622d0 | ||
|
|
a346d2c2bc | ||
|
|
538d134c9d | ||
|
|
d4f6f5a1ae | ||
|
|
8b4ecb508a | ||
|
|
cf9ca07ffb | ||
|
|
da257ab644 | ||
|
|
c3ea0329ea | ||
|
|
5a7dedd6d2 | ||
|
|
d92de54ca6 | ||
|
|
6a8b6ffbfd | ||
|
|
af7f0d333f | ||
|
|
54e13fd173 | ||
|
|
f259e59d7d | ||
|
|
06ab90dd7e | ||
|
|
6ebcf0a56c | ||
|
|
cbecc92461 | ||
|
|
ef781a211b | ||
|
|
0234b6dbbe | ||
|
|
a2d5cd9c6d | ||
|
|
9917958a7b | ||
|
|
da1f27af66 | ||
|
|
bec3f038b2 | ||
|
|
02be6659c5 | ||
|
|
ebd24245af | ||
|
|
26ceab5d13 | ||
|
|
b26a2979a4 | ||
|
|
75ab8d8304 | ||
|
|
fec17162c6 | ||
|
|
33f0690772 | ||
|
|
001d3ab123 | ||
|
|
1dc079a489 | ||
|
|
90f5f0fba9 | ||
|
|
309c29f8b5 | ||
|
|
fa59ef61b2 | ||
|
|
fca99cc5eb | ||
|
|
e9ff5306c4 | ||
|
|
ae4d5ca495 | ||
|
|
317a3a0bdc | ||
|
|
c75dbdc66e | ||
|
|
474ed3865b | ||
|
|
a4a6c572d9 | ||
|
|
8be88d269f | ||
|
|
84852ebae5 | ||
|
|
bbd8101a69 | ||
|
|
f62036ab8d | ||
|
|
766deab023 | ||
|
|
4cf32b32f8 | ||
|
|
11b03fc4d5 | ||
|
|
c2a09c2fd0 | ||
|
|
8a1db1b13c | ||
|
|
5167b11277 | ||
|
|
9d8cda7cca | ||
|
|
0f8a453f5a | ||
|
|
1406bb8e66 | ||
|
|
3de6233f41 | ||
|
|
5f92a5af48 | ||
|
|
b5bb85d02b | ||
|
|
01742570d1 | ||
|
|
a0b2611526 | ||
|
|
eac83b2d95 | ||
|
|
2d7660b59c | ||
|
|
716d86f465 | ||
|
|
a16ac8acc7 | ||
|
|
99d6947b8d | ||
|
|
29ddf1e6b7 | ||
|
|
9e77cdecf5 | ||
|
|
6189faeaf7 | ||
|
|
c46a47f00b | ||
|
|
e9881d0e3f | ||
|
|
5d10f088a0 | ||
|
|
581b59d3ad | ||
|
|
ab3f04204b | ||
|
|
2721bd60df | ||
|
|
feca3fe4ff | ||
|
|
16a6951e07 | ||
|
|
fdd2985cfa | ||
|
|
35a68d2581 | ||
|
|
537763e4a3 | ||
|
|
6fc196607c | ||
|
|
e660b7e247 | ||
|
|
4dc6c7816d | ||
|
|
43ff4d4b3f | ||
|
|
cc0a14fd9f | ||
|
|
dc22640b66 | ||
|
|
b22a3fad02 | ||
|
|
7abec22847 | ||
|
|
ef627e53de | ||
|
|
f6971293be | ||
|
|
39689b9c8a | ||
|
|
1983edc550 | ||
|
|
35b4576dd3 | ||
|
|
3a99936a77 | ||
|
|
530bbd3ce3 | ||
|
|
d44de82931 | ||
|
|
d136f98ff6 | ||
|
|
fc5c4844e6 | ||
|
|
ce6b763249 | ||
|
|
0a3a68b57c | ||
|
|
5d9945b55b | ||
|
|
a1ebb935fb | ||
|
|
9cee6827cf | ||
|
|
80fccb90a4 | ||
|
|
3f2e217c60 | ||
|
|
9a8a1e041e | ||
|
|
f1ab555440 | ||
|
|
59f2e89362 | ||
|
|
00fdb92973 | ||
|
|
5bb655ecbd | ||
|
|
38b6e42c83 | ||
|
|
db73f2f1eb | ||
|
|
496777a686 | ||
|
|
8af1d39ac2 | ||
|
|
fa03aac802 | ||
|
|
3c28573b14 | ||
|
|
78b05a1937 | ||
|
|
914407e614 | ||
|
|
d5f7efcb33 | ||
|
|
a831c50e78 | ||
|
|
306a50e230 | ||
|
|
d40a33aece | ||
|
|
2568474d66 | ||
|
|
1e666fca49 | ||
|
|
ee51de91a6 | ||
|
|
c12f89c0a8 | ||
|
|
b558145c71 | ||
|
|
01692cdfe0 | ||
|
|
eb796bbd2c | ||
|
|
88522189b4 | ||
|
|
740dc45c00 | ||
|
|
bf5a076dbb | ||
|
|
70cb7edac4 | ||
|
|
bea411565c | ||
|
|
0621f0a66e | ||
|
|
f320f3d60f | ||
|
|
210e3b15f1 | ||
|
|
52e5c2ab7a | ||
|
|
4dd0da99d7 | ||
|
|
f6b08b1b9f | ||
|
|
a3fd72cfb9 | ||
|
|
5d4bdc6666 | ||
|
|
dfbc4c180f | ||
|
|
9815a69240 | ||
|
|
92faacfbb2 | ||
|
|
e85390ec81 | ||
|
|
40e64bb42b | ||
|
|
58dbf96727 | ||
|
|
31db7bc483 | ||
|
|
46ad94c8a8 | ||
|
|
bc931de72b | ||
|
|
ff8671a371 | ||
|
|
833ad192ce | ||
|
|
037fcb8839 | ||
|
|
963d07d531 | ||
|
|
ecbeda622f | ||
|
|
a6345e095e | ||
|
|
8e470c7616 | ||
|
|
d8810c5365 | ||
|
|
d631f92721 | ||
|
|
7f71282027 | ||
|
|
4f981ba3b7 | ||
|
|
d0a77b9f2f | ||
|
|
292b6ac1c1 | ||
|
|
f8969b894a | ||
|
|
871e88c857 | ||
|
|
dcf48e1f80 | ||
|
|
94be07fbce | ||
|
|
1d0e570a49 | ||
|
|
be2c4e3198 | ||
|
|
5ba33f3886 | ||
|
|
bfa4ba5f2e |
@@ -21,7 +21,7 @@ Steps to reproduce the behavior:
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Evidence**
|
||||
Do you have error messages? (please quote exactly) Screenshots? Example
|
||||
Do you have error messages? (please quote exacty) Screenshots? Example
|
||||
command lines or scripts that reliably reproduce the error? If it only
|
||||
happens with certain image files, can you attach the smallest image you
|
||||
can make that reproduces the problem?
|
||||
|
||||
@@ -7,10 +7,10 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**PLEASE DO NOT REPORT BUILD TROUBLES AS GITHUB "ISSUES" UNLESS YOU ARE RALLY SURE IT'S A BUG**
|
||||
**PLEASE DO NOT REPORT BUILD TROUBLES AS ISSUES**
|
||||
|
||||
The best way to get help with your build problems is to ask a question on the
|
||||
[oiio-dev developer mail list](https://lists.aswf.io/g/oiio-dev).
|
||||
[oiio-dev developer mail list](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org).
|
||||
|
||||
When you email about this, please attach one or both of the following:
|
||||
1. The full verbose build log, which you can create like this:
|
||||
|
||||
@@ -19,7 +19,7 @@ But if you are just asking a question:
|
||||
* I can't build OpenImageIO
|
||||
|
||||
For anything of this nature, the best way to get help using OpenImageIO is
|
||||
to ask a question on the [oiio-dev developer mail list](https://lists.aswf.io/g/oiio-dev).
|
||||
to ask a question on the [oiio-dev developer mail list](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org).
|
||||
|
||||
The [documentation](https://openimageio.readthedocs.org)
|
||||
is pretty comprehensive, so please check there first; you may find the answer
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
<!-- This is just a guideline and set of reminders about what constitutes -->
|
||||
<!-- a good PR. Feel free to delete all this matter and replace it with -->
|
||||
<!-- your own detailed message about the PR, assuming you hit all the -->
|
||||
<!-- important points made below. -->
|
||||
|
||||
|
||||
## Description
|
||||
|
||||
@@ -19,14 +14,14 @@
|
||||
|
||||
<!-- Put an 'x' in the boxes as you complete the checklist items -->
|
||||
|
||||
- [ ] I have read the [contribution guidelines](https://github.com/OpenImageIO/oiio/blob/master/CONTRIBUTING.md).
|
||||
- [ ] I have read the [contribution guidelines](../CONTRIBUTING.md).
|
||||
- [ ] If this is more extensive than a small change to existing code, I
|
||||
have previously submitted a Contributor License Agreement
|
||||
([individual](../src/doc/CLA-INDIVIDUAL), and if there is any way my
|
||||
employers might think my programming belongs to them, then also
|
||||
[corporate](../src/doc/CLA-CORPORATE)).
|
||||
- [ ] I have updated the documentation, if applicable.
|
||||
- [ ] I have ensured that the change is tested somewhere in the testsuite
|
||||
(adding new test cases if necessary).
|
||||
- [ ] If I added or modified a C++ API call, I have also amended the
|
||||
corresponding Python bindings (and if altering ImageBufAlgo functions, also
|
||||
exposed the new functionality as oiiotool options).
|
||||
- [ ] My code follows the prevailing code style of this project. If I haven't
|
||||
already run clang-format before submitting, I definitely will look at the CI
|
||||
test that runs clang-format and fix anything that it highlights as being
|
||||
nonconforming.
|
||||
- [ ] My code follows the prevailing code style of this project.
|
||||
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
name: Analysis
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run nightly while we're still working our way through the warnings
|
||||
- cron: "0 8 * * *"
|
||||
# Run unconditionally once weekly
|
||||
# - cron: "0 0 * * 0"
|
||||
push:
|
||||
# Run on pushes only to master or if the branch name contains "analysis"
|
||||
branches:
|
||||
- master
|
||||
- '*analysis*'
|
||||
- '*sonar*'
|
||||
# Allow manual kicking off of the workflow from github.com
|
||||
workflow_dispatch:
|
||||
# Uncomment the following line if we want to run analysis on all PRs:
|
||||
# pull_request:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
aswf:
|
||||
name: "SonarCloud Analysis"
|
||||
# Exclude runs on forks, since only the main org has the SonarCloud
|
||||
# account credentials.
|
||||
if: github.repository == 'OpenImageIO/oiio'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- desc: sonar gcc9/C++14 py39 boost1.76 exr3.1 ocio2.1
|
||||
nametag: static-analysis-sonar
|
||||
os: ubuntu-latest
|
||||
vfxyear: 2022
|
||||
vfxsuffix: -clang11
|
||||
cxx_std: 14
|
||||
python_ver: 3.9
|
||||
simd: "avx2,f16c"
|
||||
fmt_ver: 8.1.1
|
||||
pybind11_ver: v2.9.0
|
||||
coverage: 1
|
||||
# skip_tests: 1
|
||||
sonar: 1
|
||||
setenvs: export SONAR_SCANNER_VERSION=4.7.0.2747
|
||||
SONAR_SERVER_URL="https://sonarcloud.io"
|
||||
BUILD_WRAPPER_OUT_DIR=bw_output
|
||||
OIIO_CMAKE_BUILD_WRAPPER="build-wrapper-linux-x86-64 --out-dir bw_output"
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
CMAKE_UNITY_BUILD=OFF
|
||||
CODECOV=1
|
||||
CTEST_TEST_TIMEOUT=1200
|
||||
OIIO_CMAKE_FLAGS="-DOIIO_TEX_IMPLEMENT_VARYINGREF=OFF"
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
container:
|
||||
image: aswf/ci-osl:${{matrix.vfxyear}}${{matrix.vfxsuffix}}
|
||||
env:
|
||||
CXX: ${{matrix.cxx_compiler}}
|
||||
CC: ${{matrix.cc_compiler}}
|
||||
CMAKE_CXX_STANDARD: ${{matrix.cxx_std}}
|
||||
USE_SIMD: ${{matrix.simd}}
|
||||
FMT_VERSION: ${{matrix.fmt_ver}}
|
||||
OPENEXR_VERSION: ${{matrix.openexr_ver}}
|
||||
PYBIND11_VERSION: ${{matrix.pybind11_ver}}
|
||||
PYTHON_VERSION: ${{matrix.python_ver}}
|
||||
# DEBUG_CI: 1
|
||||
steps:
|
||||
# We would like to use harden-runner, but it flags too many false
|
||||
# positives, every time we download a dependency. We should use it only
|
||||
# on CI runs where we are producing artifacts that users might rely on.
|
||||
# - name: Harden Runner
|
||||
# uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3
|
||||
# with:
|
||||
# egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- name: Prepare ccache timestamp
|
||||
id: ccache_cache_keys
|
||||
run: echo "::set-output name=date::`date -u +'%Y-%m-%dT%H:%M:%SZ'`"
|
||||
- name: ccache
|
||||
id: ccache
|
||||
uses: actions/cache@c3f1317a9e7b1ef106c153ac8c0f00fed3ddbc0d # v3.0.4
|
||||
with:
|
||||
path: /tmp/ccache
|
||||
key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}}
|
||||
restore-keys: ${{github.job}}-
|
||||
- name: Build setup
|
||||
run: |
|
||||
${{matrix.setenvs}}
|
||||
src/build-scripts/ci-startup.bash
|
||||
- name: Dependencies
|
||||
run: |
|
||||
${{matrix.depcmds}}
|
||||
src/build-scripts/gh-installdeps.bash
|
||||
- name: Build
|
||||
run: src/build-scripts/ci-build.bash
|
||||
- name: Testsuite
|
||||
if: matrix.skip_tests != '1'
|
||||
run: src/build-scripts/ci-test.bash
|
||||
- name: Code coverage
|
||||
if: matrix.coverage == '1'
|
||||
run: src/build-scripts/ci-coverage.bash
|
||||
- name: Sonar-scanner
|
||||
if: matrix.sonar == 1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: |
|
||||
sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="build/bw_output" --define sonar.cfamily.gcov.reportsPath="_coverage"
|
||||
# - uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
|
||||
# if: failure()
|
||||
# with:
|
||||
# name: oiio-${{github.job}}-${{matrix.nametag}}
|
||||
# path: |
|
||||
# build/cmake-save
|
||||
# build/testsuite/*/*.*
|
||||
# !build/testsuite/oiio-images
|
||||
# !build/testsuite/openexr-images
|
||||
# !build/testsuite/fits-images
|
||||
# !build/testsuite/j2kp4files_v1_5
|
||||
|
||||
+783
-433
File diff suppressed because it is too large
Load Diff
@@ -1,73 +0,0 @@
|
||||
name: Scorecards supply-chain security
|
||||
on:
|
||||
# Only the default branch is supported.
|
||||
branch_protection_rule:
|
||||
push:
|
||||
# Run on pushes to master, but only the main repo, not forks
|
||||
branches: [ "master" ]
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
pull_request:
|
||||
# Only run on individual PRs if the workflow file itself is changed.
|
||||
paths:
|
||||
- .github/workflows/scorecard.yml
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
# Allow subsequent pushes to the same PR or REF to cancel any previous jobs.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecards analysis
|
||||
if: github.repository == 'OpenImageIO/oiio'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Used to receive a badge. (Upcoming feature)
|
||||
id-token: write
|
||||
# Needs for private repositories.
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@3e15ea8318eee9b333819ec77a36aca8d39df13e # v1.1.1
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) Read-only PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecards on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
|
||||
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
|
||||
|
||||
# Publish the results for public repositories to enable scorecard badges. For more details, see
|
||||
# https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories, `publish_results` will automatically be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # v3.0.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # v1.0.26
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
+1
-13
@@ -1,22 +1,10 @@
|
||||
*~
|
||||
*.bak
|
||||
branches/
|
||||
build/
|
||||
dist/
|
||||
ext/
|
||||
.idea
|
||||
.vscode
|
||||
testsuite/runtest.pyc
|
||||
.cproject
|
||||
.project
|
||||
.DS_Store
|
||||
*.pyc
|
||||
_coverage/
|
||||
|
||||
# Exclude test files I tend to leave around at the top level. The leading
|
||||
# slash ensures that files with these extensions within subdirectories are not
|
||||
# ignored.
|
||||
/*.exr
|
||||
/*.tif
|
||||
/*.jpg
|
||||
/*.tx
|
||||
/*.log
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
Project Name: OpenImageIO
|
||||
|
||||
Project Entity: OpenImageIO Project a Series of LF Projects, LLC
|
||||
|
||||
If emailing signed PDF, send to: manager@lfprojects.org
|
||||
|
||||
**Software Grant and Corporate Contributor License Agreement ("Agreement") v2.1**
|
||||
|
||||
Thank you for your interest in the project specified above (the “Project”). In
|
||||
order to clarify the intellectual property license granted with Contributions
|
||||
from any person or entity, the Project must have a Contributor License Agreement
|
||||
(CLA) on file that has been signed by each Contributor, indicating agreement to
|
||||
the license terms below. This license is for your protection as a Contributor as
|
||||
well as the protection of the Project and its users; it does not change your
|
||||
rights to use your own Contributions for any other purpose.
|
||||
|
||||
This version of the Agreement allows an entity (the “Corporation”) to submit
|
||||
Contributions to the Project, to authorize Contributions submitted by its
|
||||
designated employees to the Project, and to grant copyright and patent licenses
|
||||
thereto.
|
||||
|
||||
If you have not already done so, please complete and sign this Agreement using
|
||||
the electronic signature portal made available to you by the Project or its
|
||||
third-party service providers, or email a PDF of the signed agreement to the
|
||||
email address specified above. Please read this document carefully before
|
||||
signing and keep a copy for your records.
|
||||
|
||||
You accept and agree to the following terms and conditions for Your present and
|
||||
future Contributions submitted to the Project. In return, the Project shall not
|
||||
use Your Contributions in a way that is contrary to the public benefit or
|
||||
inconsistent with its charter at the time of the Contribution. Except for the
|
||||
license granted herein to the Project and recipients of software distributed by
|
||||
the Project, You reserve all right, title, and interest in and to Your
|
||||
Contributions.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
“You” (or “Your”) shall mean the copyright owner or legal entity authorized by
|
||||
the copyright owner that is making this Agreement with the Project. For legal
|
||||
entities, the entity making a Contribution and all other entities that
|
||||
control, are controlled by, or are under common control with that entity are
|
||||
considered to be a single Contributor. For the purposes of this definition,
|
||||
“control” means (i) the power, direct or indirect, to cause the direction or
|
||||
management of such entity, whether by contract or otherwise, or (ii) ownership
|
||||
of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
|
||||
ownership of such entity.
|
||||
|
||||
“Contribution” shall mean the code, documentation or other original works of
|
||||
authorship, including any modifications or additions to an existing work, that
|
||||
is intentionally submitted by You to the Project for inclusion in, or
|
||||
documentation of, any of the products owned or managed by the Project (the
|
||||
“Work”). For the purposes of this definition, “submitted” means any form
|
||||
of electronic, verbal, or written communication sent to the Project or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that
|
||||
are managed by, or on behalf of, the Project for the purpose of discussing and
|
||||
improving the Work, but excluding communication that is conspicuously marked
|
||||
or otherwise designated in writing by You as “Not a Contribution.”
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable copyright license to reproduce, prepare
|
||||
derivative works of, publicly display, publicly perform, sublicense,
|
||||
and distribute Your Contributions and such derivative works.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable (except as stated in this section) patent
|
||||
license to make, have made, use, offer to sell, sell, import, and
|
||||
otherwise transfer the Work, where such license applies only to
|
||||
those patent claims licensable by You that are necessarily infringed
|
||||
by Your Contribution(s) alone or by combination of Your
|
||||
Contribution(s) with the Work to which such Contribution(s) were
|
||||
submitted. If any entity institutes patent litigation against You or
|
||||
any other entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that your Contribution, or the Work to which
|
||||
you have contributed, constitutes direct or contributory patent
|
||||
infringement, then any patent licenses granted to that entity under
|
||||
this Agreement for that Contribution or Work shall terminate as of
|
||||
the date such litigation is filed.
|
||||
|
||||
4. You represent that You are legally entitled to grant the above license. You
|
||||
represent further that the employee of the Corporation designated as the Initial
|
||||
CLA Manager below (and each who is designated in a subsequent written
|
||||
modification to the list of CLA Managers) (each, a “CLA Manager”) is
|
||||
authorized to maintain with the Project (1) the list of employees of the
|
||||
Corporation who are authorized to submit Contributions on behalf of the
|
||||
Corporation, and (2) the list of CLA Managers.
|
||||
|
||||
5. You represent that each of Your Contributions is Your original creation (see
|
||||
section 7 for submissions on behalf of others).
|
||||
|
||||
6. You are not expected to provide support for Your Contributions, except to the
|
||||
extent You desire to provide support. You may provide support for free, for a
|
||||
fee, or not at all. Unless required by applicable law or agreed to in writing,
|
||||
You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied, including, without
|
||||
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
7. Should You wish to submit work that is not Your original creation, You may
|
||||
submit it to the Project separately from any Contribution, identifying the
|
||||
complete details of its source and of any license or other restriction
|
||||
(including, but not limited to, related patents, trademarks, and license
|
||||
agreements) of which you are personally aware, and conspicuously marking the
|
||||
work as “Submitted on behalf of a third-party: [named here]”.
|
||||
|
||||
8. It is your responsibility to notify the Project when any change is required
|
||||
to the list of designated employees authorized to submit Contributions on behalf
|
||||
of the Corporation, or to the list of the CLA Managers.
|
||||
|
||||
\[Please complete and sign on the next page.\]
|
||||
|
||||
::: {style="page-break-after: always; visibility: hidden"}
|
||||
```{=tex}
|
||||
\pagebreak
|
||||
```
|
||||
:::
|
||||
|
||||
Please sign:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Date:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Signatory Name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Signatory E-mail:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Signatory Title:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Corporation Name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Corporation Address:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Initial CLA Manager Name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Initial CLA Manager E-Mail:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
@@ -1,137 +0,0 @@
|
||||
Project Name: OpenImageIO
|
||||
|
||||
Project Entity: OpenImageIO Project a Series of LF Projects, LLC
|
||||
|
||||
If emailing signed PDF, send to: manager@lfprojects.org
|
||||
|
||||
**Individual Contributor License Agreement ("Agreement") v2.1**
|
||||
|
||||
Thank you for your interest in the project specified above (the “Project”). In
|
||||
order to clarify the intellectual property license granted with Contributions
|
||||
from any person or entity, the Project must have a Contributor License Agreement
|
||||
(CLA) on file that has been signed by each Contributor, indicating agreement to
|
||||
the license terms below. This license is for your protection as a Contributor as
|
||||
well as the protection of the Project and its users; it does not change your
|
||||
rights to use your own Contributions for any other purpose.
|
||||
|
||||
If you have not already done so, please complete and sign this Agreement using
|
||||
the electronic signature portal made available to you by the Project or its
|
||||
third-party service providers, or email a PDF of the signed agreement to the
|
||||
email address specified above. Please read this document carefully before
|
||||
signing and keep a copy for your records.
|
||||
|
||||
You accept and agree to the following terms and conditions for Your present and
|
||||
future Contributions submitted to the Project. In return, the Project shall not
|
||||
use Your Contributions in a way that is contrary to the public benefit or
|
||||
inconsistent with its charter at the time of the Contribution. Except for the
|
||||
license granted herein to the Project and recipients of software distributed by
|
||||
the Project, You reserve all right, title, and interest in and to Your
|
||||
Contributions.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
“You” (or “Your”) shall mean the copyright owner or legal entity authorized by
|
||||
the copyright owner that is making this Agreement with the Project. For legal
|
||||
entities, the entity making a Contribution and all other entities that control,
|
||||
are controlled by, or are under common control with that entity are considered
|
||||
to be a single Contributor. For the purposes of this definition, “control”
|
||||
means (i) the power, direct or indirect, to cause the direction or management
|
||||
of such entity, whether by contract or otherwise, or (ii) ownership of fifty
|
||||
percent (50%) or more of the outstanding shares, or (iii) beneficial ownership
|
||||
of such entity.
|
||||
|
||||
“Contribution” shall mean the code, documentation or other original works of
|
||||
authorship, including any modifications or additions to an existing work, that
|
||||
is intentionally submitted by You to the Project for inclusion in, or
|
||||
documentation of, any of the products owned or managed by the Project (the
|
||||
“Work”). For the purposes of this definition, “submitted” means any form of
|
||||
electronic, verbal, or written communication sent to the Project or its
|
||||
representatives, including but not limited to communication on electronic
|
||||
mailing lists, source code control systems, and issue tracking systems that are
|
||||
managed by, or on behalf of, the Project for the purpose of discussing and
|
||||
improving the Work, but excluding communication that is conspicuously marked or
|
||||
otherwise designated in writing by You as “Not a Contribution.”
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable copyright license to reproduce, prepare
|
||||
derivative works of, publicly display, publicly perform, sublicense,
|
||||
and distribute Your Contributions and such derivative works.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this
|
||||
Agreement, You hereby grant to the Project and to recipients of software
|
||||
distributed by the Project a perpetual, worldwide, non-exclusive, no-charge,
|
||||
royalty-free, irrevocable (except as stated in this section) patent
|
||||
license to make, have made, use, offer to sell, sell, import, and
|
||||
otherwise transfer the Work, where such license applies only to
|
||||
those patent claims licensable by You that are necessarily infringed
|
||||
by Your Contribution(s) alone or by combination of Your
|
||||
Contribution(s) with the Work to which such Contribution(s) were
|
||||
submitted. If any entity institutes patent litigation against You or
|
||||
any other entity (including a cross-claim or counterclaim in a
|
||||
lawsuit) alleging that your Contribution, or the Work to which
|
||||
you have contributed, constitutes direct or contributory patent
|
||||
infringement, then any patent licenses granted to that entity under
|
||||
this Agreement for that Contribution or Work shall terminate as of
|
||||
the date such litigation is filed.
|
||||
|
||||
4. You represent that you are legally entitled to grant the above license. If
|
||||
your employer(s) has rights to intellectual property that you create that
|
||||
includes your Contributions, you represent that you have received permission to
|
||||
make Contributions on behalf of that employer, that your employer has waived
|
||||
such rights for your Contributions to the Project, or that your employer has
|
||||
executed a separate Corporate CLA with the Project.
|
||||
|
||||
5. You represent that each of Your Contributions is Your original creation (see
|
||||
section 7 for submissions on behalf of others). You represent that Your
|
||||
Contribution submissions include complete details of any third-party license or
|
||||
other restriction (including, but not limited to, related patents and
|
||||
trademarks) of which you are personally aware and which are associated with
|
||||
any part of Your Contributions.
|
||||
|
||||
6. You are not expected to provide support for Your Contributions, except to the
|
||||
extent You desire to provide support. You may provide support for free, for a
|
||||
fee, or not at all. Unless required by applicable law or agreed to in writing,
|
||||
You provide Your Contributions on an “AS IS” BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied, including, without
|
||||
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
7. Should You wish to submit work that is not Your original creation, You may
|
||||
submit it to the Project separately from any Contribution, identifying the
|
||||
complete details of its source and of any license or other restriction
|
||||
(including, but not limited to, related patents, trademarks, and license
|
||||
agreements) of which you are personally aware, and conspicuously marking the
|
||||
work as “Submitted on behalf of a third-party: [named here]”.
|
||||
|
||||
8. You agree to notify the Project of any facts or circumstances of which you
|
||||
become aware that would make these representations inaccurate in any respect.
|
||||
|
||||
\[Please complete and sign on the next page.\]
|
||||
|
||||
::: {style="page-break-after: always; visibility: hidden"}
|
||||
```{=tex}
|
||||
\pagebreak
|
||||
```
|
||||
:::
|
||||
|
||||
Please sign:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
Date: \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Full name:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
Mailing Address:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Country:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
|
||||
E-Mail:
|
||||
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
|
||||
@@ -1,21 +0,0 @@
|
||||
OpenImageIO has been accepted to be an ASWF-administered project, by vote of
|
||||
the ASWF Technical Advisory Council (TAC) on May 3, 2023.
|
||||
|
||||
At this time, the ASWF subdirectory contains *proposed* (and sometimes TBD/WIP
|
||||
placeholders) project organization and policy documents that will be formally
|
||||
adopted as the OpenImageIO project is formally turned over to ASWF and moved
|
||||
to the AcademySoftwareFoundation GitHub account. Please file issues or PRs
|
||||
or review comments against these documents to make any suggested changes while
|
||||
we are revising the drafts.
|
||||
|
||||
Summary of the current state of documents:
|
||||
|
||||
| File | Status | Notes |
|
||||
| ---- | ------ | ----- |
|
||||
| CLA-corporate.md | Final | Standard ASWF corporate CLA, approved by the TSC. Will take effect when the repo moves. |
|
||||
| CLA-individual.md | Final | Standard ASWF individual CLA, approved by the TSC. Will take effect when the repo moves. |
|
||||
| CODE_OF_CONDUCT.md | Final | Links to the standard LF CoC, approved by the TSC and now in effect. |
|
||||
| CONTRIBUTING.md | Preliminary | Modified version of our existing CONTRIBUTING guidelines, lightly amended to reflect the changes that will come along with moving the repo, the new CLA/DCO rules, etc.
|
||||
| GOVERNANCE.md | Final | Approved by the TSC and now in effect. |
|
||||
| project_intake.md | Ongoing | This is the latest ASWF project intake checklist. We will check off items as we get them done. |
|
||||
| Technical-Charter.md | Final | Approved by the TSC. |
|
||||
@@ -1,242 +0,0 @@
|
||||
# Technical Charter (the "Charter") for OpenImageIO a Series of LF Projects, LLC
|
||||
|
||||
Adopted July 1, 2023 by unanimous vote of the TSC.
|
||||
|
||||
This Charter sets forth the responsibilities and procedures for technical
|
||||
contribution to, and oversight of, the OpenImageIO open source project, which
|
||||
has been established as OpenImageIO a Series of LF Projects, LLC (the
|
||||
“Project”). LF Projects, LLC (“LF Projects”) is a Delaware series limited
|
||||
liability company. All contributors (including committers, maintainers, and
|
||||
other technical positions) and other participants in the Project
|
||||
(collectively, “Collaborators”) must comply with the terms of this Charter.
|
||||
|
||||
### 1. Mission and Scope of the Project
|
||||
|
||||
* **a.** The mission of the Project is to develop software to read, write,
|
||||
and manipulate image files of any image file format relevant to vfx /
|
||||
animation via a format-agnostic API, with a feature set, scalability, and
|
||||
robustness needed for production.
|
||||
|
||||
* **b.** The scope of the Project includes collaborative development under
|
||||
the Project License (as defined herein) supporting the mission, including
|
||||
documentation, testing, integration and the creation of other artifacts
|
||||
that aid the development, deployment, operation or adoption of the open
|
||||
source project.
|
||||
|
||||
### 2. Technical Steering Committee
|
||||
|
||||
* **a.** The Technical Steering Committee (the “TSC”) will be responsible
|
||||
for all technical oversight of the open source Project.
|
||||
|
||||
* **b.** The TSC voting members are initially the Project’s Committers. At
|
||||
the inception of the project, the Committers of the Project will be as set
|
||||
forth within the “GOVERNANCE” file within the Project’s code repository.
|
||||
The TSC may choose an alternative approach for determining the voting
|
||||
members of the TSC, and any such alternative approach will be documented
|
||||
in the GOVERNANCE file. Any meetings of the Technical Steering Committee
|
||||
are intended to be open to the public, and can be conducted
|
||||
electronically, via teleconference, or in person.
|
||||
|
||||
* **c.** TSC projects generally will involve Contributors and Committers.
|
||||
The TSC may adopt or modify roles so long as the roles are documented in
|
||||
the GOVERNANCE file. Unless otherwise documented:
|
||||
|
||||
- **i.** Contributors include anyone in the technical community that
|
||||
contributes code, documentation, or other technical artifacts to the
|
||||
Project;
|
||||
|
||||
- **ii.** Committers are Contributors who have earned the ability to
|
||||
modify (“commit”) source code, documentation or other technical
|
||||
artifacts in a project’s repository; and
|
||||
|
||||
- **iii.** A Contributor may become a Committer by a majority approval of
|
||||
the existing Committers. A Committer may be removed by a majority
|
||||
approval of the other existing Committers.
|
||||
|
||||
* **d.** Participation in the Project through becoming a Contributor and
|
||||
Committer is open to anyone so long as they abide by the terms of this
|
||||
Charter.
|
||||
|
||||
* **e.** The TSC may (1) establish work flow procedures for the submission,
|
||||
approval, and closure/archiving of projects, (2) set requirements for the
|
||||
promotion of Contributors to Committer status, as applicable, and (3)
|
||||
amend, adjust, refine and/or eliminate the roles of Contributors, and
|
||||
Committers, and create new roles, and publicly document any TSC roles, as
|
||||
it sees fit.
|
||||
|
||||
* **f.** The TSC may elect a TSC Chair, who will preside over meetings of
|
||||
the TSC and will serve until their resignation or replacement by the TSC.
|
||||
The TSC Chair, or any other TSC member so designated by the TSC, will
|
||||
serve as the primary communication contact between the Project and the
|
||||
Academy Software Foundation, a directed fund of The Linux Foundation.
|
||||
|
||||
* **g.** Responsibilities: The TSC will be responsible for all aspects of
|
||||
oversight relating to the Project, which may include:
|
||||
|
||||
- **i.** coordinating the technical direction of the Project;
|
||||
|
||||
- **ii.** approving project or system proposals (including, but not
|
||||
limited to, incubation, deprecation, and changes to a sub-project’s
|
||||
scope);
|
||||
|
||||
- **iii.** organizing sub-projects and removing sub-projects;
|
||||
|
||||
- **iv.** creating sub-committees or working groups to focus on
|
||||
cross-project technical issues and requirements;
|
||||
|
||||
- **v.** appointing representatives to work with other open source or open
|
||||
standards communities;
|
||||
|
||||
- **vi.** establishing community norms, workflows, issuing releases, and
|
||||
security issue reporting policies;
|
||||
|
||||
- **vii.** approving and implementing policies and processes for
|
||||
contributing (to be published in the CONTRIBUTING file) and coordinating
|
||||
with the series manager of the Project (as provided for in the Series
|
||||
Agreement, the “Series Manager”) to resolve matters or concerns that may
|
||||
arise as set forth in Section 7 of this Charter;
|
||||
|
||||
- **viii.** discussions, seeking consensus, and where necessary, voting on
|
||||
technical matters relating to the code base that affect multiple
|
||||
projects; and
|
||||
|
||||
- **ix.** coordinating any marketing, events, or communications regarding
|
||||
the Project.
|
||||
|
||||
### 3. TSC Voting
|
||||
|
||||
* **a.** While the Project aims to operate as a consensus-based community,
|
||||
if any TSC decision requires a vote to move the Project forward, the
|
||||
voting members of the TSC will vote on a one vote per voting member basis.
|
||||
|
||||
* **b.** Quorum for TSC meetings requires at least fifty percent of all
|
||||
voting members of the TSC to be present. The TSC may continue to meet if
|
||||
quorum is not met but will be prevented from making any decisions at the
|
||||
meeting.
|
||||
|
||||
* **c.** Except as provided in Section 7.c. and 8.a, decisions by vote at a
|
||||
meeting require a majority vote of those in attendance, provided quorum is
|
||||
met. Decisions made by electronic vote without a meeting require a
|
||||
majority vote of all voting members of the TSC.
|
||||
|
||||
* **d.** In the event a vote cannot be resolved by the TSC, any voting
|
||||
member of the TSC may refer the matter to the Series Manager for
|
||||
assistance in reaching a resolution.
|
||||
|
||||
### 4. Compliance with Policies
|
||||
|
||||
* **a.** This Charter is subject to the Series Agreement for the Project and
|
||||
the Operating Agreement of LF Projects. Contributors will comply with the
|
||||
policies of LF Projects as may be adopted and amended by LF Projects,
|
||||
including, without limitation the policies listed at
|
||||
https://lfprojects.org/policies/.
|
||||
|
||||
* **b.** The TSC may adopt a code of conduct (“CoC”) for the Project, which
|
||||
is subject to approval by the Series Manager. In the event that a
|
||||
Project-specific CoC has not been approved, the LF Projects Code of
|
||||
Conduct listed at https://lfprojects.org/policies will apply for all
|
||||
Collaborators in the Project.
|
||||
|
||||
* **c.** When amending or adopting any policy applicable to the Project, LF
|
||||
Projects will publish such policy, as to be amended or adopted, on its web
|
||||
site at least 30 days prior to such policy taking effect; provided,
|
||||
however, that in the case of any amendment of the Trademark Policy or
|
||||
Terms of Use of LF Projects, any such amendment is effective upon
|
||||
publication on LF Project’s web site.
|
||||
|
||||
* **d.** All Collaborators must allow open participation from any individual
|
||||
or organization meeting the requirements for contributing under this
|
||||
Charter and any policies adopted for all Collaborators by the TSC,
|
||||
regardless of competitive interests. Put another way, the Project
|
||||
community must not seek to exclude any participant based on any criteria,
|
||||
requirement, or reason other than those that are reasonable and applied on
|
||||
a non-discriminatory basis to all Collaborators in the Project community.
|
||||
|
||||
* **e.** The Project will operate in a transparent, open, collaborative, and
|
||||
ethical manner at all times. The output of all Project discussions,
|
||||
proposals, timelines, decisions, and status should be made open and easily
|
||||
visible to all. Any potential violations of this requirement should be
|
||||
reported immediately to the Series Manager.
|
||||
|
||||
### 5. Community Assets
|
||||
|
||||
* **a.** LF Projects will hold title to all trade or service marks used by
|
||||
the Project (“Project Trademarks”), whether based on common law or
|
||||
registered rights. Project Trademarks will be transferred and assigned to
|
||||
LF Projects to hold on behalf of the Project. Any use of any Project
|
||||
Trademarks by Collaborators in the Project will be in accordance with the
|
||||
license from LF Projects and inure to the benefit of LF Projects.
|
||||
|
||||
* **b.** The Project will, as permitted and in accordance with such license
|
||||
from LF Projects, develop and own all Project GitHub and social media
|
||||
accounts, and domain name registrations created by the Project community.
|
||||
|
||||
* **c.** Under no circumstances will LF Projects be expected or required to
|
||||
undertake any action on behalf of the Project that is inconsistent with
|
||||
the tax-exempt status or purpose, as applicable, of the Joint Development
|
||||
Foundation or LF Projects, LLC.
|
||||
|
||||
### 6. General Rules and Operations.
|
||||
|
||||
* **a.**. The Project will:
|
||||
|
||||
- **i.** engage in the work of the Project in a professional manner
|
||||
consistent with maintaining a cohesive community, while also maintaining
|
||||
the goodwill and esteem of LF Projects, Joint Development Foundation and
|
||||
other partner organizations in the open source community; and
|
||||
|
||||
- **ii.** respect the rights of all trademark owners, including any
|
||||
branding and trademark usage guidelines.
|
||||
|
||||
### 7. Intellectual Property Policy
|
||||
|
||||
* **a.** Collaborators acknowledge that the copyright in all new
|
||||
contributions will be retained by the copyright holder as independent
|
||||
works of authorship and that no contributor or copyright holder will be
|
||||
required to assign copyrights to the Project.
|
||||
|
||||
* **a.** Except as described in Section 7.c., all contributions to the
|
||||
Project are subject to the following:
|
||||
|
||||
- **i.** All new inbound code contributions to the Project must be made
|
||||
using the Apache License, Version 2.0 available at
|
||||
http://www.apache.org/licenses/LICENSE-2.0 (the “Project License”).
|
||||
|
||||
- **ii.** All new inbound code contributions must also be accompanied by
|
||||
(i) a Developer Certificate of Origin (http://developercertificate.org)
|
||||
sign-off in the source code system that is submitted through a
|
||||
TSC-approved contribution process which will bind the authorized
|
||||
contributor and, if not self-employed, their employer to the applicable
|
||||
license and (ii) a duly executed contribution license agreement in the
|
||||
form approved by the TSC;
|
||||
|
||||
- **iii.** All outbound code will be made available under the Project
|
||||
License.
|
||||
|
||||
- **iv.** Documentation will be received and made available by the Project
|
||||
under the Creative Commons Attribution 4.0 International License
|
||||
(available at http://creativecommons.org/licenses/by/4.0/).
|
||||
|
||||
- **v.** The Project may seek to integrate and contribute back to other
|
||||
open source projects (“Upstream Projects”). In such cases, the Project
|
||||
will conform to all license requirements of the Upstream Projects,
|
||||
including dependencies, leveraged by the Project. Upstream Project code
|
||||
contributions not stored within the Project’s main code repository will
|
||||
comply with the contribution process and license terms for the
|
||||
applicable Upstream Project.
|
||||
|
||||
* **c.** The TSC may approve the use of an alternative license or licenses
|
||||
for inbound or outbound contributions on an exception basis. To request an
|
||||
exception, please describe the contribution, the alternative open source
|
||||
license(s), and the justification for using an alternative open source
|
||||
license for the Project. License exceptions must be approved by a
|
||||
two-thirds vote of the entire TSC.
|
||||
|
||||
* **d.** Contributed files should contain license information, such as SPDX
|
||||
short form identifiers, indicating the open source license or licenses
|
||||
pertaining to the file.
|
||||
|
||||
### 8. Amendments
|
||||
|
||||
* **a.** This charter may be amended by a two-thirds vote of the entire TSC
|
||||
and is subject to approval by LF Projects.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 271 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 313 KiB |
@@ -1,66 +0,0 @@
|
||||
# Project Intake checklist
|
||||
|
||||
This is a checklist for TSC's to review as part of the intake process. The TSC should review this entire list during the kickoff meeting. For anything outstanding, create an [issue](../issues) to track and link to it in the list
|
||||
|
||||
- Existing Project Governance
|
||||
- [X] A [LICENSE.md](../LICENSE.md) file in every code repository, with the license chosen an OSI-approved license.
|
||||
- [X] Any third-party components/dependencies included are listed along with thier licenses ( [THIRD-PARTY.md](../THIRD-PARTY.md) )
|
||||
- [X] A [README.md](../README.md) file welcoming new community members to the project and explaining why the project is useful and how to get started.
|
||||
- [X] A [CONTRIBUTING.md](../CONTRIBUTING.md) file explaining to other developers and your community of users how to contribute to the project. The file should explain what types of contributions are needed and how the process works, along with how to disclose security issues responsibly ( may also point to a [SECURITY.md](../SECURITY.md) file ).
|
||||
- [ ] A [CODEOWNERS](../CODEOWNERS) or [COMMITTERS](../COMMITERS.csv) file to define individuals or teams that are responsible for code in a repository; document current project owners and current and emeritus committers.
|
||||
- [X] A [CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md) file that sets the ground rules for participants’ behavior associated and helps to facilitate a friendly, welcoming environment. By default, projects should leverage the Linux Foundation Code of Conduct unless an alternate Code of Conduct was previously approved.
|
||||
- [X] A [RELEASING.md](../RELEASING.md) file that provides documentation on the release methodology, cadence, criteria, etc.
|
||||
- [X] A [GOVERNANCE.md](../GOVERNANCE.md) file that documents the project’s technical governance.
|
||||
- [ ] A [SUPPORT.md](../SUPPORT.md) file to let users and developers know about ways to get help with your project.
|
||||
- Infrastructure/Assets
|
||||
- [X] Technical Charter Approved
|
||||
- [ ] **(Awaiting scan from LF)** License scan completed and no issues found
|
||||
- [ ] Code repository imported to ASWF GitHub organization or ownership of current GitHub organization given to `thelinuxfoundation` user
|
||||
- [X] Developer Certificate of Origin past commit signoff done and DCO Probot enabled.
|
||||
- [X] Issue/feature tracker established (JIRA, GitHub issues)
|
||||
- [X] Mailing lists ( one of )
|
||||
- [X] Setup new lists ( -dev@ and -tsc@ ) on [ASWF groups.io](https://lists.aswf.io) ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to setup )
|
||||
- [X] (In progress) Move to [ASWF groups.io](https://lists.aswf.io) ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to transfer )
|
||||
- [X] Slack ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to setup project channel on [ASWF Slack](https://slack.aswf.io) )
|
||||
- [ ] Website
|
||||
- [X] CI/build environment
|
||||
- [X] Trademarks/mark ownership rights ( complete 'LF Projects - Form of Trademark and Account Assignment' - create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) - only needed if project using existing name )
|
||||
- [ ] Domain name ( create [issue with the LF IT staff](https://jira.linuxfoundation.org/plugins/servlet/theme/portal/2/group/19) to setup/transfer )
|
||||
- [ ] Zoom account access ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to get access to credentials )
|
||||
- [X] (N/A) Social media accounts or other project accounts ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to transfer )
|
||||
- [X] Logo(s) ( create [issue on artwork repo](https://github.com/AcademySoftwareFoundation/artwork/issues/new) to add in SVG and PNG format and color/black/white )
|
||||
- New Project Governance
|
||||
- [X] TSC members identified
|
||||
- [X] First TSC meeting held
|
||||
- [X] TSC meeting cadence set and added to project calendar
|
||||
- [X] CLA Approved ( if used ) ( [CCLA](CLA-corporate.md) and [ICLA](CLA-individual.md) )
|
||||
- Project charter ( [Technical-Charter.md](Technical-Charter.md) )
|
||||
- [X] Approved by TSC
|
||||
- [ ] Filed ( create pull request against [foundation repo](https://github.com/AcademySoftwareFoundation/foundation) )
|
||||
- [X] [Core Infrastructure Initiative Best Practices Badge](https://bestpractices.coreinfrastructure.org/) achieved as the 'Passing' level.
|
||||
- Outreach
|
||||
- [ ] New project announcement done ( create [issue on foundation repo](https://github.com/AcademySoftwareFoundation/foundation/issues/new) to trigger )
|
||||
- [X] Project added to ASWF website and ASWF landscape
|
||||
- Incubation Stage requirements
|
||||
- [X] Have achieved and maintained a [OpenSSF Best Practices Badge at the passing level](https://bestpractices.coreinfrastructure.org/en/criteria).
|
||||
- [ ] Have had a successful license scan with any critical issues remedied.
|
||||
- [ ] Have a defined project mission and scope
|
||||
- [ ] An overview of the project’s architecture and features defined.
|
||||
- [ ] A project roadmap defined, which should address the following questions.
|
||||
- What use cases are possible now?
|
||||
- What does the next year look like in terms of additional features and use cases covered?
|
||||
- [ ] Community and contributor growth assessment
|
||||
- The current number of contributors and committers, and the number of different organizations contributing to the project.
|
||||
- Demonstrate a sustained flow of commits / merged contributions
|
||||
- A credible plan for developing a thriving user community, in particular expanding the number of committers and contributors?
|
||||
- Outline of the plan for the project to complete the requirements for Adopted Stage
|
||||
- [ ] Obtain an affirmative vote of the TAC.
|
||||
- Adopted Stage graduation requirements
|
||||
- [ ] Demonstrate a substantial ongoing flow of commits and merged contributions, authored by a healthy number of diverse contributors.
|
||||
- [ ] Demonstrable roadmap progress.
|
||||
- [ ] A healthy number of public adopters that are identified within the project ( using an ADOPTERS file or showcased on the project’s website ).
|
||||
- [ ] Have achieved and maintained an [OpenSSF Best Practices Badge at the gold level](https://bestpractices.coreinfrastructure.org/en/criteria/2).
|
||||
- [ ] Have a technical lead appointed for voting representation of the project to the TAC.
|
||||
- [ ] Be deemed by the TAC to add value to the mission of ASWF.
|
||||
- [ ] 2/3 supermajority vote of the TAC
|
||||
- [ ] Affirmative majority vote of the Governing Board
|
||||
+17
-1954
File diff suppressed because it is too large
Load Diff
+23
-65
@@ -1,43 +1,23 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
cmake_minimum_required (VERSION 3.12)
|
||||
|
||||
set (OpenImageIO_VERSION "2.4.16.0")
|
||||
set (OpenImageIO_VERSION_OVERRIDE "" CACHE STRING
|
||||
"Version override (use with caution)!")
|
||||
mark_as_advanced (OpenImageIO_VERSION_OVERRIDE)
|
||||
if (OpenImageIO_VERSION_OVERRIDE)
|
||||
set (OpenImageIO_VERSION ${OpenImageIO_VERSION_OVERRIDE})
|
||||
endif ()
|
||||
|
||||
project (OpenImageIO VERSION ${OpenImageIO_VERSION}
|
||||
project (OpenImageIO VERSION 2.2.21.0
|
||||
HOMEPAGE_URL "https://openimageio.org"
|
||||
LANGUAGES CXX C)
|
||||
|
||||
set (PROJ_NAME OIIO) # short name, caps
|
||||
string (TOLOWER ${PROJ_NAME} PROJ_NAME_LOWER) # short name lower case
|
||||
string (TOUPPER ${PROJ_NAME} PROJ_NAME_UPPER) # short name upper case
|
||||
set (PROJECT_VERSION_RELEASE_TYPE "" CACHE STRING
|
||||
"Build type, for example: dev, beta2, RC1 (empty string for normal release)")
|
||||
set (PROJECT_VERSION_RELEASE_TYPE "") # "dev", "betaX", "RCY", ""
|
||||
set (${PROJECT_NAME}_VERSION_RELEASE_TYPE ${PROJECT_VERSION_RELEASE_TYPE})
|
||||
set (PROJECT_AUTHORS "Contributors to the OpenImageIO project")
|
||||
option (${PROJECT_NAME}_SUPPORTED_RELEASE
|
||||
"Set ON for supported release branch, OFF for master" ON)
|
||||
if (${PROJECT_NAME}_SUPPORTED_RELEASE)
|
||||
set (${PROJECT_NAME}_DEV_RELEASE OFF)
|
||||
else ()
|
||||
set (${PROJECT_NAME}_DEV_RELEASE ON)
|
||||
endif ()
|
||||
set (${PROJECT_NAME}_SUPPORTED_RELEASE 1) # Change to 1 after release branch
|
||||
|
||||
# Set PROJECT_IS_TOP_LEVEL to ON if if this is the top level project (not
|
||||
# if this is included as a subproject of something else). Note that this is
|
||||
# handled automatically for CMake >= 3.21.
|
||||
if (CMAKE_VERSION VERSION_LESS 3.21)
|
||||
if ("${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}")
|
||||
set (PROJECT_IS_TOP_LEVEL ON)
|
||||
endif ()
|
||||
# Identify whether this is included as a subproject of something else
|
||||
if (NOT "${CMAKE_PROJECT_NAME}" STREQUAL "${PROJECT_NAME}")
|
||||
set (${PROJECT_NAME}_IS_SUBPROJECT ON)
|
||||
message (STATUS "${PROJECT_NAME} is configuring as a CMake subproject")
|
||||
endif ()
|
||||
|
||||
# If the user wants to use Conan to build dependencies, they will have done
|
||||
@@ -55,15 +35,6 @@ if (NOT CMAKE_BUILD_TYPE)
|
||||
set (CMAKE_BUILD_TYPE "Release")
|
||||
endif ()
|
||||
|
||||
# If the user hasn't configured cmake with an explicit
|
||||
# -DCMAKE_INSTALL_PREFIX=..., then set it to safely install into ./dist, to
|
||||
# help prevent the user from accidentally writing over /usr/local or whatever.
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
|
||||
AND PROJECT_IS_TOP_LEVEL)
|
||||
set (CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/dist" CACHE PATH
|
||||
"Installation location" FORCE)
|
||||
endif()
|
||||
|
||||
message (STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}")
|
||||
message (STATUS "CMake ${CMAKE_VERSION}")
|
||||
message (STATUS "CMake system = ${CMAKE_SYSTEM}")
|
||||
@@ -73,7 +44,6 @@ message (STATUS "Project build dir = ${CMAKE_BINARY_DIR}")
|
||||
message (STATUS "Project install prefix = ${CMAKE_INSTALL_PREFIX}")
|
||||
message (STATUS "Configuration types = ${CMAKE_CONFIGURATION_TYPES}")
|
||||
message (STATUS "Build type = ${CMAKE_BUILD_TYPE}")
|
||||
message (STATUS "Supported release = ${${PROJECT_NAME}_SUPPORTED_RELEASE}")
|
||||
|
||||
# Make the build area layout look a bit more like the final dist layout
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
@@ -100,18 +70,11 @@ option (BUILD_OIIOUTIL_ONLY "If ON, will build *only* libOpenImageIO_Util" OFF)
|
||||
option (BUILD_DOCS "If ON, build documentation and man pages." ON)
|
||||
option (INSTALL_DOCS "If ON, install documentation and man pages." ON)
|
||||
option (INSTALL_FONTS "If ON, install default fonts" ON)
|
||||
option (INSTALL_CMAKE_HELPER "If On, install FindOpenImageIO.cmake" ON)
|
||||
option (EMBEDPLUGINS "Embed format plugins in libOpenImageIO" ON)
|
||||
set (PLUGIN_SEARCH_PATH "" CACHE STRING "Default plugin search path")
|
||||
file (TO_NATIVE_PATH "${PLUGIN_SEARCH_PATH}" PLUGIN_SEARCH_PATH_NATIVE)
|
||||
set (CMAKE_DEBUG_POSTFIX "_d" CACHE STRING "Library naming postfix for Debug builds")
|
||||
|
||||
if (CMAKE_UNITY_BUILD_BATCH_SIZE)
|
||||
set (UNITY_SMALL_BATCH_SIZE "${CMAKE_UNITY_BUILD_BATCH_SIZE}" CACHE STRING "Unity batch mode size for expensive files")
|
||||
else ()
|
||||
set (UNITY_SMALL_BATCH_SIZE 8 CACHE STRING "Unity batch mode size for expensive files")
|
||||
endif ()
|
||||
message(STATUS "CMAKE_UNITY_BUILD_MODE = ${CMAKE_UNITY_BUILD_MODE}")
|
||||
message(STATUS "CMAKE_UNITY_BUILD_BATCH_SIZE = ${CMAKE_UNITY_BUILD_BATCH_SIZE}")
|
||||
set (CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library naming postfix for Debug builds (e.g., '_debug')")
|
||||
|
||||
option (OIIO_THREAD_ALLOW_DCLP "OIIO threads may use DCLP for speed" ON)
|
||||
if (NOT OIIO_THREAD_ALLOW_DCLP)
|
||||
@@ -122,26 +85,18 @@ set (TEX_BATCH_SIZE "" CACHE STRING "Force TextureSystem SIMD batch size (e.g. 1
|
||||
if (TEX_BATCH_SIZE)
|
||||
add_definitions ("-DOIIO_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_definitions (-DOIIO_TEX_NO_IMPLEMENT_VARYINGREF=1)
|
||||
endif ()
|
||||
|
||||
# Set the default namespace
|
||||
set (${PROJ_NAME}_NAMESPACE ${PROJECT_NAME} CACHE STRING
|
||||
"Customized outer namespace base name (version will be added)")
|
||||
option (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH
|
||||
"Should the inner namespace include the patch number" ${${PROJECT_NAME}_DEV_RELEASE})
|
||||
option (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH "Should the inner namespace include the patch number" OFF)
|
||||
set (PROJ_NAMESPACE "${${PROJ_NAME}_NAMESPACE}")
|
||||
set (PROJ_NAMESPACE_V "${PROJ_NAMESPACE}_v${PROJECT_VERSION_MAJOR}_${PROJECT_VERSION_MINOR}")
|
||||
if (${PROJ_NAME}_NAMESPACE_INCLUDE_PATCH)
|
||||
if (OIIO_NAMESPACE_INCLUDE_PATCH)
|
||||
set (PROJ_NAMESPACE_V "${PROJ_NAMESPACE_V}_${PROJECT_VERSION_PATCH}")
|
||||
endif ()
|
||||
message(STATUS "Setting Namespace to: ${PROJ_NAMESPACE_V}")
|
||||
|
||||
# Define OIIO_INTERNAL symbol only when building OIIO itself, will not be
|
||||
# defined for downstream projects using OIIO.
|
||||
add_definitions (-DOIIO_INTERNAL=1)
|
||||
|
||||
list (APPEND CMAKE_MODULE_PATH
|
||||
"${PROJECT_SOURCE_DIR}/src/cmake/modules"
|
||||
@@ -166,7 +121,7 @@ include (pythonutils)
|
||||
include (externalpackages)
|
||||
|
||||
# Include all our testing apparatus and utils, but not if it's a subproject
|
||||
if (PROJECT_IS_TOP_LEVEL)
|
||||
if (NOT ${PROJECT_NAME}_IS_SUBPROJECT)
|
||||
include (testing)
|
||||
else ()
|
||||
macro (oiio_add_tests)
|
||||
@@ -265,6 +220,11 @@ if (NOT MSVC)
|
||||
COMPONENT developer)
|
||||
endif()
|
||||
|
||||
# Oddball: install the FindOpenImageIO.cmake file
|
||||
install (FILES src/cmake/modules/FindOpenImageIO.cmake
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/Modules
|
||||
COMPONENT cmake)
|
||||
|
||||
# Export the configuration files. There are also library-specific config
|
||||
# exports in the CMakeLists.txt of libOpenImageIO.
|
||||
include (CMakePackageConfigHelpers)
|
||||
@@ -305,11 +265,9 @@ install (EXPORT OIIO_EXPORTED_TARGETS
|
||||
NAMESPACE ${PROJECT_NAME}::)
|
||||
|
||||
|
||||
if (PROJECT_IS_TOP_LEVEL AND BUILD_TESTING)
|
||||
oiio_setup_test_data()
|
||||
oiio_add_all_tests()
|
||||
endif ()
|
||||
oiio_add_all_tests()
|
||||
|
||||
if (PROJECT_IS_TOP_LEVEL)
|
||||
|
||||
if (NOT ${PROJECT_NAME}_IS_SUBPROJECT)
|
||||
include (packaging)
|
||||
endif ()
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# Code of Conduct
|
||||
|
||||
The OpenImageIO project abides by Linux Foundation's code of conduct, which
|
||||
you can read in full [here](https://lfprojects.org/policies/code-of-conduct).
|
||||
|
||||
To report incidents or to appeal reports of incidents, send email to
|
||||
the Manager of LF Projects at manager@lfprojects.org.
|
||||
+73
-146
@@ -1,76 +1,56 @@
|
||||
Contributing to OpenImageIO
|
||||
===========================
|
||||
|
||||
> NOTE: This is the proposed post-ASWF-move version of CONTRIBUTING. After the
|
||||
> project is legally transferred and moved to the new repo, this file will
|
||||
> replace the one at the project root.
|
||||
>
|
||||
> TO DO:
|
||||
>
|
||||
> - [X] Update the mail list sign-up page after the mail list moves.
|
||||
> - [ ] Update the repo URL
|
||||
> - [ ] Double check the security and info email addresses.
|
||||
>
|
||||
|
||||
Code contributions to OpenImageIO are always welcome, and [nearly 200
|
||||
people](https://github.com/OpenImageIO/oiio/blob/master/CREDITS.md) have done
|
||||
so over the years. Please review this document to get a briefing on our
|
||||
process.
|
||||
Code contributions to OpenImageIO are always welcome, and [nearly 150
|
||||
people](CREDITS.md) have done so over the years. Please review this
|
||||
document to get a briefing on our process.
|
||||
|
||||
|
||||
Mail List and Slack
|
||||
-------------------
|
||||
Mail Lists
|
||||
----------
|
||||
|
||||
Contributors should be reading the oiio-dev mail list:
|
||||
There are two mail lists associated with OpenImageIO development:
|
||||
|
||||
* [oiio-dev](https://lists.aswf.io/g/oiio-dev)
|
||||
* [oiio-dev](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org)
|
||||
For developers of the OpenImageIO code itself, or users who are really
|
||||
interested in the OIIO internals. This is where we mostly discuss the code
|
||||
(including bug reports), but are also happy to answer user questions about
|
||||
use or working of OIIO.
|
||||
|
||||
You can sign up for the mail list on your own using the link above.
|
||||
* [oiio-announce](http://lists.openimageio.org/listinfo.cgi/oiio-announce-openimageio.org)
|
||||
For announcements about major OIIO releases or other important news.
|
||||
|
||||
The [ASWF Slack](https://slack.aswf.io/) has an `openimageio` channel. Sign up
|
||||
for the Slack on your own, then under "channels", select "browse channels" and
|
||||
you should see the openimageio channel (among those of the other projects and
|
||||
working groups).
|
||||
You can sign up for these mail lists on your own using the links above.
|
||||
|
||||
|
||||
How to Ask for Help
|
||||
-------------------
|
||||
|
||||
If you have trouble installing, building, or using OpenImageIO, but there's
|
||||
not yet a solid reason to suspect you've encountered a genuine bug, start by
|
||||
posting a question to the [oiio-dev mailing
|
||||
list](https://lists.aswf.io/g/oiio-dev).
|
||||
This is the place for questions such has "How do I...".
|
||||
not yet reason to suspect you've encountered a genuine bug, start by posting
|
||||
a question to the
|
||||
[oiio-dev](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org)
|
||||
mailing list. This is the place for question such has "How do I...".
|
||||
|
||||
|
||||
Bug Reports and Issue Tracking
|
||||
------------------------------
|
||||
|
||||
We use GitHub's issue tracking system for reporting bugs and requesting
|
||||
enhancements: https://github.com/OpenImageIO/oiio/issues
|
||||
|
||||
**If you are merely asking a question ("how do I...")**, please do not file an
|
||||
issue, but instead ask the question on the [oiio-dev mailing
|
||||
list](https://lists.aswf.io/g/oiio-dev).
|
||||
We use GitHub's issue tracking system for bugs and enhancements:
|
||||
https://github.com/OpenImageIO/oiio/issues
|
||||
|
||||
If you are submitting a bug report, please be sure to note which version of
|
||||
OIIO you are using, on what platform (OS/version, which compiler you used,
|
||||
and any special build flags or other unusual environmental issues). Please
|
||||
give a specific, as-detailed-as-possible account of
|
||||
give a specific an account of
|
||||
|
||||
* what you tried (command line, source code example)
|
||||
* what you expected to happen
|
||||
* what actually happened (crash? error message? ran but didn't give the
|
||||
correct result?)
|
||||
* what you tried
|
||||
* what happened
|
||||
* what you expected to happen instead
|
||||
|
||||
with enough detail that others can easily reproduce the problem just by
|
||||
following your instructions. Please quote the exact error message you
|
||||
received. If you are having trouble building, please post the full cmake
|
||||
output of a fresh VERBOSE=1 build.
|
||||
with enough detail that others can reproduce the problem. Please quote the
|
||||
exact error message you received. If you are having trouble building, please
|
||||
post the full cmake output of a fresh VERBOSE=1 build.
|
||||
|
||||
Suspected security vulnerabilities should be reported by the same process.
|
||||
|
||||
@@ -81,57 +61,29 @@ may contact us privately at [security@openimageio.org](security@openimageio.org)
|
||||
Contributor License Agreement (CLA) and Intellectual Property
|
||||
-------------------------------------------------------------
|
||||
|
||||
To protect the project -- and the contributors! -- we do require a Contributor
|
||||
License Agreement (CLA) for anybody submitting changes. This is for your own
|
||||
safety, as it prevents any possible future disputes between code authors and
|
||||
their employers or anyone else who might think they might own the IP output of
|
||||
the author.
|
||||
To protect the project -- and the contributors! -- we do require a
|
||||
Contributor License Agreement (CLA) for anybody submitting substantial
|
||||
changes. Trivial changes (such as an alteration to the Makefiles, a one-line
|
||||
bug fix, etc.) may be accepted without a CLA, at the sole discretion of the
|
||||
project leader, but anything complex needs a CLA. This is for your own
|
||||
safety.
|
||||
|
||||
* [Corporate CLA](https://github.com/OpenImageIO/oiio/blob/master/ASWF/CLA-corporate.md) :
|
||||
If you are writing the code as part of your job, or if there is any
|
||||
possibility that your employers might think they own any intellectual
|
||||
property you create. This needs to be executed by someone who has
|
||||
signatory power for the company.
|
||||
* If you are an individual writing the code on your own time and you're SURE
|
||||
you are the sole owner of any intellectual property you contribute, use the
|
||||
[Individual CLA](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-INDIVIDUAL).
|
||||
|
||||
* [Individual CLA](https://github.com/OpenImageIO/oiio/blob/master/ASWF/CLA-individual.md) :
|
||||
If you are an individual writing the code on your own time, using your own
|
||||
equipment, and you're SURE you are the sole owner of any intellectual
|
||||
property you contribute.
|
||||
* If you are writing the code as part of your job, or if there is any
|
||||
possibility that your employers might think they own any intellectual
|
||||
property you create, then you should use the [Corporate
|
||||
CLA](https://github.com/OpenImageIO/oiio/blob/master/src/doc/CLA-CORPORATE).
|
||||
|
||||
The easiest way to sign CLAs is digitally [using EasyCLA](https://corporate.v1.easycla.lfx.linuxfoundation.org).
|
||||
Companies who prefer not to use the online tools may sign, scan, and email
|
||||
the executed copy to manager@lfprojects.org.
|
||||
Download the appropriate CLA from the links above (or find them in the
|
||||
src/doc directory of the software distribution), print, sign, and rescan it
|
||||
(or just add a digital signature directly), and email it back to us
|
||||
(info@openimageio.org).
|
||||
|
||||
The CLA allows a company to name a "CLA Manager" (who does not need
|
||||
signatory power) who has the ability to use the online system to add or
|
||||
delete individual employees of the company who are authorized to submit pull
|
||||
requests, without needing to get an executive to amend and sign the
|
||||
agreement each time.
|
||||
|
||||
Please note that these CLAs are based on the Apache 2.0 CLAs, and differ
|
||||
minimally, only as much as was required to correctly describe the EasyCLA
|
||||
process and our use of a CLA manager.
|
||||
|
||||
**Contribution sign off**
|
||||
|
||||
This project requires the use of the [Developer’s Certificate of Origin 1.1
|
||||
(DCO)](https://developercertificate.org/), which is the same mechanism that
|
||||
the [Linux®
|
||||
Kernel](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n416)
|
||||
and many other communities use to manage code contributions. The DCO is
|
||||
considered one of the simplest tools for sign offs from contributors as the
|
||||
representations are meant to be easy to read and indicating signoff is done
|
||||
as a part of the commit message.
|
||||
|
||||
Here is an example Signed-off-by line, which indicates that the submitter
|
||||
accepts the DCO:
|
||||
|
||||
Signed-off-by: John Doe <john.doe@example.com>
|
||||
|
||||
You can include this automatically when you commit a change to your local
|
||||
git repository using `git commit -s`. You might also want to
|
||||
leverage this [command line tool](https://github.com/coderanger/dco) for
|
||||
automatically adding the signoff message on commits.
|
||||
Our CLA's are identical to those used by Apache and many other open source
|
||||
projects.
|
||||
|
||||
|
||||
Pull Requests and Code Review
|
||||
@@ -146,61 +98,40 @@ repository. The protocol is like this:
|
||||
1. Get a GitHub account, fork OpenImageIO/oiio to create your own repository
|
||||
on GitHub, and then clone it to get a repository on your local machine.
|
||||
|
||||
1. Edit, compile, and test your changes. Run clang-format (see the
|
||||
2. Edit, compile, and test your changes. Run clang-format (see the
|
||||
instructions on coding style below).
|
||||
|
||||
1. Push your changes to your fork (each unrelated pull request to a separate
|
||||
3. Push your changes to your fork (each unrelated pull request to a separate
|
||||
"topic branch", please).
|
||||
|
||||
1. Make a "pull request" on GitHub for your patch.
|
||||
4. Make a "pull request" on GitHub for your patch.
|
||||
|
||||
2. If your patch will induce a major compatibility break, or has a design
|
||||
5. If your patch will induce a major compatibility break, or has a design
|
||||
component that deserves extended discussion or debate among the wider OIIO
|
||||
community, then it may be prudent to email oiio-dev pointing everybody to
|
||||
the pull request URL and discussing any issues you think are important.
|
||||
|
||||
1. All pull requests automatically launch CI jobs on GitHub Actions to
|
||||
6. All pull requests automatically launch CI jobs on GitHub Actions to
|
||||
ensure that the build completes and that the tests suite runs correctly, for
|
||||
a variety of platform, compiler, library, and flag combinations. The status
|
||||
a varity of platform, compiler, library, and flag combinations. The status
|
||||
of the CI tests for your PR will be displayed on the GitHub PR page. We will
|
||||
not accept PRs that don't build cleanly or pass the existing testsuite.
|
||||
|
||||
1. The reviewer will look over the code and critique on the "comments" area.
|
||||
7. The reviewer will look over the code and critique on the "comments" area.
|
||||
Reviewers may ask for changes, explain problems they found, congratulate the
|
||||
author on a clever solution, etc. But until somebody says "LGTM" (looks good
|
||||
to me), the code should not be committed. Sometimes this takes a few rounds
|
||||
of give and take. Please don't take it hard if your first try is not
|
||||
accepted. It happens to all of us.
|
||||
|
||||
1. After approval, one of the senior developers (with commit approval to the
|
||||
8. After approval, one of the senior developers (with commit approval to the
|
||||
official main repository) will merge your fixes into the master branch.
|
||||
|
||||
|
||||
Coding Style
|
||||
------------
|
||||
|
||||
### File conventions
|
||||
|
||||
C++ implementation should be named `*.cpp`. Headers should be named `.h`.
|
||||
All headers should contain
|
||||
|
||||
#pragma once
|
||||
|
||||
All source files should begin with these three lines:
|
||||
|
||||
// Copyright Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// https://github.com/OpenImageIO/oiio
|
||||
|
||||
as a comment in the syntax of whatever source code is used in that file.
|
||||
|
||||
Occasionally a file may contain substantial code from another project and will
|
||||
also list its original copyright and license information. Do NOT alter that
|
||||
notice or copy it to any new files, it really only applies to the particular
|
||||
file in which it appears.
|
||||
|
||||
|
||||
### Formatting
|
||||
#### Formatting
|
||||
|
||||
We use [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||
to uniformly format our source code prior to PR submission. Make sure that
|
||||
@@ -220,35 +151,31 @@ it on your end and update the PR with the formatting fixes.
|
||||
|
||||
If you don't have clang-format set up on your machine, and your patch is not
|
||||
very long, you may find that it's more convenient to just submit it and hope
|
||||
for the best, and if it doesn't pass the CI test, look at the diffs in the log
|
||||
for the "clang-format" CI run and make the corrections by hand and then submit
|
||||
an update to the patch (i.e. relying on CI to run clang-format for you).
|
||||
for the best, and if it doesn't pass the CI test, look at the diffs in
|
||||
the log and make the corrections by hand and then submit an update to the
|
||||
patch (i.e. relying on CI to run clang-format for you).
|
||||
|
||||
Because the basic formatting is automated by clang-format, we won't
|
||||
enumerate the rules here.
|
||||
|
||||
For the occasional non-clang-format regions of code, NEVER alter somebody
|
||||
else's code to reformat just because you found something that violates the
|
||||
rules. Let the group/author/leader know, and resist the temptation to change
|
||||
it yourself.
|
||||
|
||||
Each line of text in your code, including comments, should be at most 80
|
||||
characters long. Exceptions are allowed for those rare cases where letting a
|
||||
line be longer (and wrapping on an 80-character window) is actually a better
|
||||
and clearer alternative than trying to split it into two lines. Sometimes this
|
||||
happens, but it's extremely rare.
|
||||
#### File conventions
|
||||
|
||||
We prefer three (3) consecutive empty lines between freestanding functions or
|
||||
class definitions, one blank line between method declarations within a class
|
||||
definition. Put a single blank line within a function if it helps to visually
|
||||
separate different sequential tasks, but don't put multiple blank lines in a
|
||||
row within a function, or blank lines right after an opening brace or right
|
||||
before a closing brace. The goal is to use just enough white space to help
|
||||
developers visually parse the code (for example, spotting at a glance where
|
||||
new functions begin), but not so much as to spread it out or be confusing.
|
||||
C++ implementation should be named `*.cpp`. Headers should be named `.h`.
|
||||
All headers should contain
|
||||
|
||||
#pragma once
|
||||
|
||||
All source files should begin with the copyright and license, which can be
|
||||
found in the LICENSE.md file (or cut and pasted from any other other source
|
||||
file).
|
||||
|
||||
For NEW source files, please change the copyright year to the present. DO
|
||||
NOT edit existing files only to update the copyright year, it just creates
|
||||
pointless deltas and offers no increased protection.
|
||||
|
||||
|
||||
### Identifiers
|
||||
#### Identifiers
|
||||
|
||||
In general, classes and templates should start with upper case and
|
||||
capitalize new words: `class CustomerList;` In general, local variables
|
||||
@@ -268,7 +195,7 @@ Names of data should generally be nouns. Functions/methods are trickier: a
|
||||
the name of a function that returns a value but has no side effects should
|
||||
be a noun, but a procedure that performs an action should be a verb.
|
||||
|
||||
### Class structure
|
||||
#### Class structure
|
||||
|
||||
Try to avoid public data members, although there are some classes that serve
|
||||
a role similar to a simple C struct -- a very straightforward collection of
|
||||
@@ -288,21 +215,21 @@ Avoid multiple inheritance.
|
||||
|
||||
Namespaces: yes, use them!
|
||||
|
||||
### Third-party libraries
|
||||
#### Third-party libraries
|
||||
|
||||
Prefer C++11 `std` rather than Boost, where both can do the same task.
|
||||
Feel free to use Boost classes you already see in the code base, but don't
|
||||
use any Boost you don't see us already using, without first checking with
|
||||
the project leader.
|
||||
|
||||
Please do use Imath vector, matrix, and utility classes where applicable.
|
||||
Please do use IlmBase vector, matrix, and utility classes where applicable.
|
||||
Don't write your own vector or matrix code!
|
||||
|
||||
Use these libraries for OIIO internals, but please DO NOT require them in
|
||||
any of our main external APIs unless it's been thoroughly discussed and
|
||||
approved by the group.
|
||||
|
||||
### Comments and Doxygen
|
||||
#### Comments and Doxygen
|
||||
|
||||
Comment philosophy: try to be clear, try to help teach the reader what's
|
||||
going on in your code.
|
||||
@@ -318,7 +245,7 @@ They looks like this:
|
||||
float foo; ///< Doxygen comments on same line look like this
|
||||
}
|
||||
|
||||
### Miscellaneous
|
||||
#### Miscellaneous
|
||||
|
||||
Macros should be used only rarely -- prefer inline functions, templates,
|
||||
enums, or "const" values wherever possible.
|
||||
|
||||
+7
-35
@@ -4,7 +4,6 @@ by first name.
|
||||
If you know of somebody that I missed or have corrections, please email:
|
||||
lg@openimageio.org
|
||||
|
||||
* Adam Mains
|
||||
* Akihiro Yamasaki
|
||||
* Alan Jones
|
||||
* Alejandro Conty
|
||||
@@ -14,19 +13,14 @@ lg@openimageio.org
|
||||
* Alexander Murashko
|
||||
* Alexandre Gauthier
|
||||
* Alexis Oblet
|
||||
* Alexy Pawlow
|
||||
* Alister Chowdhury
|
||||
* Alexy Pawlow
|
||||
* Aman Shah
|
||||
* Ananth Garre
|
||||
* Anders Langlands
|
||||
* Angus Davis
|
||||
* Anthony Nemoff
|
||||
* Aras Pranckevičius
|
||||
* Arkady Shapkin
|
||||
* Basileios Anastasatos
|
||||
* Bastien Montagne
|
||||
* Ben De Luca
|
||||
* Bernhard Rosenkraenzer
|
||||
* Biswapriyo Nath
|
||||
* Blair Tennessy
|
||||
* Blazej Floch
|
||||
@@ -42,11 +36,9 @@ lg@openimageio.org
|
||||
* Chris Crosetto
|
||||
* Chris Foster
|
||||
* Chris Kulla
|
||||
* Chris Whalen
|
||||
* Christoph Willing
|
||||
* Cliff Stein
|
||||
* Clément Champetier
|
||||
* Dalai Felinto
|
||||
* Dan Wexler
|
||||
* Daniel Dresser
|
||||
* Daniel Flehner Heen
|
||||
@@ -54,6 +46,7 @@ lg@openimageio.org
|
||||
* David Aguilar
|
||||
* David Gordon
|
||||
* Deepak Gopinath
|
||||
* Delai Felinto
|
||||
* Dennis Schridde
|
||||
* Dieter De Baets
|
||||
* Dinko Galetik
|
||||
@@ -65,39 +58,32 @@ lg@openimageio.org
|
||||
* Elvic Liang
|
||||
* Fabien Castan
|
||||
* Fabien Servant
|
||||
* Fredrik Averpil
|
||||
* Frédéric Devernay
|
||||
* Fredrik Averpil
|
||||
* Gaurav Bansal
|
||||
* Gerdya
|
||||
* Ghislain Antony Vaillant
|
||||
* Gonzalo Garramuño
|
||||
* Gregor Mueckl
|
||||
* Grégoire De Lillo
|
||||
* Gregor Mueckl
|
||||
* Guillaume Chatelet
|
||||
* Hanspeter Niederstrasser
|
||||
* Harry Mallon
|
||||
* Heiko Becker
|
||||
* Henri Fousse
|
||||
* Harry Mallon
|
||||
* Hugh Macdonald
|
||||
* Imarz
|
||||
* Irena Damsky
|
||||
* Ismael Cortes
|
||||
* Jan Hettenkofer
|
||||
* Jan Honsbrok
|
||||
* Jens Lindgren
|
||||
* Jep Hill
|
||||
* Jeph Alapat
|
||||
* Jens Lindgren
|
||||
* Jeremy Rose
|
||||
* Jeremy Selan
|
||||
* Jim Hourihan
|
||||
* Joachim Reichel
|
||||
* Johannes Unterguggenberger
|
||||
* John Burnett
|
||||
* John Fea
|
||||
* John Haddon
|
||||
* Jonathan Hearn
|
||||
* Jonathan Scruggs
|
||||
* Joris Nijs
|
||||
* Joseph Goldstone
|
||||
* Julien Enche
|
||||
* Justin Israel
|
||||
@@ -125,13 +111,9 @@ lg@openimageio.org
|
||||
* Mariusz Szczepanczyk
|
||||
* Mark Boorer
|
||||
* Mark Visser
|
||||
* Massimo Paladin
|
||||
* Matteo F. Vescovi
|
||||
* Matthew E. Levine
|
||||
* Max Liani
|
||||
* Merwan Achibet
|
||||
* Michael Cho
|
||||
* Michael Oliver
|
||||
* Michel Lerenard
|
||||
* Michel Normand
|
||||
* Mikael Sundell
|
||||
@@ -143,39 +125,32 @@ lg@openimageio.org
|
||||
* Nick Black
|
||||
* Nicolas Burtnyk
|
||||
* Nixon Kwok
|
||||
* Noah Rahm (designer of our logo!)
|
||||
* Northon Patrick
|
||||
* Nuno Cardoso
|
||||
* Ole Gulbrandsen
|
||||
* Ott Tinn
|
||||
* Pascal Lecocq
|
||||
* Patrick Hodoul
|
||||
* Patrick Piché
|
||||
* Paul Melis
|
||||
* Paul Molodowitch
|
||||
* Pavel Karneliuk
|
||||
* Pete Larabell
|
||||
* Philip Nemec
|
||||
* Pino Toscano
|
||||
* Povilas Kanapickas
|
||||
* Puneet Jain
|
||||
* Radu Arjocu
|
||||
* Ramon Montoya
|
||||
* Ray Molenkamp
|
||||
* Rémi Achard
|
||||
* Richard Shaw
|
||||
* Robert Matusewicz
|
||||
* Roeland Schoukens
|
||||
* Robert Matusewicz
|
||||
* Roman Zulak
|
||||
* Rui Li
|
||||
* Russell Greene
|
||||
* Ryen
|
||||
* Saket Jalan
|
||||
* Sam Richards
|
||||
* Samuel Nicholas
|
||||
* Scott Wilson
|
||||
* Sebastian Elsner
|
||||
* SebTV
|
||||
* Seifeddine Dridi
|
||||
* Sergey Sharybin
|
||||
* Shane Ambler
|
||||
@@ -190,14 +165,11 @@ lg@openimageio.org
|
||||
* Till Dechent
|
||||
* Tim D. Smith
|
||||
* Tim Grant
|
||||
* Tom Knowles
|
||||
* Troy James Sobotka
|
||||
* Vinod Khare
|
||||
* Vishal Agrawal
|
||||
* Vitor Franchi
|
||||
* Wayne Arnold
|
||||
* Will Rosecrans
|
||||
* William Krick
|
||||
* Wormszer
|
||||
* Xo Wang
|
||||
* Yang Yang
|
||||
|
||||
-215
@@ -1,215 +0,0 @@
|
||||
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
||||
<!-- Copyright Contributors to the OpenImageIO Project. -->
|
||||
|
||||
# OpenImageIO Project Governance
|
||||
|
||||
OpenImageIO is a project of the Academy Software Foundation and relies on the
|
||||
ASWF governance policies, supported by the Linux Foundation.
|
||||
|
||||
There are three primary project roles: Contributors submit code to the
|
||||
project; Committers approve code to be included into the project; and the
|
||||
Technical Steering Committee (TSC) provides overall high-level project
|
||||
guidance.
|
||||
|
||||
* [Contributors](#Contributors)
|
||||
* [Committers](#Committers)
|
||||
* [Technical Steering Committee](#Technical-Steering-Committee)
|
||||
|
||||
## Contributors
|
||||
|
||||
The OpenImageIO project grows and thrives from assistance from Contributors.
|
||||
Contributors include anyone in the community who contributes code,
|
||||
documentation, or other technical artifacts that have been incorporated into
|
||||
the project repository.
|
||||
|
||||
Anyone can be a Contributor. You need no formal approval from the project,
|
||||
beyond the legal forms.
|
||||
|
||||
### How to Become a Contributor
|
||||
|
||||
* Review the coding standards and [contributing
|
||||
guidelines](../CONTRIBUTING.md) to ensure your contribution is in line with
|
||||
the project's coding and styling guidelines.
|
||||
|
||||
* Sign the Individual CLA, or if you are employed by an organization that
|
||||
might have any claim to IP you create, have your organization sign the
|
||||
Corporate CLA.
|
||||
|
||||
* Submit your code as a PR with the appropriate DCO sign-off on each commit.
|
||||
The easiest way to do this is to ensure that you commit your code with `git
|
||||
commit -s`.
|
||||
|
||||
## Committers
|
||||
|
||||
Project Committers have merge access on the OpenImageIO GitHub repository
|
||||
and are responsible for approving submissions by Contributors.
|
||||
|
||||
### Committer Responsibilities
|
||||
|
||||
Typical activities of a Committer include:
|
||||
|
||||
* Helping users and novice contributors.
|
||||
|
||||
* Ensuring a response to questions posted to the
|
||||
[Oiio-dev developer mail list](https://lists.aswf.io/g/oiio-dev)
|
||||
|
||||
* Contributing code and documentation changes that improve the project.
|
||||
|
||||
* Reviewing and commenting on issues and pull requests.
|
||||
|
||||
* Ensuring that changes and new code meet acceptable standards and are in
|
||||
the long-term interest of the project.
|
||||
|
||||
* Participation in working groups.
|
||||
|
||||
* Merging pull requests.
|
||||
|
||||
### How to Become a Committer
|
||||
|
||||
Any member of the OpenImageIO community (though typically an existing
|
||||
Committer or TSC member) may nominate an individual making significant and
|
||||
valuable contributions to the OpenImageIO project to become a new Committer.
|
||||
To nominate a new Committer, open an issue in the OpenImageIO repository, send
|
||||
mail to the TSC mail list, or raise the issue at a TSC meeting.
|
||||
|
||||
The TSC may periodically review the Committer list to identify inactive
|
||||
Committers. Past Committers are typically given Emeritus status. Emeriti may
|
||||
request that the TSC restore them to active Committer status.
|
||||
|
||||
## Technical Steering Committee
|
||||
|
||||
The Technical Steering Committee (TSC) has final authority over this project.
|
||||
As defined in the project charter, in addition to committer activities, TSC
|
||||
responsibilities also include, but are not limited to:
|
||||
|
||||
* Coordinating technical direction of the Project.
|
||||
|
||||
* Project governance and contribution policy.
|
||||
|
||||
* GitHub repository administration.
|
||||
|
||||
* Maintaining the list of additional Committers
|
||||
|
||||
* Appointing representatives to work with other open source or open
|
||||
standards communities.
|
||||
|
||||
* Discussions, seeking consensus, and where necessary, voting on technical
|
||||
matters relating to the code base that affect multiple projects.
|
||||
|
||||
* Coordinating any marketing, events, or communications regarding the
|
||||
project.
|
||||
|
||||
Within the TSC are two elected leadership roles to be held by its members
|
||||
and voted on annually. Any TSC member can express interest in serving in a
|
||||
role, or nominate another member to serve. There are no term limits, and one
|
||||
person may hold multiple roles simultaneously. Should a TSC member resign
|
||||
from a leadership role before their term is complete, a successor shall be
|
||||
elected through the standard nomination and voting process to complete the
|
||||
remainder of the term. The leadership roles are:
|
||||
|
||||
* **Chair**: This position acts as the project manager, organizing meetings
|
||||
and providing oversight to project administration.
|
||||
|
||||
* **Chief Architect**: This position makes all the final calls on design and
|
||||
technical decisions, and is responsible for avoiding "design by committee"
|
||||
pitfalls.
|
||||
|
||||
The chair role is assumed to rotate annually (though there are no term
|
||||
limits, so the TSC may reelect an existing chair). The chief architect
|
||||
position should be a source of stability and coherent design vision, so the
|
||||
TSC is encouraged to choose an architect who can serve for many years and
|
||||
only change architects when it is necessary for the health of the project
|
||||
and its community.
|
||||
|
||||
At the time of election, the TSC will also agree upon which of these two
|
||||
leaders will serve as the OpenImageIO ASWF (Academy Software Foundation) TAC
|
||||
(Technical Advisory Council) representative for the term. This member
|
||||
represents the project at all ASWF TAC meetings.
|
||||
|
||||
### TSC Members
|
||||
|
||||
Current voting members of the TSC are:
|
||||
|
||||
* **Chair and TAC representative**: Daniel Greenstein - Sony Pictures Imageworks (possibly interim?)
|
||||
* **Chief Architect**: Larry Gritz - Sony Pictures Imageworks
|
||||
* Anton Dukhovnikov - Wētā Digital / Unity
|
||||
* Jesse Yurkovich - Blender
|
||||
* Joseph Goldstone - ARRI
|
||||
* Lewis Wakeland - Disney TV Animation
|
||||
* Luke Emrose - Animal Logic (interim?)
|
||||
* Martin Davies - LAIKA
|
||||
* Robin Rowe - Heroic Robots
|
||||
* Thiago Ize - Autodesk
|
||||
|
||||
|
||||
### TSC Nomination and Succession
|
||||
|
||||
Any proposal for additional members of the TSC may be submitted by Committers,
|
||||
TSC members, or other major stakeholders of the OpenImageIO community by
|
||||
opening an issue outlining their case or raising the issue at a TSC meeting.
|
||||
New TSC members are accepted or rejected by majority vote of the TSC.
|
||||
|
||||
If a TSC member is for an extended period not regularly participating or
|
||||
performing the responsibilities expected of TSC members, the TSC may by
|
||||
majority vote request an alternate TSC member be submitted by that
|
||||
organization, or remove the inactive member from the TSC.
|
||||
|
||||
A voting member of the TSC may nominate a successor in the event that such
|
||||
voting member decides to leave the TSC, and the TSC, including the departing
|
||||
member, shall confirm or reject such nomination by a vote. In the event that
|
||||
the departing member's nomination for successor is rejected by vote of the
|
||||
TSC, the departing member shall be entitled to continue nominating successors
|
||||
until one such successor is confirmed by vote of the TSC. If the departing
|
||||
member fails or is unable to nominate a successor, the TSC may nominate one on
|
||||
the departing member's behalf.
|
||||
|
||||
TSC membership is presumed to be retained by the individual even if they
|
||||
change employers, provided they remain active in the project. The TSC may take
|
||||
action to ensure that organizational stakeholder representation not become
|
||||
severely disproportionate, for example by urging an organization that loses
|
||||
its sole TSC representative to nominate a new member, or by limiting the total
|
||||
number of voting members from any one organization if too many members all
|
||||
move to the same organization.
|
||||
|
||||
### TSC Meetings
|
||||
|
||||
Any meetings of the TSC are intended to be open to the public, except where
|
||||
there is a reasonable need for privacy. The TSC meets regularly in a voice
|
||||
conference call, at a cadence deemed appropriate by the TSC. The TSC Chair
|
||||
moderates the meeting, or appoints another TSC member to moderate in his or
|
||||
her absence. Meetings may also be streamed online where appropriate;
|
||||
connection details will be posted to the oiio-dev mail list in advance of the
|
||||
scheduled meeting.
|
||||
|
||||
The biweekly TSC meetings can be found on the [ASWF Calendar](https://www.aswf.io/meeting-calendar),
|
||||
just click on the OpenImageIO meeting entries to get the Zoom link.
|
||||
|
||||
Items are added to the TSC agenda which are considered contentious or are
|
||||
modifications of governance, contribution policy, TSC membership, or release
|
||||
process, in addition to topics involving the high-level technical direction
|
||||
of the project.
|
||||
|
||||
The intention of the agenda is not to approve or review all patches. That
|
||||
should happen continuously on GitHub and be handled by the larger group of
|
||||
Committers.
|
||||
|
||||
Any community member or Contributor can ask that something be reviewed by
|
||||
the TSC at the meeting by logging a GitHub issue. Any Committer, TSC member,
|
||||
or the meeting chair can bring the issue to the TSC's attention by applying
|
||||
the `TSC` label.
|
||||
|
||||
Prior to each TSC meeting, the meeting chair will share the agenda with
|
||||
members of the TSC. TSC members can also add items to the agenda at the
|
||||
beginning of each meeting. The meeting chair and the TSC cannot veto or
|
||||
remove items.
|
||||
|
||||
The TSC may invite additional persons to participate in a non-voting
|
||||
capacity.
|
||||
|
||||
The meeting chair is responsible for ensuring that minutes are taken and
|
||||
archived in the project repository or other designated accessible location.
|
||||
|
||||
Due to the challenges of scheduling a global meeting with participants in
|
||||
several time zones, the TSC will seek to resolve as many agenda items as
|
||||
possible outside of meetings on the public mailing list or through GitHub
|
||||
issues, discussions, and pull requests.
|
||||
+37
-135
@@ -3,8 +3,8 @@ Installation instructions for OpenImageIO
|
||||
|
||||
# Table of Contents
|
||||
1. [OpenImageIO's Dependencies](#dependencies)
|
||||
2. [Installing binaries from package managers](#installing-from-package-managers)
|
||||
3. [Building OIIO from source](#building-from-source)
|
||||
2. [Installing binaries from package managers](#installingfrompackagemanagers)
|
||||
3. [Building OIIO from source](#buildingfromsource)
|
||||
|
||||
|
||||
Dependencies
|
||||
@@ -14,69 +14,62 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
|
||||
|
||||
### Required dependencies -- OIIO will not build at all without these
|
||||
|
||||
* C++14 (also builds with C++17, and C++20)
|
||||
* The default build mode is C++14. This can be controlled by via the
|
||||
CMake configuration flag: `-DCMAKE_CXX_STANDARD=17`, etc.
|
||||
* Compilers: gcc 6.1 - 12.1, clang 3.4 - 16, MSVS 2017 - 2019,
|
||||
Intel icc 17+, **Intel OneAPI C++ compiler 2022+**.
|
||||
* CMake >= 3.12 (tested through 3.26)
|
||||
* **OpenEXR/Imath >= 2.3** (recommended: 2.4 or higher; tested through 3.2 and main)
|
||||
* libTIFF >= 3.9 (recommended: 4.0+; tested through 4.5)
|
||||
* libjpeg >= 8, or libjpeg-turbo >= 1.1 (tested through jpeg9d and jpeg-turbo
|
||||
2.1)
|
||||
* Boost >= 1.53 (recommended: at least 1.66; tested through 1.81)
|
||||
* [fmtlib](https://github.com/fmtlib/fmt) >= 6.1.2 (tested through 10.0). If
|
||||
not found at build time, this will be automatically downloaded unless the
|
||||
build sets `-DBUILD_MISSING_FMT=OFF`.
|
||||
* C++11 (also builds with C++14, C++17, and C++20)
|
||||
* Compilers: gcc 4.8.2 - 11.2, clang 3.3 - 13, MSVS 2015 - 2019,
|
||||
icc version 13 or higher
|
||||
* CMake >= 3.12 (tested through 3.21)
|
||||
* OpenEXR/Imath >= 2.0 (recommended: 2.2 or higher; tested through 3.1)
|
||||
* libTIFF >= 3.9 (recommended: 4.0+; tested through 4.3)
|
||||
|
||||
### Optional dependencies -- features may be disabled if not found
|
||||
* If you are building the `iv` viewer (which will be disabled if any of
|
||||
these are not found):
|
||||
* Qt5 >= 5.6 (tested through 5.15) or Qt6 (tested through 6.4)
|
||||
* Qt >= 5.6 (tested through 5.15)
|
||||
* OpenGL
|
||||
* If you are building the Python bindings or running the testsuite:
|
||||
* Python >= 2.7 (tested against 2.7, 3.7, 3.8, 3.9, 3.10, 3.11)
|
||||
* pybind11 >= 2.4.2 (Tested through 2.11. Note that pybind11 v2.10+ does
|
||||
not support Python < 3.6.)
|
||||
* Python >= 2.7 (tested against 2.7, 3.6, 3.7, 3.8, 3.9)
|
||||
* pybind11 >= 2.4.2 (Tested through 2.8.)
|
||||
* NumPy
|
||||
* If you want support for camera "RAW" formats:
|
||||
* LibRaw >= 0.15 (tested 0.15 - 0.21.1; LibRaw >= 0.18 is necessary for
|
||||
* LibRaw >= 0.15 (tested 0.15 - 0.20; LibRaw >= 0.18 is necessary for
|
||||
ACES support and much better recognition of camera metadata; if
|
||||
building with C++17 or higher, LibRaw >= 0.20 is necessary)
|
||||
* If you want support for a wide variety of video formats:
|
||||
* ffmpeg >= 3.0 (tested through 6.0)
|
||||
* ffmpeg >= 2.6 (tested through 5.0)
|
||||
* If you want support for jpeg 2000 images:
|
||||
* OpenJpeg >= 2.0 (tested through 2.5; we recommend 2.4 or higher
|
||||
for multithreading support)
|
||||
* **OpenJpeg >= 2.0** (tested through 2.4)
|
||||
* If you want support for Field3D files:
|
||||
* Field3D (tested through 1.7.3)
|
||||
* If you want support for OpenVDB files:
|
||||
* OpenVDB >= 5.0 (tested through 10.0)
|
||||
* If you want to use TBB as the thread pool:
|
||||
* TBB >= 2018 (tested through 2021 and OneTBB)
|
||||
* OpenVDB >= 5.0 (tested through 8.1) and Intel TBB >= 2018 (tested
|
||||
through 2021)
|
||||
* Note that OpenVDB 8.0+ requires C++14 or higher.
|
||||
* If you want support for converting to and from OpenCV data structures,
|
||||
or for capturing images from a camera:
|
||||
* OpenCV 3.x, or 4.x (tested through 4.5)
|
||||
* OpenCV 2.x, 3.x, or 4.x (tested through 4.5)
|
||||
* If you want support for GIF images:
|
||||
* giflib >= 4.1 (tested through 5.2; 5.0+ is strongly recommended for
|
||||
stability and thread safety)
|
||||
* If you want support for HEIF/HEIC or AVIF images:
|
||||
* libheif >= 1.3 (1.7 required for AVIF support, tested through 1.16)
|
||||
* libheif >= 1.3 (1.7 required for AVIF support, tested through 1.11)
|
||||
* libheif must be built with an AV1 encoder/decoder for AVIF support.
|
||||
* Avoid libheif 1.10 on Mac, it is very broken. Libheif 1.11+ is fine.
|
||||
* Avoid libheif 1.10 on Mac, it is very broken. Libheif 1.11 is fine.
|
||||
* If you want support for DDS files:
|
||||
* libsquish >= 1.13 (tested through 1.15)
|
||||
* But... if not found on the system, an embedded version will be used.
|
||||
* If you want support for DICOM medical image files:
|
||||
* DCMTK >= 3.6.1 (tested through 3.6.7)
|
||||
* DCMTK >= 3.6.1 (tested through 3.6.5)
|
||||
* If you want support for WebP images:
|
||||
* WebP >= 0.6.1 (tested through 1.3.1)
|
||||
* WebP >= 0.6.1 (tested through 1.1.0)
|
||||
* If you want support for OpenColorIO color transformations:
|
||||
* OpenColorIO >= 1.1 (tested through 2.3; 2.0+ is recommended)
|
||||
* OpenColorIO >= 1.1 (tested through 2.1)
|
||||
* If you want support for Ptex:
|
||||
* Ptex >= 2.3.1 (probably works for older; tested through 2.4.2)
|
||||
* If you want to be able to do font rendering into images:
|
||||
* Freetype (minimum unknown, tested 2.8 through 2.13)
|
||||
* Ptex >= 2.3.1 (probably works for older; tested through 2.4.0)
|
||||
* We use PugiXML for XML parsing. There is a version embedded in the OIIO
|
||||
tree, but if you want to use an external, system-installed version (as
|
||||
may be required by some software distributions with policies against
|
||||
may be required by some software distrbutions with policies against
|
||||
embedding other projects), then just build with `-DUSE_EXTERNAL_PUGIXML=1`.
|
||||
Any PugiXML >= 1.8 should be fine (we have tested through 1.13).
|
||||
Any PugiXML >= 1.8 should be fine (we have tested through 1.11).
|
||||
|
||||
|
||||
|
||||
@@ -86,11 +79,6 @@ Mac OS X, and Windows.
|
||||
Our build system is based upon 'CMake'. If you don't already have it
|
||||
installed on your system, you can get it from http://www.cmake.org
|
||||
|
||||
If certain dependencies (robin-map and fmtlib) are not found, their sources
|
||||
will be retrieved and built into libraries, as part of the build process. The
|
||||
sources of those dependencies are cloned from their Git repo, hence `git` must
|
||||
be available as a command.
|
||||
|
||||
After you build OpenImageIO, if you compiled with the `EMBEDPLUGINS=0` flag
|
||||
you will need to set the environment variable `OIIO_LIBRARY_PATH` to point
|
||||
to the 'lib' directory where OpenImageIO is installed, or else it will
|
||||
@@ -106,10 +94,8 @@ build options), maybe one of these packages managers will do it for you:
|
||||
|
||||
* vcpkg (https://github.com/Microsoft/vcpkg)
|
||||
* https://github.com/Microsoft/vcpkg/tree/master/ports/openimageio
|
||||
* `vcpkg install openimageio [tools]`
|
||||
* For a full list of supported build features: `vcpkg search openimageio`
|
||||
* Instructions for building a Python wheel on Windows:
|
||||
https://github.com/Correct-Syntax/py-oiio
|
||||
* `.\vcpkg install openimageio [tools]`
|
||||
* For a full list of supported build features: `.\vcpkg search openimageio`
|
||||
* homebrew (https://github.com/Homebrew/brew)
|
||||
* https://formulae.brew.sh/formula/openimageio
|
||||
* `brew install openimageio`
|
||||
@@ -164,7 +150,7 @@ file format (jpeg, fits, png, etc.). This works both as a CMake variable and
|
||||
also as an environment variable.
|
||||
|
||||
`ENABLE_PkgName=0` : Disables use of an *optional* dependency (such as
|
||||
FFmpeg, OpenVDB, Webp, etc.) -- even if the dependency is found on the
|
||||
FFmpeg, Field3D, Webp, etc.) -- even if the dependency is found on the
|
||||
system. This will obviously disable any functionality that requires the
|
||||
dependency. This works both as a CMake variable and
|
||||
also as an environment variable.
|
||||
@@ -270,92 +256,8 @@ Building on Windows
|
||||
|
||||
**Method 1 - from source**
|
||||
|
||||
You will need to have Git, CMake and Visual Studio installed.
|
||||
|
||||
The minimal set of dependencies for OIIO is: Boost, zlib, libTIFF, OpenEXR, and libjpeg or libjpeg-turbo. If you have them built somewhere then you skip
|
||||
the section below, and will only have to point OIIO build process so their locations.
|
||||
|
||||
* Boost: get the boost source archive, extract into `{BOOST_ROOT}`.
|
||||
```
|
||||
cd {BOOST_ROOT}
|
||||
bootstrap
|
||||
b2
|
||||
```
|
||||
* zlib: this will build it, and then delete the non-static library, so they don't get picked up:
|
||||
```
|
||||
cd {ZLIB_ROOT}
|
||||
git clone https://github.com/madler/zlib .
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=. ..
|
||||
cmake --build . --config Release --target install
|
||||
del lib\zlib.lib
|
||||
```
|
||||
* libTIFF:
|
||||
```
|
||||
cd {TIFF_ROOT}
|
||||
git clone https://gitlab.com/libtiff/libtiff.git .
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=. ..
|
||||
cmake --build . --target install
|
||||
```
|
||||
* libjpeg-turbo:
|
||||
```
|
||||
cd {JPEG_ROOT}
|
||||
git clone https://github.com/libjpeg-turbo/libjpeg-turbo .
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=OFF -DCMAKE_INSTALL_PREFIX=. ..
|
||||
cmake --build . --config Release --target install
|
||||
```
|
||||
* OpenEXR: you'll have to point it to your `{ZLIB_ROOT}` location from the above. If copy-pasting the multi-line command (with lines ending in `^`) into
|
||||
cmd.exe prompt, make sure to copy all the lines at once.
|
||||
```
|
||||
cd {EXR_ROOT}
|
||||
git clone https://github.com/AcademySoftwareFoundation/openexr .
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=dist ^
|
||||
-DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DOPENEXR_BUILD_TOOLS=OFF ^
|
||||
-DOPENEXR_INSTALL_TOOLS=OFF -DOPENEXR_INSTALL_EXAMPLES=OFF ^
|
||||
-DZLIB_ROOT={ZLIB_ROOT}\build ..
|
||||
cmake --build . --target install --config Release
|
||||
```
|
||||
|
||||
Now get the OIIO source and do one-time CMake configuration step. Replace `{*_ROOT}` below with folders where you have put the 3rd party
|
||||
dependencies.
|
||||
```
|
||||
cd {OIIO_ROOT}
|
||||
git clone https://github.com/OpenImageIO/oiio .
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DVERBOSE=ON -DCMAKE_BUILD_TYPE=Release ^
|
||||
-DBoost_USE_STATIC_LIBS=ON -DBoost_NO_WARN_NEW_VERSIONS=ON -DBoost_ROOT={BOOST_ROOT} ^
|
||||
-DZLIB_ROOT={ZLIB_ROOT}\build ^
|
||||
-DTIFF_ROOT={TIFF_ROOT}\build ^
|
||||
-DOpenEXR_ROOT={EXR_ROOT}\build\dist ^
|
||||
-DImath_DIR={EXR_ROOT}\build\dist\lib\cmake\Imath ^
|
||||
-DJPEG_ROOT={JPEG_ROOT}\build ^
|
||||
-DUSE_PYTHON=0 -DUSE_QT=0 -DBUILD_SHARED_LIBS=0 -DLINKSTATIC=1 ..
|
||||
```
|
||||
|
||||
This will produce `{OIIO_ROOT}/build/OpenImageIO.sln` that can be opened in Visual Studio IDE. Note that the solution will be
|
||||
only for the Intel x64 architecture only; and will only target "min-spec" (SSE2) SIMD instruction set.
|
||||
|
||||
Optional packages that OIIO can use (e.g. libpng, Qt) can be build and pointed to OIIO build process in a similar way.
|
||||
|
||||
In Visual Studio, open `{OIIO_ROOT}/build/OpenImageIO.sln` and pick Release build configuration. If you pick Debug, you
|
||||
might need to re-run the CMake command above with `-DCMAKE_BUILD_TYPE=Debug` and also have all the dependencies above built
|
||||
with `Debug` config too.
|
||||
|
||||
The main project that builds the library is `OpenImageIO`. The library is built into `{OIIO_ROOT}/build/lib/{CONFIG}` folder.
|
||||
The various OIIO command line tools (`oiiotool`, `iconvert` etc.) are projects under Tools subfolder in VS IDE solution explorer.
|
||||
They all build into `{OIIO_ROOT}/build/bin/{CONFIG}` folder.
|
||||
|
||||
There's a `CMakePredefinedTargets/INSTALL` project that you can build to produce a `{OIIO_ROOT}/dist` folder with `bin`, `include`,
|
||||
`lib`, `share` folders as an OIIO distribution.
|
||||
|
||||
The instructions above use options for building statically-linked OIIO library and tools. Adjust options passed to CMake to
|
||||
produce a dynamic-linked version.
|
||||
|
||||
I really need someone to write correct, modern docs about how to build
|
||||
from source on Windows.
|
||||
|
||||
**Method 2 - Using vcpkg**
|
||||
|
||||
@@ -363,7 +265,7 @@ produce a dynamic-linked version.
|
||||
|
||||
2. Follow vcpkg installation instructions and complete the install. Please note vcpkg has its own list of prerequisites listed on their page.
|
||||
|
||||
3. Execute the PowerShell command from where vcpkg is located in directory. ``vcpkg install openimageio``
|
||||
3. Execute the PowerShell command from where vcpkg is located in directory. ``.\vcpkg install openimageio``
|
||||
|
||||
Test Images
|
||||
-----------
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
Copyright (c) 2008-present by Contributors to the OpenImageIO project.
|
||||
All Rights Reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+23
-195
@@ -1,201 +1,29 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
BSD 3-Clause License
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
Copyright (c) 2008-present by Contributors to the OpenImageIO project.
|
||||
All Rights Reserved.
|
||||
|
||||
1. Definitions.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
#
|
||||
# Run 'make help' to list helpful targets.
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
#########################################################################
|
||||
|
||||
|
||||
@@ -21,6 +21,15 @@ working_dir := ${shell pwd}
|
||||
# Figure out which architecture we're on
|
||||
include ${working_dir}/src/make/detectplatform.mk
|
||||
|
||||
# Presence of make variables DEBUG and PROFILE cause us to make special
|
||||
# builds, which we put in their own areas.
|
||||
ifdef DEBUG
|
||||
variant +=.debug
|
||||
endif
|
||||
ifdef PROFILE
|
||||
variant +=.profile
|
||||
endif
|
||||
|
||||
MY_MAKE_FLAGS ?=
|
||||
MY_NINJA_FLAGS ?=
|
||||
MY_CMAKE_FLAGS ?=
|
||||
@@ -37,8 +46,10 @@ endif
|
||||
|
||||
# Set up variables holding the names of platform-dependent directories --
|
||||
# set these after evaluating site-specific instructions
|
||||
build_dir ?= build
|
||||
dist_dir ?= dist
|
||||
top_build_dir ?= build
|
||||
build_dir ?= ${top_build_dir}/${platform}${variant}
|
||||
top_dist_dir ?= dist
|
||||
dist_dir ?= ${top_dist_dir}/${platform}${variant}
|
||||
|
||||
INSTALL_PREFIX ?= ${working_dir}/${dist_dir}
|
||||
|
||||
@@ -187,10 +198,6 @@ MY_CMAKE_FLAGS += -G Ninja
|
||||
BUILDSENTINEL := build.ninja
|
||||
endif
|
||||
|
||||
ifneq (${UNITY},)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_MODE=${UNITY}
|
||||
endif
|
||||
|
||||
ifeq (${CODECOV},1)
|
||||
CMAKE_BUILD_TYPE=Debug
|
||||
MY_CMAKE_FLAGS += -DCODECOV:BOOL=${CODECOV}
|
||||
@@ -238,7 +245,7 @@ endif
|
||||
#########################################################################
|
||||
# Top-level documented targets
|
||||
|
||||
all: install
|
||||
all: dist
|
||||
|
||||
# 'make debug' is implemented via recursive make setting DEBUG
|
||||
debug:
|
||||
@@ -258,7 +265,7 @@ config:
|
||||
cd ${build_dir} ; \
|
||||
${CMAKE} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
|
||||
${MY_CMAKE_FLAGS} ${working_dir} ; \
|
||||
${MY_CMAKE_FLAGS} ../.. ; \
|
||||
fi)
|
||||
|
||||
|
||||
@@ -296,7 +303,7 @@ clang-format: config
|
||||
)
|
||||
|
||||
|
||||
# DEPRECATED: 'make dist' is just a synonym for 'make install'
|
||||
# 'make dist' is just a synonym for 'make install'
|
||||
dist : install
|
||||
|
||||
TEST_FLAGS += --force-new-ctest-process --output-on-failure
|
||||
@@ -312,16 +319,7 @@ test: build
|
||||
cd ${build_dir} ; \
|
||||
lcov -b . -d . -c -o cov.info ; \
|
||||
lcov --remove cov.info "/usr*" -o cov.info ; \
|
||||
lcov --remove cov.info "*/usr/incude" -o cov.info ; \
|
||||
lcov --remove cov.info "/Library/Developer/*" -o cov.info ; \
|
||||
lcov --remove cov.info "*/detail/pugixml/*" -o cov.info ; \
|
||||
lcov --remove cov.info "*/detail/fmt/*" -o cov.info ; \
|
||||
lcov --remove cov.info "*/detail/farmhash.h" -o cov.info ; \
|
||||
lcov --remove cov.info "*/v1/*" -o cov.info ; \
|
||||
lcov --remove cov.info "*/ext/robin-map/*" -o cov.info ; \
|
||||
lcov --remove cov.info "*/kissfft.hh" -o cov.info ; \
|
||||
lcov --remove cov.info "*/stb_sprintf.h" -o cov.info ; \
|
||||
genhtml -o ../_coverage -t "Test coverage" --num-spaces 4 cov.info ; \
|
||||
genhtml -o ./cov -t "Test coverage" --num-spaces 4 cov.info ; \
|
||||
fi )
|
||||
|
||||
# 'make testall' does a full build and then runs all tests (even the ones
|
||||
@@ -338,8 +336,10 @@ clean:
|
||||
realclean: clean
|
||||
${CMAKE} -E remove_directory ${dist_dir}
|
||||
|
||||
# DEPRECATED: 'make nuke' blows away the build and dist areas for all platforms
|
||||
nuke: realclean
|
||||
# 'make nuke' blows away the build and dist areas for all platforms
|
||||
nuke:
|
||||
${CMAKE} -E remove_directory ${top_build_dir}
|
||||
${CMAKE} -E remove_directory ${top_dist_dir}
|
||||
|
||||
doxygen:
|
||||
doxygen src/doc/Doxyfile
|
||||
@@ -359,6 +359,7 @@ help:
|
||||
@echo " make profile Build and install for profiling"
|
||||
@echo " make clean Remove the temporary files in ${build_dir}"
|
||||
@echo " make realclean Remove both ${build_dir} AND ${dist_dir}"
|
||||
@echo " make nuke Remove ALL of build and dist (not just ${platform})"
|
||||
@echo " make test Run tests"
|
||||
@echo " make testall Run all tests, even broken ones"
|
||||
@echo " make clang-format Run clang-format on all the source files"
|
||||
@@ -369,13 +370,12 @@ help:
|
||||
@echo " STOP_ON_WARNING=0 Do not stop building if compiler warns"
|
||||
@echo " OPENIMAGEIO_SITE=xx Use custom site build mods"
|
||||
@echo " MYCC=xx MYCXX=yy Use custom compilers"
|
||||
@echo " CMAKE_CXX_STANDARD=14 C++ standard to build with (default is 14)"
|
||||
@echo " CMAKE_CXX_STANDARD=14 Compile in C++14 mode (default is C++11)"
|
||||
@echo " USE_LIBCPLUSPLUS=1 For clang, use libc++"
|
||||
@echo " GLIBCXX_USE_CXX11_ABI=1 For gcc, use the new string ABI"
|
||||
@echo " EXTRA_CPP_ARGS= Additional args to the C++ command"
|
||||
@echo " USE_NINJA=1 Set up Ninja build (instead of make)"
|
||||
@echo " USE_CCACHE=0 Disable ccache (even if available)"
|
||||
@echo " UNITY=BATCH Do a 'Unity' build (BATCH or GROUP or nothing)"
|
||||
@echo " CODECOV=1 Enable code coverage tests"
|
||||
@echo " SANITIZE=name1,... Enable sanitizers (address, leak, thread)"
|
||||
@echo " CLANG_TIDY=1 Run clang-tidy on all source (can be modified"
|
||||
@@ -383,7 +383,7 @@ help:
|
||||
@echo " CLANG_FORMAT_INCLUDES=... CLANG_FORMAT_EXCLUDES=..."
|
||||
@echo " Customize files for 'make clang-format'"
|
||||
@echo " Linking and libraries:"
|
||||
@echo " SOVERSION=nn Include the specified major version number "
|
||||
@echo " SOVERSION=nn Include the specifed major version number "
|
||||
@echo " in the shared object metadata"
|
||||
@echo " OIIO_LIBNAME_SUFFIX=name Optional name appended to library names"
|
||||
@echo " BUILD_SHARED_LIBS=0 Build static library instead of shared"
|
||||
@@ -392,7 +392,7 @@ help:
|
||||
@echo " For each dependeny Foo, defining ENABLE_Foo=0 disables it, even"
|
||||
@echo " if found. And you can hint where to find it with Foo_ROOT=path"
|
||||
@echo " Note that it is case sensitive! The list of package names is:"
|
||||
@echo " DCMTK FFmpeg Freetype GIF JPEGTurbo"
|
||||
@echo " DCMTK FFmpeg Field3D Freetype GIF JPEGTurbo"
|
||||
@echo " LibRaw OpenColorIO OpenCV OpenGL OpenJpeg OpenVDB"
|
||||
@echo " PTex R3DSDK TBB TIFF Webp"
|
||||
@echo " Finding and Using Dependencies:"
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<p align="center">
|
||||
<img src="ASWF/logos/openimageio-horizontal-gradient.png">
|
||||
</p>
|
||||
README for OpenImageIO
|
||||
======================
|
||||
|
||||
[](https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md)
|
||||
[](https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md)
|
||||
[](https://github.com/OpenImageIO/oiio/actions/workflows/ci.yml)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/2694)
|
||||
|
||||
@@ -31,7 +30,7 @@ OpenImageIO consists of:
|
||||
* Plugins implementing I/O for several popular image file formats,
|
||||
including TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, ICO, BMP, Targa,
|
||||
JPEG-2000, RMan Zfile, FITS, DDS, Softimage PIC, PNM, DPX, Cineon,
|
||||
IFF, OpenVDB, Ptex, Photoshop PSD, Wavefront RLA, SGI, WebP,
|
||||
IFF, Field3D, OpenVDB, Ptex, Photoshop PSD, Wavefront RLA, SGI, WebP,
|
||||
GIF, DICOM, HEIF/HEIC/AVIF, many "RAW" digital camera formats, and a variety
|
||||
of movie formats (readable as individual frames). More are being developed
|
||||
all the time.
|
||||
@@ -68,13 +67,10 @@ Licensing
|
||||
|
||||
OpenImageIO is (c) Copyright Contributors to the OpenImageIO project.
|
||||
|
||||
OpenImageIO is distributed using primarily the Apache 2.0 license -- see the
|
||||
[LICENSE.md](LICENSE.md) file for details. The documentation is licensed
|
||||
under the [Creative Commons Attribution 4.0 Unported
|
||||
License](http://creativecommons.org/licenses/by/4.0/). A small amount of code
|
||||
imported from other projects, and also some pre-July-2023 code that has not
|
||||
yet been relicensed under Apache-2.0, is covered by other compatible licenses
|
||||
-- see [THIRD-PARTY](THIRD-PARTY.md) file for details.
|
||||
OpenImageIO is distributed using the [modified BSD license](LICENSE.md)
|
||||
(also known as the "new BSD" or "3-clause BSD" license). The documentation
|
||||
is licensed under the [Creative Commons Attribution 3.0 Unported
|
||||
License](http://creativecommons.org/licenses/by/3.0/).
|
||||
|
||||
The plain English bottom line is that OpenImageIO is free, as well as
|
||||
freely modifiable and redistributable (in both source and binary form).
|
||||
@@ -114,7 +110,7 @@ Contact & reporting problems
|
||||
|
||||
Simple "how do I...", "I'm having trouble", or "is this a bug" questions are
|
||||
best asked on the [oiio-dev developer mail
|
||||
list](https://lists.aswf.io/g/oiio-dev).
|
||||
list](http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org).
|
||||
That's where the most people will see it and potentially be able to answer
|
||||
your question quickly (more so than a GH "issue").
|
||||
|
||||
@@ -131,7 +127,7 @@ security-related issues [security@openimageio.org](security@openimageio.org).
|
||||
Contributing
|
||||
------------
|
||||
|
||||
OpenImageIO welcomes code contributions, and [nearly 200 people](CREDITS.md)
|
||||
OpenImageIO welcomes code contributions, and [nearly 150 people](CREDITS.md)
|
||||
have done so over the years. We take code contributions via the usual GitHub
|
||||
pull request (PR) mechanism. Please see [CONTRIBUTING](CONTRIBUTING.md) for
|
||||
detailed instructions.
|
||||
@@ -140,15 +136,12 @@ detailed instructions.
|
||||
Web Resources
|
||||
-------------
|
||||
|
||||
* Main web page: http://www.openimageio.org
|
||||
Main web page: http://www.openimageio.org
|
||||
|
||||
* GitHub page: http://github.com/OpenImageIO/oiio
|
||||
GitHub page: http://github.com/OpenImageIO/oiio
|
||||
|
||||
* Developer mail list subscriptions and archives:
|
||||
https://lists.aswf.io/g/oiio-dev
|
||||
Mail list subscriptions and archives:
|
||||
|
||||
* ASWF Slack: https://slack.aswf.io
|
||||
(look for the `#openimageio` channel)
|
||||
* Developer mail list: http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
|
||||
|
||||
* Biweekly TSC meetings are on the ASWF Calendar: https://www.aswf.io/meeting-calendar/
|
||||
(click on the OpenImageIO meeting entries, every second Monday, to get the Zoom link, anyone may join)
|
||||
* Just release announcements: http://lists.openimageio.org/listinfo.cgi/oiio-announce-openimageio.org
|
||||
|
||||
-352
@@ -1,352 +0,0 @@
|
||||
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
|
||||
<!-- Copyright Contributors to the OpenImageIO Project. -->
|
||||
|
||||
# Release Procedures for OpenImageIO
|
||||
|
||||
## Version nomenclature and release cadence
|
||||
|
||||
### The meaning of the version parts
|
||||
|
||||
Our release numbers are of the form `MAJOR.MINOR.PATCH.TWEAK`, and we follow
|
||||
an almost-semantic-versioning scheme.
|
||||
|
||||
MAJOR changes are those that break backward-compatibility of the public APIs,
|
||||
requiring existing application code to change their source code where it calls
|
||||
OIIO API functions in order to compile and work correctly.
|
||||
|
||||
MINOR changes guarantee API backward-compatibility with prior releases that
|
||||
have the same major number, but can introduce ABI or link incompatibilities.
|
||||
Applications using OIIO need to be recompiled to move to a new minor release,
|
||||
but should not need to change their source code. Minor releases are allowed
|
||||
to drop support for sufficiently old compilers and dependencies.
|
||||
|
||||
PATCH changes guarantee both API and ABI/link backward-compatibility with
|
||||
prior releases that have the same minor number. Features and new public API
|
||||
calls may be added (thus deviating from strict semantic versioning), but only
|
||||
if they preserve ABI/link compatibility. This means that standalone functions
|
||||
or static methods may be added, but existing functions will not change their
|
||||
parameters, and no new virtual methods or struct data layouts change for patch
|
||||
releases (for classes in public header files). Application code can be
|
||||
re-linked to a new patch release without needing to be recompiled. We also
|
||||
guarantee that any compilers or dependencies supported for the first release
|
||||
of a minor series will continue to be supported for all patches to that minor
|
||||
series.
|
||||
|
||||
TWEAK changes are restricted to critical bug fixes or build breaks that do
|
||||
not alter public APIs in any way.
|
||||
|
||||
### Cadence of releases
|
||||
|
||||
Major (arbitrarily incompatible) releases happen rarely, usually with multiple
|
||||
years between them.
|
||||
|
||||
Minor (API backward-compatible) releases are scheduled annually, targeted at
|
||||
late summer (SIGGRAPH time) to be in beta, and early autumn for a full
|
||||
release.
|
||||
|
||||
Patch (API and ABI backward-compatible) releases are scheduled monthly,
|
||||
usually aiming for the first day of each month.
|
||||
|
||||
Tweak (fully forward and backward compatible) releases are not regularly
|
||||
scheduled, and only happen sporadically, when a critical fix is needed in
|
||||
between scheduled patch releases.
|
||||
|
||||
### Things are different in "master"
|
||||
|
||||
The "master" branch is where ongoing development occurs without any
|
||||
compatibility guarantees. We don't always know if the next year's release from
|
||||
master will turn out to be major (API breaking) or minor (only ABI breaking).
|
||||
|
||||
Some studios or products need the most up-to-date enhancements, and thus tend
|
||||
to build OIIO from the "master" branch rather than using tagged releases. For
|
||||
these users, we try to set version numbers and occasionally tag in master, to
|
||||
send a signal about which points in master seem safe to rely on various
|
||||
compatibility levels. However, the rules are slightly different than we use
|
||||
for releases.
|
||||
|
||||
In the "master" branch:
|
||||
|
||||
- TWEAK changes within "master" only guarantee ABI back-compatibility, but may
|
||||
have additions or non-bug-fix behavior changes (akin to patch releases
|
||||
within a release branch).
|
||||
- PATCH changes within "master" are allowed to break ABI or API (changes that
|
||||
would require minor or major releases, if they were not in "master").
|
||||
- Beware of unmarked breaks in compatibility of commits in master that are
|
||||
in between developer preview tags.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Branch and tag names
|
||||
|
||||
**Branches** are places where commits containing new development may be added
|
||||
(and thus the branch markers will move over time). Branch names obey the
|
||||
following conventions:
|
||||
|
||||
- `master` is the area for arbitrary changes intended for the next year's
|
||||
major or minor release.
|
||||
- `dev-1.2` are the areas for staging additions to the next month's patch
|
||||
release for the designated minor version series.
|
||||
- `release` is a special branch marker that is always set to the latest tag of
|
||||
the currently supported, stable release family. People can count on
|
||||
"release" always being the latest stable release, whatever that may be at
|
||||
the time.
|
||||
|
||||
**Tags** indicate releases or developer previews, and once a commit is
|
||||
tagged, it is permanent and will never be moved. Tag names obey the following
|
||||
conventions:
|
||||
|
||||
- `v1.2.3.4` is a specific public stable release, corresponding to official
|
||||
major, minor, public, or tweak releases.
|
||||
- `v1.2.3.4-alpha`, `v1.2.3.4-beta`, or `v1.2.3.4-RC1` are pre-releases for an
|
||||
upcoming public stable release, at the alpha, beta, or release candidate
|
||||
stages, respectively.
|
||||
- `v1.2.3.4-dev` is a "developer preview" within "master." It is not an official
|
||||
supported release, and while the numbering may indicate compatibility versus
|
||||
other recent developer previews, they should not be assumed to be compatible
|
||||
with any prior official stable releases.
|
||||
|
||||
*Very* occasionally, other branch or tag names (with custom suffixes or
|
||||
different naming schemes) may be used for special purposes by particular
|
||||
developers or users, but should not be considered reliable or permanent, and
|
||||
in general should be ignored by anyone who didn't make the tag or branch.
|
||||
|
||||
---
|
||||
|
||||
## Release Procedures
|
||||
|
||||
### Soft freeze for monthly tweak releases:
|
||||
|
||||
We freely backport *safe*, non-ABI-breaking changes by cherry-picking them
|
||||
from master to the supported branch continually throughout most of the month.
|
||||
|
||||
In the seven days before the new month, we do a "soft freeze" where only
|
||||
important bug fixes are backported. Hold on to any other patches you wish to
|
||||
backport until after the monthly patch release (i.e., save them for the next
|
||||
month's release so you never have a release that contains changes that are
|
||||
only a few days old, and therefore not as well tested). You may, of course,
|
||||
continue to backport fixes to documentation or other non-code parts of the
|
||||
project during this soft freeze.
|
||||
|
||||
### Branching for annual major/minor releases
|
||||
|
||||
By mid-June (about 1-2 months before the beta of a new annual big release),
|
||||
you should branch and mark it as an alpha.
|
||||
|
||||
At the tip of "master", create a new branch named `dev-MAJOR.MINOR` that will
|
||||
be the staging area for the next release.
|
||||
|
||||
Customarily, at that point we add a commit to master (but not to the new
|
||||
dev-MAJ.MIN branch) that bumps master's version to the next minor level, to
|
||||
avoid any confusion between builds from master versus what will be the next
|
||||
release branch. This starts the divergence between master and the release
|
||||
branch, and henceforth, any big or compatibility-breaking changes will only be
|
||||
committed to master and not backported to the release branch. (Though we are
|
||||
loose about this rule during the alpha period and allow continued breaking
|
||||
changes in the alpha, but by the time we call it beta, we allow no more
|
||||
breaking changes.) Also at this stage, the master branch's CHANGES.md should
|
||||
have a heading added at the top for the *next* version.
|
||||
|
||||
|
||||
### Prior to a release
|
||||
|
||||
1. Update CI dependencies: Ensure that the "latest" CI test specifies the
|
||||
current releases of the dependencies and compilers (check their home
|
||||
pages), and that the [INSTALL.md](../INSTALL.md) file correctly documents
|
||||
the version ranges that we expect to work and that we actively test.
|
||||
|
||||
2. Release notes: [CHANGES.md](../CHANGES.md) should be updated to reflect
|
||||
all the new features and fixes. Looking at the notes from older releases
|
||||
should provide a good example of what we're aiming for.
|
||||
|
||||
- Patch and tweak releases can be brief one-line descriptions (often the
|
||||
first line of the commit messages involved), presented in a single
|
||||
section in either chronological or any other order that seems right.
|
||||
- Minor or major releases have a much more extensive, prose-based
|
||||
description of all changes since the last minor release, broken into
|
||||
sections (dependency changes, major new features, enhancements and fixes,
|
||||
internals and developer goodies, testing/CI/ports, etc.) and ordered for
|
||||
readability and relevance.
|
||||
|
||||
3. Ensure docs are up to date:
|
||||
|
||||
- Actually read the [README.md](README.md), [INSTALL.md](INSTALL.md),
|
||||
and other repository docs and make sure all the information is up to
|
||||
date. Check the [CREDITS.md](CREDITS.md) against the recent repo history
|
||||
to be sure new contributors are listed.
|
||||
- Skim the primary user documentation to look for any obvious errors,
|
||||
especially the parts that describe new features.
|
||||
- If we are using any online docs (like readthedocs), make sure it is
|
||||
building and looks correct on the web site.
|
||||
|
||||
4. Make sure the the top-level CMakeLists.txt file is updated:
|
||||
|
||||
- The `OpenImageIO_VERSION` should be correct.
|
||||
- The `PROJECT_VERSION_RELEASE_TYPE` variable should be set to "alpha" or
|
||||
"beta" if appropriate, "RC" for release candidate, or empty string `""`
|
||||
for most supported releases, and "dev" only for the master branch or
|
||||
developer previews.
|
||||
- The `${PROJECT_NAME}_SUPPORTED_RELEASE` variable should be `ON` for any
|
||||
release branch, `OFF` for master.
|
||||
|
||||
5. In the https://github.com/OpenImageIO/oiio-images project, create a branch
|
||||
`RB-x.y` for the major/minor branch, and in the main oiio repo, update
|
||||
src/build-scripts/install_test_images.bash to specify `-b RB-x.y` in the
|
||||
checkout of oiio-images to ensure CI tests are against the set of test
|
||||
images corresponding to that major/minor release (just in the branch, not
|
||||
in master!).
|
||||
|
||||
6. Make sure everything passes the usual CI workflow. Also check the daily or
|
||||
weekly "analysis" workflows to make sure there aren't any important
|
||||
warnings that should be fixed.
|
||||
|
||||
|
||||
### Staging alpha / beta / release candidate (annual minor/major releases only)
|
||||
|
||||
For monthly patch releases, we don't have any formal alpha/beta/RC stages.
|
||||
|
||||
For the annual minor or major releases we have a staged release:
|
||||
|
||||
- `alpha` is everything after we have branched, in which we think all the big
|
||||
new features have been added, and while we will make continued changes and
|
||||
fixes, we are aiming for increased stability and to minimize additional
|
||||
breaking changes prior to the release.
|
||||
- `beta` should be about one month prior to the final release date. We create
|
||||
a tag `v1.2.3.4-beta` and announce the beta (see below "Making the
|
||||
release"). Once we tag a beta, we try very hard not to allow any further
|
||||
changes that change the API or are not ABI-compatible (i.e., safe fixes
|
||||
only).
|
||||
- `RC` or release candidates around one week prior to the final release date.
|
||||
This is a trial run, hopefully identical to the final release (except for
|
||||
removing the RC label and making a new tag). The only changes allowed after
|
||||
RC are fixes to the most critical bugs or build breaks that would be bad for
|
||||
users to encounter. If critical problems are found with RC1, they should be
|
||||
fixed and immediately re-tagged as RC2, etc. All other fixes should be
|
||||
postponed until the next month's patch release.
|
||||
|
||||
### Making the release
|
||||
|
||||
A final release is made on the scheduled date, provided the latest RC has
|
||||
survived for at least a few days of testing without finding any critical
|
||||
problems. Don't make the release final until you are sure there are no
|
||||
truly critical bugs or build breaks that users will encounter.
|
||||
|
||||
The following are the steps for making the release:
|
||||
|
||||
1. Edit the top-level CMakeLists.txt to remove any RC designation
|
||||
(i.e., `PROJECT_VERSION_RELEASE_TYPE` should be set to `""`).
|
||||
|
||||
2. Edit CHANGES.md to reflect the correct date of the release and ensure it
|
||||
includes any last-minute changes that were made during beta or release
|
||||
candidate stages.
|
||||
|
||||
3. Push it to **your** GitHub, make sure it passes CI.
|
||||
|
||||
4. Tag the release: `git tag v1.2.3.4` (no more beta, RC, or dev suffix).
|
||||
|
||||
5. If this will now be the recommended stable release, move the `release`
|
||||
branch marker to the same position.
|
||||
|
||||
6. Push it to GitHub: `git push OpenImageIO release --tags`
|
||||
|
||||
(This example assumes "OpenImageIO" is the name of the remote for the
|
||||
GitHub `OpenImageIO/oiio` repo.)
|
||||
|
||||
7. Draft a release on GitHub: On https://github.com/OpenImageIO/oiio/releases
|
||||
select "Draft a new release." Choose the new tag you just pushed. Make the
|
||||
release title "OpenImageIO v1.2.3.4" (and beta, etc., designation
|
||||
if applicable). In the description, paste the release notes for this
|
||||
release (from CHANGES.md). If this is a beta or release candidate, check
|
||||
"this is a pre-release" box at the bottom.
|
||||
|
||||
8. Announce the release on the [oiio-dev mail list](https://lists.aswf.io/g/oiio-dev)
|
||||
with the subject "Release: OpenImageIO v1.2.3.4" and using one of these
|
||||
templates for the body of the email.
|
||||
|
||||
For a monthly patch release:
|
||||
|
||||
> We have tagged v1.2.3.4 as the latest production release and moved the
|
||||
> "release" branch marker to that point. This is guaranteed to be API,
|
||||
> ABI, and link back-compatible with prior 1.2 releases. Release notes
|
||||
> are below.
|
||||
>
|
||||
> (Paste the full set of 1.2 changes here, just copy the appropriate
|
||||
> part of CHANGES.md)
|
||||
|
||||
For an annual major/minor release:
|
||||
|
||||
> OpenImageIO version 1.2 has been released! Officially tagged as
|
||||
> "v1.2.3.4", we have also moved the "release" branch tag to this
|
||||
> position. Henceforth, 1.2 is the supported production release family.
|
||||
> The API is now frozen -- we promise that subsequent 1.2.x releases
|
||||
> (which should happen monthly) will not break back-compatibility of API,
|
||||
> ABI, or linkage, compared to this release. Please note that this release
|
||||
> is *not* ABI or link compatible with 1.1 or older releases.
|
||||
>
|
||||
> Release notes for 1.2 outlining all the changes since last year's
|
||||
> release are below.
|
||||
>
|
||||
> Please note that a few of the build and runtime dependencies have
|
||||
> changed their minimum supported versions. (List here any important
|
||||
> changes to dependencies, compilers, or C++ standard that users should be
|
||||
> aware of.)
|
||||
>
|
||||
> (List here anything else that people should know about this release
|
||||
> family that may be surprising if they haven't followed the last year of
|
||||
> development closely, or that they must know even if they are too lazy to
|
||||
> read the release notes. If this is a major release that is not
|
||||
> backward-compatible with prior versions, warn about that here.)
|
||||
>
|
||||
> Enjoy, and please report any problems. We will continue to make patch
|
||||
> releases to the 1.2 family roughly monthly, which will contain bug fixes
|
||||
> and non-breaking enhancements.
|
||||
>
|
||||
> The older 1.1 series of releases is now considered obsolete. We will
|
||||
> continue for now to make 1.1 patch releases, but over time, these will
|
||||
> become less frequent and be reserved for only the most critical bug
|
||||
> fixes.
|
||||
>
|
||||
> The "master" branch is now progressing toward an eventual 1.3 release next
|
||||
> summer. As usual, you are welcome to use master for real work, but we do
|
||||
> not make any compatibility guarantees and don't guarantee continuing API
|
||||
> compatibility in master.
|
||||
>
|
||||
> (Paste the full set of 1.2 changes here, just copy the appropriate
|
||||
> part of CHANGES.md)
|
||||
|
||||
For a beta leading up to the annual major/minor release:
|
||||
|
||||
> OpenImageIO version 1.2 is now in beta, tagged as "v1.2.3.4-beta". We
|
||||
> will try very hard not to make any further API or ABI changes between
|
||||
> now and the final release (unless it is absolutely necessary to fix
|
||||
> an important problem identified during beta testing). The final 1.2
|
||||
> release is scheduled for [DATE GOES HERE], so please try building and
|
||||
> testing the beta so we are sure to find any problems.
|
||||
>
|
||||
> Release notes for 1.2 outlining all the changes since last year's
|
||||
> release are below.
|
||||
>
|
||||
> (Paste the full set of 1.2 changes here, just copy the appropriate
|
||||
> part of CHANGES.md)
|
||||
|
||||
|
||||
### After the release
|
||||
|
||||
Odds and ends to do after the tag is pushed and the announcements are sent:
|
||||
|
||||
- Re-read RELEASING.md and ensure that the instructions match what you
|
||||
have done. Update as necessary.
|
||||
|
||||
- Go to readthedocs.org, and ensure that the new release is built and visible
|
||||
and is the default release shown (specified in the Admin section). I tend to
|
||||
keep the latest patch of each minor release available for reference
|
||||
indefinitely, but hide the docs for earlier patch releases within that minor
|
||||
release series.
|
||||
|
||||
- Edit the top-level CMakeList.txt to update the version to the *next*
|
||||
anticipated release on the branch, in order to ensure that anybody building
|
||||
from subsequent patches won't get a release number that advertises itself
|
||||
incorrectly as a prior tagged release. Also edit CHANGES.md to add a new
|
||||
(blank) heading for the next patch or release.
|
||||
|
||||
|
||||
-151
@@ -1,151 +0,0 @@
|
||||
New code entering the OpenImageIO repository from July 1 2023 onward is
|
||||
subject to the [Apache 2.0 license](LICENSE.md).
|
||||
|
||||
Code dating from earlier than July 1 2023 was contributed under the [BSD
|
||||
3-clause license](LICENSE-BSD-3-Clause.md), unless relicensed below.
|
||||
|
||||
The following copyright holders agree that all of their contributions
|
||||
originally submitted to this project under the 3-Clause BSD License are hereby
|
||||
relicensed to the Apache License, Version 2.0, and are submitted pursuant to
|
||||
the Developer Certificate of Origin, version 1.1:
|
||||
|
||||
- Larry Gritz (@lgritz)
|
||||
- Chris Kulla (fpsunflower)
|
||||
- Brecht Van Lommel (brechtvl)
|
||||
- Daniel Flehner Heen (apetrynet)
|
||||
- Daniel Wyatt (dewyatt)
|
||||
- Aras Pranckevičius (aras-p)
|
||||
- Leszek Godlewski (inequation)
|
||||
- Dalai Felinto (dfelinto)
|
||||
- Jesse Yurkovich (jessey-git)
|
||||
- Sergey Sharybin (sergeyvfx)
|
||||
- Ray Molenkamp (LazyDodo)
|
||||
- Nathan Rusch (nrusch)
|
||||
- Ismael Cortes (leamsi)
|
||||
- AdamMainsTL
|
||||
- Sony Pictures Imageworks (cmstein, olegul, fpsunflower, brianhall77, jeremyselan, drg, richardssam, lecocqp)
|
||||
- Richard Shaw (hobbes1069)
|
||||
- Robert Matusewicz
|
||||
- Mariusz Szczepańczyk (mszczepanczyk)
|
||||
- Scott Wilson
|
||||
- Kevin Brightwell (Nava2)
|
||||
- Simon Boorer
|
||||
- Alex Hughes (Ahuge)
|
||||
- Alister Chowdhury
|
||||
- Manuel Leonhardt (skycaptain)
|
||||
- Alexandre Gauthier (MrKepzie)
|
||||
- Mark Boorer (shootfast)
|
||||
- Povilas Kanapickas (p12tic)
|
||||
- Mikael Sundell
|
||||
- Roman Zulak (marsupial)
|
||||
- Autodesk (includes Thiago Ize, Elvic Liang, Wayne Arnold, William Krick, Brecht Van Lommel, Marcos Fajardo)
|
||||
- Thiago Ize
|
||||
- Nick Black (dankamongmen)
|
||||
- Michel Lerenard (micler)
|
||||
- Stefan Bruens (StefanBruens)
|
||||
- David Gordon
|
||||
- Claire Foster (c42f)
|
||||
- Konrad Kleine (kwk)
|
||||
- Simone Gasparini (simogasp)
|
||||
- Radu Arjocu (ra-mt)
|
||||
- Dominik Bartkiewicz (fafik23)
|
||||
- 360highdynamicrangehdr (?)
|
||||
- Leonid Onokhov (sopvop)
|
||||
- Nuno Cardoso (npcardoso)
|
||||
- Todica Ionut (360highdynamicrangehdr)
|
||||
- Till Dechent (ttddee)
|
||||
- Tom Knowles (knowlsie)
|
||||
- SRHMorris
|
||||
- Biswapriyo Nath (Biswa96)
|
||||
- Edoardo Dominici (dedoardo)
|
||||
- Frédéric Devernay (devernay)
|
||||
- Simone Gasparini (simogasp)
|
||||
- roelandschoukens
|
||||
- Nayden Dochev (nayyden)
|
||||
- Yann Lanthony (yann-lty)
|
||||
- Benjamin Buch (bebuch)
|
||||
- Joris Nijs (joris-nijs)
|
||||
- Jan Honsbrok (Latios96)
|
||||
- Matteo F. Vescovi (mfvescovi)
|
||||
- Patrick Northon (patlefort)
|
||||
- Eric Mehl (ericmehl)
|
||||
- Xo Wang (GHF)
|
||||
- etiam
|
||||
- Fabien Servant (servantftechnicolor)
|
||||
- Loïc Vital (mugulmd)
|
||||
- Thomas Mansencal (Wētā FX)
|
||||
- Brent Davis (btdavis)
|
||||
- pwm1234-sri
|
||||
- toxieainc
|
||||
- demoulinv
|
||||
- Julien Enche (jenche)
|
||||
- Justin Israel
|
||||
- xiaoxiaoafeifei
|
||||
- Brad Smith (brad0)
|
||||
- lmarz
|
||||
- Seifeddine Dridi (seifeddinedridi)
|
||||
- Daniel Dresser (danieldresser)
|
||||
- Luc Bournaud (DevilishSpirits)
|
||||
- Dennis Schridde (devurandom)
|
||||
- Dieter De Baets (debaetsd)
|
||||
- Gonzalo Garramuño (ggarra13)
|
||||
- Alan Jones (@skyphyr)
|
||||
- pumkinpal
|
||||
- Christopher Crosetto (ccrosetto)
|
||||
- Russell Greene (russelltg)
|
||||
- Sam Richards (richardssam)
|
||||
- Guillaume Chatelet (gchatelet)
|
||||
- extrowerk
|
||||
- Heiko Becker (heirecka)
|
||||
- Mark Visser (mjmvisser)
|
||||
- Harry Mallon (hjmallon)
|
||||
- Henri Fousse (darkhorse64)
|
||||
- Krzysztof Blicharski (blicharski)
|
||||
- Hugh Macdonald (HughMacdonald)
|
||||
- Pascal Lecocq (lecocqp)
|
||||
- Ramon Montoya Vozmediano (rmv)
|
||||
- Dan Wexler (danwexler)
|
||||
- Jérôme Duval (korli)
|
||||
- Tim Grant (timgrant)
|
||||
- Shane Ambler (sambler)
|
||||
- Wētā
|
||||
- Kimball Thurston (kdt3rd)
|
||||
- Anders Langlands (anderslanglands)
|
||||
- Алексей (Alexpux)
|
||||
- Fabien Castan (fabiencastan)
|
||||
- Grégoire De Lillo (gregoire-dl)
|
||||
- Edgar Velázquez-Armendáriz (edgarv)
|
||||
- Malcolm Humphreys (malcolmhumphreys)
|
||||
- johnfea
|
||||
- Max Liani (maxliani)
|
||||
- Michael Görner (v4hn)
|
||||
|
||||
**Prior authors, please submit a PR against this file that adds your name
|
||||
above. If, at the time of your prior contributions, you were employed by a
|
||||
company who would have owned your IP output, then please have someone from
|
||||
that company who is authorized to do so submit a PR to add their company’s
|
||||
name to the list under the statement in this file.**
|
||||
|
||||
|
||||
---
|
||||
|
||||
Here are the instructions we have been given by the Linux Foundation for how
|
||||
to document the contents of each file:
|
||||
|
||||
a. Files that consist of only contributions made entirely by companies that
|
||||
have submitted PRs as described above can have, once those PRs are merged,
|
||||
the BSD-3-Clause license information replaced with Apache-2.0 license
|
||||
information.
|
||||
|
||||
b. Files that contain contributions made after the change to the Apache-2.0
|
||||
license as the license for the project should include only the Apache-2.0
|
||||
license information.
|
||||
|
||||
c. Files that contain contributions made both before the Apache-2.0 license
|
||||
change and after the Apache-2.0 license change should include both
|
||||
BSD-3-Clause and Apache-2.0 license information. The SPDX identifier for
|
||||
these files is “BSD-3-Clause and Apache-2.0”.
|
||||
|
||||
d. Files that contain only contributions made prior to the Apache-2.0 license
|
||||
change should continue to include BSD-3-Clause license information (e.g.,
|
||||
no changes to BSD-3-Clause information included in those files).
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
This gives guidance about which branches are supported with patches to
|
||||
security vulnerabilities.
|
||||
|
||||
| Version / branch | Supported |
|
||||
| ----------------- | ---------------------------------------------------- |
|
||||
| master | :white_check_mark: :construction: ALL fixes immediately, but this is a branch under development with a frequently unstable ABI and occasionally unstable API. |
|
||||
| 2.4.x | :white_check_mark: All fixes that can be backported without breaking ABI compatibility. New tagged releases monthly. |
|
||||
| 2.3.x | :x: Only receives occasional critical fixes, upon request. |
|
||||
| <= 2.2.x | :x: No longer receiving patches of any kind. |
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you think you've found a potential vulnerability in OpenImageIO, please
|
||||
report it by emailing security@openimageio.org. Only the project administrators
|
||||
have access to these messages. Include detailed steps to reproduce the issue,
|
||||
and any other information that could aid an investigation. Our policy is to
|
||||
respond to vulnerability reports within 14 days.
|
||||
|
||||
Our policy is to address critical security vulnerabilities rapidly and post
|
||||
patches as quickly as possible.
|
||||
+6
-17
@@ -1,5 +1,5 @@
|
||||
See [LICENSE.md](LICENSE.md) for the main open source license of original
|
||||
code written for the OpenImageIO project, which is the Apache-2.0 license.
|
||||
code written for the OpenImageIO project.
|
||||
|
||||
The remainder of this file reproduces the open source licensing details
|
||||
of other projects that have been imported, incorporated into, or derived
|
||||
@@ -12,13 +12,6 @@ In no particular order:
|
||||
BSD 3-Clause License
|
||||
SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
* OpenImageIO prior to July 1, 2023
|
||||
|
||||
Code that was contributed to OpenImageIO prior to July 1 2023, and has not
|
||||
yet been [relicensed](RELICENSING.md), was contributed under the [BSD
|
||||
3-clause license](LICENSE-BSD.md). Currently, this is less than 2% of the
|
||||
codebase (by lines of code).
|
||||
|
||||
* Gelato, Copyright (c) 2004 by NVIDIA Corp.
|
||||
|
||||
The initial (version 0.1) code found in imageio.h, fmath.h, filter.h,
|
||||
@@ -41,11 +34,6 @@ SPDX-License-Identifier: BSD-3-Clause
|
||||
The sample OpenColorIO configurations in our testsuite are borrowed from
|
||||
this ASWF project, also BSD-3-Clause licensed.
|
||||
|
||||
* OpenEXR/Imath (c) Copyright contributors to the OpenEXR Project.
|
||||
https://github.com/AcademySoftwareFoundation/Imath
|
||||
|
||||
Some templates in vecparam.h were first developed for Imath.
|
||||
|
||||
* DPX reader/writer (c) Copyright 2009 Patrick A. Palmer.
|
||||
https://github.com/patrickpalmer/dpx
|
||||
|
||||
@@ -121,6 +109,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
MIT License
|
||||
SPDX-License-Identifier: MIT
|
||||
|
||||
* Squish
|
||||
Copyright 2006 Simon Brown si@sjbrown.co.uk
|
||||
http://sjbrown.co.uk/?code=squish
|
||||
|
||||
* PugiXML http://pugixml.org/ https://github.com/zeux/pugixml
|
||||
Copyright (c) 2006-2018 Arseny Kapoulkine
|
||||
|
||||
@@ -257,9 +249,6 @@ SPDX-License-Identifier: Unlicense
|
||||
* gif.h by Charlie Tangora. Public domain / Unlicense.
|
||||
https://github.com/ginsweater/gif-h
|
||||
|
||||
* bcdec.h by Sergii "iOrange" Kudlai. MIT or Unlicense.
|
||||
https://github.com/iOrange/bcdec
|
||||
|
||||
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
@@ -293,7 +282,7 @@ Public domain
|
||||
* lookup3 code by Bob Jenkins, Public Domain.
|
||||
http://burtleburtle.net/bob/c/lookup3.c
|
||||
|
||||
* The SHA-1 implementation we use is public domain by Dominik Reichl.
|
||||
* The SHA-1 implemenation we use is public domain by Dominik Reichl.
|
||||
http://www.dominik-reichl.de
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
@@ -18,11 +18,13 @@ tbb/2020.0
|
||||
# pybind11/2.4.3 - conan doesn't have this minimum version
|
||||
# dcmtk
|
||||
# ffmpeg
|
||||
# field3d
|
||||
# libheif
|
||||
# libraw
|
||||
# openvdb
|
||||
# ptex
|
||||
# qt5
|
||||
# libsquish
|
||||
|
||||
|
||||
[generators]
|
||||
|
||||
+280
-50
@@ -3,18 +3,48 @@ ifneq (${VERBOSE},)
|
||||
$(info Including spi/Makefile-bits)
|
||||
endif
|
||||
|
||||
# For SpComp2 builds, do:
|
||||
#
|
||||
# make OIIO_SPCOMP2=1 spcomp2_install
|
||||
# or
|
||||
# make OIIO_SPCOMP2=1 SPCOMP2_LOCAL_PATH=/test/path spcomp2_install_local
|
||||
#
|
||||
# For Arnold builds, do:
|
||||
#
|
||||
# make OIIO_ARNOLD=1
|
||||
#
|
||||
# For a Rez-bound build, do:
|
||||
#
|
||||
# make OIIO_SPIREZ=1 spi
|
||||
#
|
||||
# (Options: OIIO_REZ_NAME=blah REZ_PACKAGE_ROOT=path)
|
||||
#
|
||||
# Otherwise a default 'make' will make a fully generic OIIO build.
|
||||
|
||||
OIIO_SPCOMP2 ?= 0
|
||||
OIIO_ARNOLD ?= 0
|
||||
OIIO_SPIREZ ?= 0
|
||||
OIIO_REZ_NAME ?= OpenImageIO
|
||||
OIIO_VERS = $(shell grep "OpenImageIO VERSION" CMakeLists.txt | egrep -o "[0-9.]+")
|
||||
ONEVERS = $(shell site/spi/format_version.py ${OIIO_VERS})
|
||||
OPENIMAGEIO_SPCOMP2_VERSION ?= ${ONEVERS}
|
||||
|
||||
ifeq (${OIIO_ARNOLD},1)
|
||||
ifeq (${OIIO_SPCOMP2},1)
|
||||
$(info Building for SpComp2)
|
||||
OIIO_ARNOLD := 0
|
||||
NAMESPACE ?= 'OpenImageIO_SpComp2'
|
||||
SOVERSION ?= ${OPENIMAGEIO_SPCOMP2_VERSION}
|
||||
PYLIB_LIB_PREFIX ?= 1
|
||||
PYLIB_INCLUDE_SONAME ?= 1
|
||||
else ifeq (${OIIO_ARNOLD},1)
|
||||
$(info Building for Arnold)
|
||||
NAMESPACE ?= 'OpenImageIO_Arnold'
|
||||
else ifeq (${OIIO_SPIREZ},1)
|
||||
$(info Building for Rez distribution)
|
||||
# NAMESPACE ?= 'OpenImageIO'
|
||||
MY_CMAKE_FLAGS += -DOIIO_SPIREZ=1 -DOIIO_REZ_PACKAGE_NAME=${OIIO_REZ_NAME}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_DEBUG_POSTFIX=_d
|
||||
else
|
||||
$(info Building generic OpenImageIO)
|
||||
# NAMESPACE ?= 'OpenImageIO'
|
||||
endif
|
||||
@@ -27,29 +57,36 @@ ifeq (${SP_OS}, rhel7)
|
||||
# Rhel7 (current)
|
||||
platform := rhel7
|
||||
SPI_COMPILER_PLATFORM ?= gcc-6.3
|
||||
ifeq (${SPI_COMPILER_PLATFORM},gcc-6.3)
|
||||
ifeq (${SPI_COMPILER_PLATFORM},gcc-4.8)
|
||||
SPCOMP2_COMPILER ?= gcc48m64
|
||||
CMAKE_CXX_STANDARD ?= 11
|
||||
LLVM_VERSION ?= 9.0.1-1
|
||||
else
|
||||
SPCOMP2_COMPILER ?= gcc63
|
||||
CMAKE_CXX_STANDARD ?= 14
|
||||
LLVM_VERSION ?= 12.0.1
|
||||
LLVM_VERSION ?= 10.0.0-1
|
||||
endif
|
||||
SP_PLATFORM ?= linux
|
||||
SP_PROC ?= x86_64
|
||||
SP_REZ_OS ?= CentOS-7
|
||||
else ifeq (${platform}, macosx)
|
||||
# Generic OSX machines (including LG's laptop)
|
||||
COMPILER ?= clang
|
||||
SPCOMP2_COMPILER ?= clang
|
||||
CMAKE_CXX_STANDARD ?= 14
|
||||
SP_OS ?= macosx
|
||||
SP_PLATFORM ?= macosx
|
||||
SP_PROC ?= x86_64
|
||||
SP_REZ_OS ?= MacOS
|
||||
else
|
||||
$(error Unknown SP_OS=${SP_OS} platform=${platform})
|
||||
endif # endif ${SP_OS}
|
||||
|
||||
MY_CMAKE_FLAGS += -DSP_OS=${SP_OS} -DSP_PLATFORM=${SP_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DSP_PROC=${SP_PROC} -DSP_REZ_OS=${SP_REZ_OS}
|
||||
MY_CMAKE_FLAGS += -DSPI_COMPILER_PLATFORM=${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DEXTRA_CPP_ARGS:STRING="-DOIIO_SPI=1" -DOIIO_SITE:STRING=spi
|
||||
MY_CMAKE_FLAGS += -DSPI_TESTS=1 -DPROJECT_VERSION_RELEASE_TYPE=spi
|
||||
MY_CMAKE_FLAGS += -DSPI_TESTS=1
|
||||
MY_CMAKE_FLAGS += -DOIIO_NAMESPACE_INCLUDE_PATCH=1
|
||||
MY_CMAKE_FLAGS += -DCMAKE_DEBUG_POSTFIX=${CMAKE_DEBUG_POSTFIX:-_d}
|
||||
REZ_PACKAGE_ROOT ?= /shots/spi/home/software/packages
|
||||
SPCOMP2_ROOT ?= /shots/spi/home/lib/SpComp2
|
||||
|
||||
@@ -69,6 +106,8 @@ ifeq (${SP_OS}, rhel7)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_INSTALL_LIBDIR="${INSTALL_PREFIX}/lib"
|
||||
ifeq (${OIIO_SPCOMP2},1)
|
||||
MY_CMAKE_FLAGS += -DPYTHON_SITE_DIR="${INSTALL_PREFIX}/python"
|
||||
else ifeq (${OIIO_SPIREZ},1)
|
||||
MY_CMAKE_FLAGS += -DPYTHON_SITE_DIR="${INSTALL_PREFIX}/python"
|
||||
else ifeq (${OIIO_ARNOLD},1)
|
||||
OIIO_LIBNAME_SUFFIX=_Arnold
|
||||
endif
|
||||
@@ -78,15 +117,21 @@ ifeq (${SP_OS}, rhel7)
|
||||
#
|
||||
# A variety of tags can be used to try specific versions of gcc or
|
||||
# clang from the site-specific places we have installed them.
|
||||
LLVM_DIRECTORY ?= ${REZ_PACKAGE_ROOT}/llvm/${LLVM_VERSION}/${SPI_COMPILER_PLATFORM}
|
||||
ifeq (${COMPILER},clang9)
|
||||
LLVM_DIRECTORY := ${REZ_PACKAGE_ROOT}/llvm/9.0.1-1/${SPI_COMPILER_PLATFORM}
|
||||
LLVM_DIRECTORY ?= /shots/spi/home/software/packages/llvm/${LLVM_VERSION}/${SPI_COMPILER_PLATFORM}
|
||||
ifeq (${COMPILER},clang7)
|
||||
LLVM_DIRECTORY := /shots/spi/home/lib/arnold/rhel7/llvm_7.0.1
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang -DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang8)
|
||||
LLVM_DIRECTORY := /shots/spi/home/lib/arnold/rhel7/llvm_8.0.0
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang -DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang9)
|
||||
LLVM_DIRECTORY := /shots/spi/home/software/packages/llvm/9.0.1-1/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang -DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang10)
|
||||
LLVM_DIRECTORY := ${REZ_PACKAGE_ROOT}/llvm/10.0.0-1/${SPI_COMPILER_PLATFORM}
|
||||
LLVM_DIRECTORY := /shots/spi/home/software/packages/llvm/10.0.0-1/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang -DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang11)
|
||||
LLVM_DIRECTORY := ${REZ_PACKAGE_ROOT}/llvm/11.0.0/${SPI_COMPILER_PLATFORM}
|
||||
LLVM_DIRECTORY := /shots/spi/home/software/packages/llvm/11.0.0/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang -DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
else ifeq (${COMPILER},clang)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
@@ -102,16 +147,43 @@ ifeq (${SP_OS}, rhel7)
|
||||
-DCMAKE_C_COMPILER=${LLVM_DIRECTORY}/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=${LLVM_DIRECTORY}/bin/clang++
|
||||
endif
|
||||
ifeq (${SPI_COMPILER_PLATFORM},gcc-4.8)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_FLAGS="--gcc-toolchain=/usr" \
|
||||
-DCMAKE_CXX_FLAGS="--gcc-toolchain=/usr" \
|
||||
-DTOOLCHAIN_FLAGS="--gcc-toolchain=/usr"
|
||||
endif
|
||||
|
||||
#
|
||||
# Boost
|
||||
#
|
||||
BOOSTVERS ?= 1.70
|
||||
SPBOOST_INC_DIR := /usr/include/boostroot/boost${BOOSTVERS}.0
|
||||
SPBOOST_LIB_DIR := /usr/lib64/boostroot/boost${BOOSTVERS}.0
|
||||
MY_CMAKE_FLAGS += \
|
||||
BOOSTSPSUFFIX ?=
|
||||
BOOSTVERSSP=${BOOSTVERS}${BOOSTSPSUFFIX}
|
||||
MY_CMAKE_FLAGS += -DBOOST_VERS_SP=${BOOSTVERSSP}
|
||||
# $(info BOOSTVERSSP ${BOOSTVERSSP})
|
||||
ifeq (${BOOSTVERS},1.55)
|
||||
SPBOOST_INC_DIR ?= /usr/include/boost_${BOOSTVERSSP}
|
||||
SPBOOST_LIB_DIR ?= /usr/lib64/boost_${BOOSTVERSSP}
|
||||
ifeq (${BOOSTSPSUFFIX}, sp)
|
||||
SPBOOST_LIBNAMESTART ?= lib${BOOSTSPSUFFIX}boost_${shell echo ${BOOSTVERS} | sed "s/\\./_/"}_0
|
||||
else
|
||||
SPBOOST_LIBNAMESTART ?= lib${BOOSTSPSUFFIX}boost
|
||||
endif
|
||||
SPBOOST_LIBNAMEEND ?= -gcc48-mt-${shell echo ${BOOSTVERS} | sed "s/\\./_/"}
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DBOOST_CUSTOM=1 \
|
||||
-DBoost_VERSION=${BOOSTVERS} \
|
||||
-DBoost_INCLUDE_DIRS=${SPBOOST_INC_DIR} \
|
||||
-DBoost_LIBRARY_DIRS=${SPBOOST_LIB_DIR} \
|
||||
-DBoost_LIBRARIES:STRING="${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_filesystem${SPBOOST_LIBNAMEEND}.so;${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_regex${SPBOOST_LIBNAMEEND}.so;${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_system${SPBOOST_LIBNAMEEND}.so;${SPBOOST_LIB_DIR}/${SPBOOST_LIBNAMESTART}_thread${SPBOOST_LIBNAMEEND}.so"
|
||||
else
|
||||
# Our Boost >= 1.61 setup is MUCH simpler and more standard
|
||||
SPBOOST_INC_DIR := /usr/include/boostroot/boost${BOOSTVERSSP}.0
|
||||
SPBOOST_LIB_DIR := /usr/lib64/boostroot/boost${BOOSTVERSSP}.0
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DBOOST_INCLUDEDIR=${SPBOOST_INC_DIR} \
|
||||
-DBOOST_LIBRARYDIR=${SPBOOST_LIB_DIR}
|
||||
endif
|
||||
|
||||
#
|
||||
# Python
|
||||
@@ -119,7 +191,18 @@ ifeq (${SP_OS}, rhel7)
|
||||
PYTHON_INCLUDE_DIR ?= /usr/include/python${PYTHON_VERSION}
|
||||
PYTHON_LIBRARY_DIR ?= /usr/lib64
|
||||
PYTHON_LIBRARY ?= ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}.so
|
||||
ifeq (${PYTHON_VERSION},3.7)
|
||||
ifeq (${PYTHON_VERSION},3.6)
|
||||
# Special sauce for Python 3.6
|
||||
PYTHON_INCLUDE_DIR := /usr/include/python${PYTHON_VERSION}m
|
||||
PYTHON_LIBRARY := ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}m.so
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DPYTHONINTERP_FOUND=1 \
|
||||
-DPYTHON_VERSION_STRING=3.6.3 \
|
||||
-DPYTHON_VERSION_MAJOR=3 \
|
||||
-DPYTHON_VERSION_MINOR=6 \
|
||||
-DPYTHON_VERSION_PATCH=3 \
|
||||
-DPython_ADDITIONAL_VERSIONS="${PYTHON_VERSION}"
|
||||
else ifeq (${PYTHON_VERSION},3.7)
|
||||
# Special sauce for Python 3.7
|
||||
PYTHON_INCLUDE_DIR := /usr/include/python${PYTHON_VERSION}m
|
||||
PYTHON_LIBRARY := ${PYTHON_LIBRARY_DIR}/libpython${PYTHON_VERSION}m.so
|
||||
@@ -145,30 +228,42 @@ ifeq (${SP_OS}, rhel7)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DPYTHON_INCLUDE_DIR:STRING=${PYTHON_INCLUDE_DIR} \
|
||||
-DPYTHON_LIBRARY:STRING=${PYTHON_LIBRARY} \
|
||||
-Dpybind11_ROOT:STRING=${REZ_PACKAGE_ROOT}/pybind11/2.6.2/python-${PYTHON_VERSION}
|
||||
-Dpybind11_ROOT:STRING=${REZ_PACKAGE_ROOT}/pybind11/2.4.3/python-${PYTHON_VERSION}
|
||||
|
||||
# Set our preferred OpenEXR path, but allow env variable to override
|
||||
# with custom/test version.
|
||||
OPENEXR_VERSION ?= 2.4.3
|
||||
OpenEXR_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenEXR/${OPENEXR_VERSION}/${SPI_COMPILER_PLATFORM}
|
||||
OPENEXR_VERSION ?= 2.4.0
|
||||
OpenEXR_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenEXR/${OPENEXR_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}
|
||||
MY_CMAKE_FLAGS += -DOpenEXR_ROOT=${OpenEXR_ROOT}
|
||||
|
||||
#
|
||||
# SpComp2 and other weird SPI-installed packages
|
||||
#
|
||||
NUKE_VERSION ?= 11.2v3
|
||||
SPCOMP2_FULLBOOST_SUFFIX = ${SP_OS}-${SPCOMP2_COMPILER}-boost${shell echo ${BOOSTVERS} | sed "s/\\.//"}
|
||||
SPCOMP2_FULLBOOST_SUFFIX = ${SP_OS}-${SPCOMP2_COMPILER}-boost${shell echo ${BOOSTVERSSP} | sed "s/\\.//"}
|
||||
# $(info SPCOMP2_FULLBOOST_SUFFIX ${SPCOMP2_FULLBOOST_SUFFIX})
|
||||
OPENCOLORIO_VERSION ?= 2.1.0
|
||||
OpenColorIO_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenColorIO/${OPENCOLORIO_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}
|
||||
#MY_CMAKE_FLAGS += -DOPENCOLORIO_LIBRARY=${OpenColorIO_ROOT}/lib/libOpenColorIO_SPI.so
|
||||
OPENVDB_VERSION ?= 8.0.0-2
|
||||
OpenVDB_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenVDB/${OPENVDB_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERS}
|
||||
ifeq (${OIIO_SPCOMP2},1)
|
||||
OCIO_SPCOMP_VERSION ?= 2
|
||||
OpenColorIO_ROOT ?= ${SPCOMP2_ROOT}/OpenColorIO/${SP_OS}-${SPCOMP2_COMPILER}/v${OCIO_SPCOMP_VERSION}
|
||||
# OPENVDB_SPCOMP2_VERSION ?= v6020001
|
||||
# OpenVDB_ROOT ?= ${SPCOMP2_ROOT}/openvdb/${SPCOMP2_FULLBOOST_SUFFIX}/${OPENVDB_SPCOMP2_VERSION}
|
||||
OPENVDB_VERSION ?= 6.2.2-3
|
||||
OpenVDB_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenVDB/${OPENVDB_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERS}
|
||||
else
|
||||
OPENCOLORIO_VERSION ?= 1.1.1-1
|
||||
OpenColorIO_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenColorIO/${OPENCOLORIO_VERSION}/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DOPENCOLORIO_LIBRARY=${OpenColorIO_ROOT}/lib/libOpenColorIO_SPI.so
|
||||
# Anybody remember why we needed Field3d disabled for SpComp2?
|
||||
Field3D_ROOT ?= ${SPCOMP2_ROOT}/Field3D/${SPCOMP2_FULLBOOST_SUFFIX}/v412
|
||||
OPENVDB_VERSION ?= 6.2.2-3
|
||||
OpenVDB_ROOT ?= ${REZ_PACKAGE_ROOT}/OpenVDB/${OPENVDB_VERSION}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERS}
|
||||
endif
|
||||
TBB_ROOT ?= /net/apps/rhel7/intel/tbb
|
||||
TBB_LIBRARY ?= /net/apps/rhel7/intel/tbb/lib/intel64/gcc4.7
|
||||
Libheif_ROOT ?= /shots/spi/home/lib/arnold/rhel7/libheif-1.3.2
|
||||
Libheif_ROOT=/shots/spi/home/lib/arnold/rhel7/libheif-1.3.2
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DOpenColorIO_ROOT=${OpenColorIO_ROOT} \
|
||||
-DField3D_ROOT=${Field3D_ROOT} \
|
||||
-DOpenVDB_ROOT=${OpenVDB_ROOT} \
|
||||
-DTBB_ROOT=${TBB_ROOT} \
|
||||
-DTBB_LIBRARY=${TBB_LIBRARY} \
|
||||
@@ -177,17 +272,21 @@ ifeq (${SP_OS}, rhel7)
|
||||
-DHDF5_LIBRARIES=/usr/lib64/libhdf5.so \
|
||||
-DNuke_ROOT=/net/apps/rhel7/foundry/nuke${NUKE_VERSION} \
|
||||
-DLibheif_ROOT=${Libheif_ROOT} \
|
||||
-DFFMPEG_INCLUDES=/usr/include/ffmpegroot/ffmpeg42 \
|
||||
-DFFMPEG_LIBRARIES="/usr/lib64/ffmpegroot/ffmpeg424/libavcodec.so;/usr/lib64/ffmpegroot/ffmpeg424/libavformat.so;/usr/lib64/ffmpegroot/ffmpeg424/libavutil.so;/usr/lib64/ffmpegroot/ffmpeg424/libswscale.so;" \
|
||||
-DFFMPEG_INCLUDES=/usr/include/ffmpegroot/ffmpeg34 \
|
||||
-DFFMPEG_LIBRARIES="/usr/lib64/ffmpegroot/ffmpeg345/libavcodec.so;/usr/lib64/ffmpegroot/ffmpeg345/libavformat.so;/usr/lib64/ffmpegroot/ffmpeg345/libavutil.so;/usr/lib64/ffmpegroot/ffmpeg345/libswscale.so;" \
|
||||
-DUSE_OPENCV=0 \
|
||||
-DVISIBILITY_MAP_FILE:STRING="${working_dir}/site/spi/hidesymbols.map"
|
||||
|
||||
# LibRaw
|
||||
LibRaw_ROOT ?= ${REZ_PACKAGE_ROOT}/LibRaw/0.21.0.0/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DLibRaw_ROOT=${LibRaw_ROOT}
|
||||
LIBRAW_LIBDIR = ${LibRaw_ROOT}/lib
|
||||
|
||||
MY_CMAKE_FLAGS += -DWebP_ROOT=${REZ_PACKAGE_ROOT}/webp/1.2.1/${SPI_COMPILER_PLATFORM}
|
||||
ifeq (${SPI_COMPILER_PLATFORM},gcc-4.8)
|
||||
MY_CMAKE_FLAGS += -DLIBRAW_INCLUDEDIR_HINT=/usr/include/libraw-0.18.11
|
||||
MY_CMAKE_FLAGS += -DLIBRAW_LIBDIR_HINT=/usr/lib64/libraw-0.18.11
|
||||
LIBRAW_LIBDIR = /usr/lib64/libraw-0.18.11
|
||||
else
|
||||
LibRaw_ROOT ?= /shots/spi/home/software/packages/LibRaw/0.20.0-dev3/${SPI_COMPILER_PLATFORM}
|
||||
MY_CMAKE_FLAGS += -DLibRaw_ROOT=${LibRaw_ROOT}
|
||||
LIBRAW_LIBDIR = ${LibRaw_ROOT}/lib
|
||||
endif
|
||||
|
||||
# Use libtiff I built myself, static, and try to hide its symbols.
|
||||
MY_CMAKE_FLAGS += \
|
||||
@@ -202,14 +301,26 @@ else ifeq (${platform}, macosx)
|
||||
USE_SIMD ?= sse4.2
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_BUILD_WITH_INSTALL_RPATH=1 \
|
||||
-DCMAKE_INSTALL_NAME_DIR="${working_dir}/dist/lib"
|
||||
-DCMAKE_INSTALL_NAME_DIR="${working_dir}/dist/${platform}${variant}/lib"
|
||||
|
||||
# A variety of tags can be used to try specific versions of gcc or
|
||||
# clang from the site-specific places we have installed them.
|
||||
ifeq (${COMPILER}, gcc6)
|
||||
ifeq (${COMPILER}, gcc48)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc5)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc6)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc8)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc9)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9
|
||||
@@ -218,22 +329,18 @@ else ifeq (${platform}, macosx)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER}, gcc11)
|
||||
MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
|
||||
USE_LIBCPLUSPLUS := 0
|
||||
else ifeq (${COMPILER},clang13)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@13/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@13/bin/clang++
|
||||
else ifeq (${COMPILER},clang14)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@14/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@14/bin/clang++
|
||||
else ifeq (${COMPILER},clang15)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@15/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++
|
||||
else ifeq (${COMPILER},clang16)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@16/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@16/bin/clang++
|
||||
else ifeq (${COMPILER},clang7)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@7/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/llvm@7/bin/clang++
|
||||
else ifeq (${COMPILER},clang8)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@8/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@8/bin/clang++
|
||||
else ifeq (${COMPILER},clang9)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@9/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@9/bin/clang++
|
||||
else ifeq (${COMPILER},clang10)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
|
||||
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++
|
||||
else ifeq (${COMPILER},clang)
|
||||
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
else ifeq (${COMPILER},gcc)
|
||||
@@ -253,7 +360,130 @@ endif # endif ${SP_OS}
|
||||
|
||||
|
||||
|
||||
ifeq (${OIIO_SPIREZ},1)
|
||||
# Rpath touch-ups
|
||||
# NOTE: This MUST match the order and naming of the Rez variants
|
||||
# set in rez/package.py.in
|
||||
REZ_INSTALL_PATH := ${REZ_PACKAGE_ROOT}/${OIIO_REZ_NAME}/${OIIO_VERS}/${SPI_COMPILER_PLATFORM}/python-${PYTHON_VERSION}/boost-${BOOSTVERSSP}
|
||||
MY_CMAKE_FLAGS += -DOIIO_REZ_INSTALL_PATH=${REZ_INSTALL_PATH}
|
||||
MY_CMAKE_FLAGS += -DCMAKE_INSTALL_RPATH=${REZ_INSTALL_PATH}/lib
|
||||
INSTALL_PREFIX := ${working_dir}/dist/${platform}
|
||||
endif
|
||||
|
||||
|
||||
ifneq (${VERBOSE},)
|
||||
$(info MY_CMAKE_FLAGS: $(MY_CMAKE_FLAGS))
|
||||
endif
|
||||
|
||||
|
||||
|
||||
############################################################################
|
||||
# SpComp2 magic incantations follow. Here be dragons.
|
||||
############################################################################
|
||||
|
||||
|
||||
CPPSTDSUFFIX=
|
||||
SPCOMP2_INSTALL_ROOT ?= $(SPCOMP2_ROOT)
|
||||
BOOSTVERSSP?=${BOOSTVERS}${BOOSTSPSUFFIX}
|
||||
SPARCH=${SP_OS}-$(SPCOMP2_COMPILER)$(CPPSTDSUFFIX)-boost$(subst .,,$(BOOSTVERSSP))
|
||||
OIIO_SPCOMP2_PATH := ${SPCOMP2_INSTALL_ROOT}/OpenImageIO/${SPARCH}/v${OPENIMAGEIO_SPCOMP2_VERSION}
|
||||
# $(info New rhel7 OIIO_SPCOMP2_PATH is ${OIIO_SPCOMP2_PATH})
|
||||
|
||||
PYVERNOSPACE=${shell echo ${PYTHON_VERSION} | sed "s/\\.//"}
|
||||
SPPYARCH=$(SPARCH)-py$(PYVERNOSPACE)
|
||||
|
||||
|
||||
|
||||
all: dist
|
||||
|
||||
local: dist
|
||||
|
||||
.PHONY: spcomp2_install spcomp2_install_local spi clean all
|
||||
|
||||
spi: MY_CMAKE_FLAGS += -DCMAKE_DEBUG_POSTFIX=_d
|
||||
spi: debug dist
|
||||
|
||||
|
||||
|
||||
comma:= ,
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
|
||||
INSTALL_SPCOMP2_CURRENT = $(SPCOMP2_INSTALL_ROOT)/OpenImageIO/$(SPARCH)/v$(OPENIMAGEIO_SPCOMP2_VERSION)
|
||||
INSTALL_BIN_LOCATION = $(INSTALL_SPCOMP2_CURRENT)/bin
|
||||
SPCOMP2_LOCAL_PATH ?= /net/soft_scratch/users/$(USER)/SpComp2_test
|
||||
|
||||
spcomp2_install_local: SPCOMP2_INSTALL_ROOT = $(SPCOMP2_LOCAL_PATH)
|
||||
spcomp2_install_local: INSTALL_BIN_LOCATION = $(INSTALL_SPCOMP2_CURRENT)/bin
|
||||
spcomp2_install_local: spcomp2_install
|
||||
|
||||
SPCOMP2_RPATH_OPT ?= ${OpenEXR_ROOT}/lib:${OpenColorIO_ROOT}/lib:${Field3D_ROOT}/lib:${LIBRAW_LIBDIR}:${OpenVDB_ROOT}/lib:${Libheif_ROOT}/lib:shots/spi/home/lib/arnold/rhel7/libde265-1.0.3/lib:${TBB_ROOT}/lib/intel64/gcc4.7:${SPBOOST_LIB_DIR}
|
||||
SPCOMP2_RPATH_DEBUG ?= ${OpenEXR_ROOT}/lib:${OpenColorIO_ROOT}/lib:${Field3D_ROOT}/lib/debug:${LIBRAW_LIBDIR}:${OpenVDB_ROOT}/lib/debug:${Libheif_ROOT}/lib:shots/spi/home/lib/arnold/rhel7/libde265-1.0.3/lib:${TBB_ROOT}/lib/intel64/gcc4.7:${SPBOOST_LIB_DIR}
|
||||
PYSPCOMP2_RPATH_OPT ?= ${SPCOMP2_RPATH_OPT}:${OIIO_SPCOMP2_PATH}/lib:${PYTHON_LIBRARY_DIR}
|
||||
PYSPCOMP2_RPATH_DEBUG ?= ${SPCOMP2_RPATH_DEBUG}:${OIIO_SPCOMP2_PATH}/lib/debug:${PYTHON_LIBRARY_DIR}
|
||||
|
||||
|
||||
spcomp2: MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_SKIP_BUILD_RPATH:BOOL=OFF \
|
||||
-DCMAKE_INSTALL_RPATH=$(SPCOMP2_INSTALL_ROOT)/OpenImageIO/$(SPARCH)/v$(OPENIMAGEIO_SPCOMP2_VERSION)/lib \
|
||||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
|
||||
-DPYLIB_INCLUDE_SONAME:BOOL=ON \
|
||||
-DPYLIB_LIB_PREFIX:BOOL=ON \
|
||||
-DPYMODULE_SUFFIX="V${OPENIMAGEIO_SPCOMP2_VERSION}"
|
||||
|
||||
spcomp2: dist
|
||||
|
||||
spcomp2_debug: MY_CMAKE_FLAGS += \
|
||||
-DCMAKE_SKIP_BUILD_RPATH:BOOL=OFF \
|
||||
-DCMAKE_INSTALL_RPATH=$(SPCOMP2_INSTALL_ROOT)/OpenImageIO/$(SPARCH)/v$(OPENIMAGEIO_SPCOMP2_VERSION)/lib \
|
||||
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON \
|
||||
-DPYLIB_INCLUDE_SONAME:BOOL=ON \
|
||||
-DPYLIB_LIB_PREFIX:BOOL=ON \
|
||||
-DPYMODULE_SUFFIX="V${OPENIMAGEIO_SPCOMP2_VERSION}"
|
||||
|
||||
spcomp2_debug: debug
|
||||
|
||||
spcomp2_install_fixup_rhel7: spcomp2 spcomp2_debug
|
||||
echo $(SPCOMP2_INSTALL_ROOT)
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_OPT} ${dist_dir}/lib/libOpenImageIO$(OIIO_LIBNAME_SUFFIX).so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_DEBUG} ${dist_dir}.debug/lib/libOpenImageIO$(OIIO_LIBNAME_SUFFIX).so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_OPT} ${dist_dir}/lib/libOpenImageIO_Util$(OIIO_LIBNAME_SUFFIX).so
|
||||
patchelf --set-rpath ${SPCOMP2_RPATH_DEBUG} ${dist_dir}.debug/lib/libOpenImageIO_Util$(OIIO_LIBNAME_SUFFIX).so
|
||||
patchelf --set-rpath ${PYSPCOMP2_RPATH_OPT} ${dist_dir}/python/libPyOpenImageIO.so
|
||||
patchelf --set-rpath ${PYSPCOMP2_RPATH_DEBUG} ${dist_dir}.debug/python/libPyOpenImageIO.so
|
||||
|
||||
# This goal can't start with 'install' because something elsewhere picks
|
||||
# it up and starts doing bad things
|
||||
spcomp2_install: spcomp2_install_fixup_${SP_OS}
|
||||
perl -I/usr/local/spi/lib/make /usr/local/spi/bin/spcomp_install.pl -m installhost \
|
||||
--project=OpenImageIO \
|
||||
--version=$(OPENIMAGEIO_SPCOMP2_VERSION) \
|
||||
--root=$(SPCOMP2_INSTALL_ROOT) \
|
||||
--arch=$(SPARCH) \
|
||||
--headers=$(subst $(space),$(comma),$(wildcard ${dist_dir}/include/OpenImageIO/*)) \
|
||||
--cflags= --static_lflags="$(LINK_BOOST) $(LINK_OPENEXR) -lpthread" \
|
||||
--namespace=${NAMESPACE} \
|
||||
--srcdir=${dist_dir}/lib \
|
||||
--builddir_o=${dist_dir}/lib \
|
||||
--builddir_d=${dist_dir}.debug/lib
|
||||
perl -I/usr/local/spi/lib/make /usr/local/spi/bin/spcomp_install.pl -m installhost \
|
||||
--project=OpenImageIO_Util \
|
||||
--version=$(OPENIMAGEIO_SPCOMP2_VERSION) \
|
||||
--root=$(SPCOMP2_INSTALL_ROOT) \
|
||||
--arch=$(SPARCH) \
|
||||
--headers=$(subst $(space),$(comma),$(wildcard ${dist_dir}/include/OpenImageIO/*)) \
|
||||
--cflags= --static_lflags="$(LINK_BOOST) $(LINK_OPENEXR) -lpthread" \
|
||||
--namespace=${NAMESPACE} \
|
||||
--srcdir=${dist_dir}/lib \
|
||||
--builddir_o=${dist_dir}/lib \
|
||||
--builddir_d=${dist_dir}.debug/lib
|
||||
perl -I/usr/local/spi/lib/make /usr/local/spi/bin/spcomp_install.pl -m installhost \
|
||||
--project=PyOpenImageIO \
|
||||
--version=$(OPENIMAGEIO_SPCOMP2_VERSION) \
|
||||
--root=$(SPCOMP2_INSTALL_ROOT) \
|
||||
--arch=$(SPPYARCH) \
|
||||
--cflags= --static_lflags="$(LINK_BOOST) $(LINK_OPENEXR) -lpthread"\
|
||||
--namespace=${NAMESPACE} \
|
||||
--srcdir=${dist_dir}/python \
|
||||
--builddir_o=${dist_dir}/python \
|
||||
--builddir_d=${dist_dir}.debug/python
|
||||
|
||||
@@ -2,6 +2,15 @@ option (${PROJ_NAME}_SPIREZ "Enable extra bits for building for SPI Rez install"
|
||||
set (${PROJ_NAME}_REZ_PACKAGE_NAME CACHE STRING "${PROJECT_NAME}")
|
||||
|
||||
if (${PROJ_NAME}_SPIREZ)
|
||||
# message (STATUS "Creating package.py from package.py.in")
|
||||
# configure_file ("${PROJECT_SOURCE_DIR}/site/spi/rez/package.py.in" "${CMAKE_BINARY_DIR}/package.py")
|
||||
|
||||
set (appcfg_filename "${CMAKE_BINARY_DIR}/${PROJECT_NAME}_${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}.${PROJECT_VERSION_TWEAK}.xml")
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/site/spi/appcfg.xml.in" "${appcfg_filename}")
|
||||
|
||||
# install (FILES ${CMAKE_BINARY_DIR}/package.py
|
||||
# "${PROJECT_SOURCE_DIR}/site/spi/rez/CMakeLists.txt"
|
||||
# ${appcfg_filename}
|
||||
# DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
# COMPONENT developer)
|
||||
endif ()
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# This helper script takes a major.minor.patch semantic version string
|
||||
# ("2.1.1") and reformats it into the dot-less zero-padded version like
|
||||
# "20101". This is necessary to turn external release designations into
|
||||
# integer SpComp2 version numbers.
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import
|
||||
import sys
|
||||
|
||||
if len(sys.argv) != 2 :
|
||||
print('Need 1 argument: version number with dots')
|
||||
exit(1)
|
||||
|
||||
vers = sys.argv[1]
|
||||
parts = vers.split('.')
|
||||
print ('{:d}{:02d}{:02d}'.format(int(parts[0]), int(parts[1]), int(parts[2])))
|
||||
@@ -1,25 +0,0 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# Copyright Contributors to the OpenImageIO Project.
|
||||
|
||||
sonar.host.url=https://sonarcloud.io
|
||||
|
||||
# Required metadata
|
||||
sonar.organization=openimageio
|
||||
sonar.projectName=OpenImageIO
|
||||
sonar.projectVersion=1.0
|
||||
sonar.projectKey=OpenImageIO_oiio
|
||||
|
||||
# Source properties
|
||||
sonar.sources=src
|
||||
sonar.exclusions=src/doc/**,src/include/OpenImageIO/detail/pugixml/**,src/libutil/stb_sprintf.h,src/libutil/xxhash.cpp,src/include/OpenImageIO/detail/farmhash.h,src/libutil/farmhash.cpp
|
||||
sonar.sourceEncoding=UTF-8
|
||||
|
||||
# C/C++ analyzer properties
|
||||
sonar.cfamily.build-wrapper-output=build/bw_output
|
||||
sonar.cfamily.gcov.reportsPath=_coverage
|
||||
sonar.coverage.exclusions=src/iv/**,src/include/OpenImageIO/detail/pugixml/**,src/include/OpenImageIO/detail/fmt/**,src/libOpenImageIO/kissfft.hh
|
||||
|
||||
sonar.cfamily.cache.enabled=true
|
||||
sonar.cfamily.cache.path=/tmp/sonarcache
|
||||
|
||||
sonar.verbose=false
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
add_oiio_plugin (bmpinput.cpp bmpoutput.cpp bmp_pvt.cpp)
|
||||
|
||||
+19
-17
@@ -1,9 +1,10 @@
|
||||
// Copyright Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// https://github.com/OpenImageIO/oiio
|
||||
// Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
|
||||
#include <OpenImageIO/filesystem.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include <OpenImageIO/fmath.h>
|
||||
#include <OpenImageIO/imageio.h>
|
||||
|
||||
@@ -17,21 +18,23 @@ namespace bmp_pvt {
|
||||
/// Helper - write, with error detection
|
||||
template<class T>
|
||||
bool
|
||||
fwrite(Filesystem::IOProxy* fd, const T* buf)
|
||||
fwrite(FILE* fd, const T* buf)
|
||||
{
|
||||
return fd->write(buf, sizeof(T)) == sizeof(T);
|
||||
size_t n = std::fwrite(buf, sizeof(T), 1, fd);
|
||||
return n == 1;
|
||||
}
|
||||
|
||||
/// Helper - read, with error detection
|
||||
template<class T>
|
||||
bool
|
||||
fread(Filesystem::IOProxy* fd, T* buf, size_t itemsize = sizeof(T))
|
||||
fread(FILE* fd, T* buf, size_t itemsize = sizeof(T))
|
||||
{
|
||||
return fd->read(buf, itemsize) == itemsize;
|
||||
size_t n = std::fread(buf, itemsize, 1, fd);
|
||||
return n == 1;
|
||||
}
|
||||
|
||||
bool
|
||||
BmpFileHeader::read_header(Filesystem::IOProxy* fd)
|
||||
BmpFileHeader::read_header(FILE* fd)
|
||||
{
|
||||
if (!fread(fd, &magic) || !fread(fd, &fsize) || !fread(fd, &res1)
|
||||
|| !fread(fd, &res2) || !fread(fd, &offset)) {
|
||||
@@ -46,7 +49,7 @@ BmpFileHeader::read_header(Filesystem::IOProxy* fd)
|
||||
|
||||
|
||||
bool
|
||||
BmpFileHeader::write_header(Filesystem::IOProxy* fd)
|
||||
BmpFileHeader::write_header(FILE* fd)
|
||||
{
|
||||
if (bigendian())
|
||||
swap_endian();
|
||||
@@ -70,8 +73,8 @@ BmpFileHeader::isBmp() const
|
||||
case MAGIC_CI:
|
||||
case MAGIC_CP:
|
||||
case MAGIC_PT: return true;
|
||||
default: return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +90,7 @@ BmpFileHeader::swap_endian(void)
|
||||
|
||||
|
||||
bool
|
||||
DibInformationHeader::read_header(Filesystem::IOProxy* fd)
|
||||
DibInformationHeader::read_header(FILE* fd)
|
||||
{
|
||||
if (!fread(fd, &size))
|
||||
return false;
|
||||
@@ -101,8 +104,7 @@ DibInformationHeader::read_header(Filesystem::IOProxy* fd)
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((size == WINDOWS_V3 && bpp == 16 && compression == 3)
|
||||
|| size == WINDOWS_V4 || size == WINDOWS_V5 || size == UNDOCHEADER52
|
||||
if (size == WINDOWS_V4 || size == WINDOWS_V5 || size == UNDOCHEADER52
|
||||
|| size == UNDOCHEADER56) {
|
||||
if (!fread(fd, &red_mask) || !fread(fd, &green_mask)
|
||||
|| !fread(fd, &blue_mask)) {
|
||||
@@ -131,7 +133,7 @@ DibInformationHeader::read_header(Filesystem::IOProxy* fd)
|
||||
}
|
||||
}
|
||||
} else if (size == OS2_V1) {
|
||||
// some of these fields are smaller than in WINDOWS_Vx headers,
|
||||
// some of theses fields are smaller than in WINDOWS_Vx headers,
|
||||
// so we read into 16 bit ints and copy.
|
||||
uint16_t width16 = 0;
|
||||
uint16_t height16 = 0;
|
||||
@@ -150,7 +152,7 @@ DibInformationHeader::read_header(Filesystem::IOProxy* fd)
|
||||
|
||||
|
||||
bool
|
||||
DibInformationHeader::write_header(Filesystem::IOProxy* fd)
|
||||
DibInformationHeader::write_header(FILE* fd)
|
||||
{
|
||||
if (bigendian())
|
||||
swap_endian();
|
||||
@@ -163,7 +165,7 @@ DibInformationHeader::write_header(Filesystem::IOProxy* fd)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return (true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+29
-35
@@ -1,6 +1,6 @@
|
||||
// Copyright Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// https://github.com/OpenImageIO/oiio
|
||||
// Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace bmp_pvt {
|
||||
// size of the BMP file header (the first header that occur in BMP file)
|
||||
const int BMP_HEADER_SIZE = 14;
|
||||
|
||||
// sizes of various DIB headers
|
||||
// sizes of various DIB haders
|
||||
const int OS2_V1 = 12;
|
||||
const int WINDOWS_V3 = 40;
|
||||
const int UNDOCHEADER52 = 52; // 0x34
|
||||
@@ -36,22 +36,16 @@ const int32_t NO_COMPRESSION = 0; // BI_RGB
|
||||
const int32_t RLE8_COMPRESSION = 1; // BI_RLE8
|
||||
const int32_t RLE4_COMPRESSION = 2; // BI_RLE4
|
||||
|
||||
enum class CSType {
|
||||
CalibratedRGB = 0,
|
||||
DeviceDependentRGB = 1,
|
||||
DeviceDependentCMYK = 2
|
||||
};
|
||||
|
||||
|
||||
|
||||
// store information about BMP file
|
||||
// store informations about BMP file
|
||||
class BmpFileHeader {
|
||||
public:
|
||||
// reads information about BMP file
|
||||
bool read_header(Filesystem::IOProxy* fd);
|
||||
// reads informations about BMP file
|
||||
bool read_header(FILE* fd);
|
||||
|
||||
// writes information about bmp file to given file
|
||||
bool write_header(Filesystem::IOProxy* fd);
|
||||
bool write_header(FILE* fd);
|
||||
|
||||
// return true if given file is BMP file
|
||||
bool isBmp() const;
|
||||
@@ -68,11 +62,11 @@ private:
|
||||
// stores information about bitmap
|
||||
class DibInformationHeader {
|
||||
public:
|
||||
// reads information about bitmap
|
||||
bool read_header(Filesystem::IOProxy* fd);
|
||||
// reads informations about bitmap
|
||||
bool read_header(FILE* fd);
|
||||
|
||||
// writes information about bitmap
|
||||
bool write_header(Filesystem::IOProxy* fd);
|
||||
// writes informations about bitmap
|
||||
bool write_header(FILE* fd);
|
||||
|
||||
int32_t size; // size of the header
|
||||
int32_t width; // bitmap width in pixels
|
||||
@@ -91,23 +85,23 @@ public:
|
||||
// in most cases ignored
|
||||
|
||||
// added in Version 4 of the format
|
||||
int32_t red_mask = 0;
|
||||
int32_t blue_mask = 0;
|
||||
int32_t green_mask = 0;
|
||||
int32_t alpha_mask = 0;
|
||||
int32_t cs_type = 0; // color space type
|
||||
int32_t red_x = 0;
|
||||
int32_t red_y = 0;
|
||||
int32_t red_z = 0;
|
||||
int32_t green_x = 0;
|
||||
int32_t green_y = 0;
|
||||
int32_t green_z = 0;
|
||||
int32_t blue_x = 0;
|
||||
int32_t blue_y = 0;
|
||||
int32_t blue_z = 0;
|
||||
int32_t gamma_x = 0;
|
||||
int32_t gamma_y = 0;
|
||||
int32_t gamma_z = 0;
|
||||
int32_t red_mask;
|
||||
int32_t blue_mask;
|
||||
int32_t green_mask;
|
||||
int32_t alpha_mask;
|
||||
int32_t cs_type; //color space type
|
||||
int32_t red_x;
|
||||
int32_t red_y;
|
||||
int32_t red_z;
|
||||
int32_t green_x;
|
||||
int32_t green_y;
|
||||
int32_t green_z;
|
||||
int32_t blue_x;
|
||||
int32_t blue_y;
|
||||
int32_t blue_z;
|
||||
int32_t gamma_x;
|
||||
int32_t gamma_y;
|
||||
int32_t gamma_z;
|
||||
|
||||
// added in Version 5 of the format
|
||||
int32_t intent;
|
||||
|
||||
+73
-140
@@ -1,6 +1,6 @@
|
||||
// Copyright Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// https://github.com/OpenImageIO/oiio
|
||||
// Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
@@ -17,51 +17,44 @@ using namespace bmp_pvt;
|
||||
class BmpInput final : public ImageInput {
|
||||
public:
|
||||
BmpInput() { init(); }
|
||||
~BmpInput() override { close(); }
|
||||
const char* format_name(void) const override { return "bmp"; }
|
||||
int supports(string_view feature) const override
|
||||
{
|
||||
return feature == "ioproxy";
|
||||
}
|
||||
bool valid_file(const std::string& filename) const override;
|
||||
bool open(const std::string& name, ImageSpec& newspec) override;
|
||||
bool open(const std::string& name, ImageSpec& newspec,
|
||||
const ImageSpec& config) override;
|
||||
bool close(void) override;
|
||||
bool read_native_scanline(int subimage, int miplevel, int y, int z,
|
||||
void* data) override;
|
||||
virtual ~BmpInput() { close(); }
|
||||
virtual const char* format_name(void) const override { return "bmp"; }
|
||||
virtual bool valid_file(const std::string& filename) const override;
|
||||
virtual bool open(const std::string& name, ImageSpec& newspec) override;
|
||||
virtual bool open(const std::string& name, ImageSpec& newspec,
|
||||
const ImageSpec& config) override;
|
||||
virtual bool close(void) override;
|
||||
virtual bool read_native_scanline(int subimage, int miplevel, int y, int z,
|
||||
void* data) override;
|
||||
|
||||
private:
|
||||
int64_t m_padded_scanline_size;
|
||||
int m_pad_size;
|
||||
FILE* m_fd;
|
||||
bmp_pvt::BmpFileHeader m_bmp_header;
|
||||
bmp_pvt::DibInformationHeader m_dib_header;
|
||||
std::string m_filename;
|
||||
std::vector<bmp_pvt::color_table> m_colortable;
|
||||
std::vector<unsigned char> fscanline; // temp space: read from file
|
||||
std::vector<unsigned char> m_uncompressed; // uncompressed palette image
|
||||
uint32_t m_right_shifts[3];
|
||||
uint32_t m_bit_counts[3];
|
||||
bool m_allgray;
|
||||
|
||||
void init(void)
|
||||
{
|
||||
m_padded_scanline_size = 0;
|
||||
m_pad_size = 0;
|
||||
m_fd = NULL;
|
||||
m_filename.clear();
|
||||
m_colortable.clear();
|
||||
m_allgray = false;
|
||||
fscanline.shrink_to_fit();
|
||||
m_uncompressed.shrink_to_fit();
|
||||
ioproxy_clear();
|
||||
}
|
||||
|
||||
bool read_color_table();
|
||||
bool color_table_is_all_gray();
|
||||
bool read_rle_image();
|
||||
|
||||
bool ioeof() { return size_t(ioproxy()->tell()) == ioproxy()->size(); }
|
||||
|
||||
// Safe, clamped access to color table
|
||||
const bmp_pvt::color_table& colortable(int i)
|
||||
{
|
||||
@@ -71,7 +64,7 @@ private:
|
||||
|
||||
|
||||
|
||||
// Obligatory material to make this a recognizable imageio plugin
|
||||
// Obligatory material to make this a recognizeable imageio plugin
|
||||
OIIO_PLUGIN_EXPORTS_BEGIN
|
||||
|
||||
OIIO_EXPORT int bmp_imageio_version = OIIO_PLUGIN_VERSION;
|
||||
@@ -96,9 +89,13 @@ OIIO_PLUGIN_EXPORTS_END
|
||||
bool
|
||||
BmpInput::valid_file(const std::string& filename) const
|
||||
{
|
||||
bmp_pvt::BmpFileHeader header;
|
||||
Filesystem::IOFile file(filename, Filesystem::IOProxy::Read);
|
||||
return file.opened() && header.read_header(&file) && header.isBmp();
|
||||
FILE* fd = Filesystem::fopen(filename, "rb");
|
||||
if (!fd)
|
||||
return false;
|
||||
bmp_pvt::BmpFileHeader bmp_header;
|
||||
bool ok = bmp_header.read_header(fd) && bmp_header.isBmp();
|
||||
fclose(fd);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,28 +107,6 @@ BmpInput::open(const std::string& name, ImageSpec& newspec)
|
||||
return open(name, newspec, emptyconfig);
|
||||
}
|
||||
|
||||
inline void
|
||||
calc_shifts(uint32_t mask, uint32_t& count, uint32_t& right)
|
||||
{
|
||||
if (mask == 0) {
|
||||
count = right = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t i;
|
||||
for (i = 0; i < 32; i++, mask >>= 1) {
|
||||
if (mask & 1)
|
||||
break;
|
||||
}
|
||||
right = i;
|
||||
|
||||
for (i = 0; i < 32; i++, mask >>= 1) {
|
||||
if (!(mask & 1))
|
||||
break;
|
||||
}
|
||||
count = i;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool
|
||||
@@ -148,19 +123,21 @@ BmpInput::open(const std::string& name, ImageSpec& newspec,
|
||||
// this behavior off.
|
||||
bool monodetect = config["bmp:monochrome_detect"].get<int>(1);
|
||||
|
||||
ioproxy_retrieve_from_config(config);
|
||||
if (!ioproxy_use_or_open(name))
|
||||
m_fd = Filesystem::fopen(m_filename, "rb");
|
||||
if (!m_fd) {
|
||||
errorf("Could not open file \"%s\"", name);
|
||||
return false;
|
||||
ioseek(0);
|
||||
}
|
||||
|
||||
// we read header of the file that we think is BMP file
|
||||
if (!m_bmp_header.read_header(ioproxy())) {
|
||||
errorfmt("\"{}\": wrong bmp header size", name);
|
||||
if (!m_bmp_header.read_header(m_fd)) {
|
||||
errorf("\"%s\": wrong bmp header size", m_filename);
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
if (!m_bmp_header.isBmp()) {
|
||||
errorfmt("\"{}\" is not a BMP file, magic number doesn't match", name);
|
||||
errorf("\"%s\" is not a BMP file, magic number doesn't match",
|
||||
m_filename);
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
@@ -169,8 +146,8 @@ BmpInput::open(const std::string& name, ImageSpec& newspec,
|
||||
// m_bmp_header.magic, char(m_bmp_header.magic & 0xff),
|
||||
// char(m_bmp_header.magic >> 8), m_bmp_header.fsize, m_bmp_header.res1,
|
||||
// m_bmp_header.res2, m_bmp_header.offset);
|
||||
if (!m_dib_header.read_header(ioproxy())) {
|
||||
errorfmt("\"{}\": wrong bitmap header size", name);
|
||||
if (!m_dib_header.read_header(m_fd)) {
|
||||
errorf("\"%s\": wrong bitmap header size", m_filename);
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
@@ -198,17 +175,6 @@ BmpInput::open(const std::string& name, ImageSpec& newspec,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Compute channel shifts & masks (only relevant for 16bpp case)
|
||||
if (m_dib_header.red_mask == 0 || m_dib_header.green_mask == 0
|
||||
|| m_dib_header.blue_mask == 0) {
|
||||
m_dib_header.red_mask = 0b111110000000000;
|
||||
m_dib_header.green_mask = 0b000001111100000;
|
||||
m_dib_header.blue_mask = 0b000000000011111;
|
||||
}
|
||||
calc_shifts(m_dib_header.red_mask, m_bit_counts[0], m_right_shifts[0]);
|
||||
calc_shifts(m_dib_header.green_mask, m_bit_counts[1], m_right_shifts[1]);
|
||||
calc_shifts(m_dib_header.blue_mask, m_bit_counts[2], m_right_shifts[2]);
|
||||
|
||||
// computing size of one scanline - this is the size of one scanline that
|
||||
// is stored in the file, not in the memory
|
||||
int swidth = 0;
|
||||
@@ -219,7 +185,7 @@ BmpInput::open(const std::string& name, ImageSpec& newspec,
|
||||
break;
|
||||
case 16:
|
||||
m_padded_scanline_size = ((m_spec.width << 1) + 3) & ~3;
|
||||
m_spec.attribute("oiio:BitsPerSample", m_bit_counts[0]);
|
||||
m_spec.attribute("oiio:BitsPerSample", 4);
|
||||
break;
|
||||
case 8:
|
||||
m_padded_scanline_size = (m_spec.width + 3) & ~3;
|
||||
@@ -256,25 +222,6 @@ BmpInput::open(const std::string& name, ImageSpec& newspec,
|
||||
case WINDOWS_V5: m_spec.attribute("bmp:version", 5); break;
|
||||
}
|
||||
|
||||
// Default presumption is that a BMP file is meant to look reasonable on a
|
||||
// display, so assume it's sRGB. This is not really correct -- see the
|
||||
// comments below.
|
||||
m_spec.attribute("oiio:ColorSpace", "sRGB");
|
||||
#if 0
|
||||
if (m_dib_header.size >= WINDOWS_V4
|
||||
&& m_dib_header.cs_type == CSType::CalibratedRGB) {
|
||||
// FIXME: V4 and newer BMP files have color primary information, but
|
||||
// we currently ignore it and presume sRGB. I don't know how
|
||||
// frequently the color primaries are reliable or if anybody cares for
|
||||
// this ancient format. We may come back to this later.
|
||||
}
|
||||
if (m_dib_header.size >= WINDOWS_V4
|
||||
&& m_dib_header.cs_type == CSType::DeviceDependentCMYK) {
|
||||
// FIXME: I've never encountered a BMP file that holds CMYK data. If
|
||||
// this is a problem for people, we can return to fix this later.
|
||||
}
|
||||
#endif
|
||||
|
||||
// Bite the bullet and uncompress now, for simplicity
|
||||
if (m_dib_header.compression == RLE4_COMPRESSION
|
||||
|| m_dib_header.compression == RLE8_COMPRESSION) {
|
||||
@@ -295,25 +242,16 @@ bool
|
||||
BmpInput::read_rle_image()
|
||||
{
|
||||
int rletype = m_dib_header.compression == RLE4_COMPRESSION ? 4 : 8;
|
||||
m_spec.attribute("compression", rletype == 4 ? "rle4" : "rle8");
|
||||
m_spec.attribute("bmp:compression", rletype == 4 ? "rle4" : "rle8");
|
||||
m_uncompressed.clear();
|
||||
m_uncompressed.resize(m_spec.image_pixels());
|
||||
m_uncompressed.resize(m_spec.height * m_spec.width);
|
||||
// Note: the clear+resize zeroes out the buffer
|
||||
bool ok = true;
|
||||
bool err = false;
|
||||
int y = 0, x = 0;
|
||||
while (ok) {
|
||||
// Strutil::print("currently at {},{}\n", x, y);
|
||||
while (!err && !feof(m_fd)) {
|
||||
unsigned char rle_pair[2];
|
||||
if (!ioread(rle_pair, 2)) {
|
||||
ok = false;
|
||||
// Strutil::print("hit end of file at {},{}\n", x, y);
|
||||
break;
|
||||
}
|
||||
if (y >= m_spec.height) { // out of y bounds
|
||||
errorfmt(
|
||||
"BMP might be corrupted, it is referencing an out-of-bounds pixel coordinte ({},{})",
|
||||
x, y);
|
||||
ok = false;
|
||||
if (fread(rle_pair, 1, 2, m_fd) != 2) {
|
||||
err = true;
|
||||
break;
|
||||
}
|
||||
int npixels = rle_pair[0];
|
||||
@@ -322,31 +260,26 @@ BmpInput::read_rle_image()
|
||||
// [0,0] is end of line marker
|
||||
x = 0;
|
||||
++y;
|
||||
// Strutil::print("end of line, moving to {},{}\n", x, y);
|
||||
} else if (npixels == 0 && value == 1) {
|
||||
// [0,1] is end of bitmap marker
|
||||
// Strutil::print("end of bitmap\n");
|
||||
break;
|
||||
} else if (npixels == 0 && value == 2) {
|
||||
// [0,2] is a "delta" -- two more bytes reposition the
|
||||
// current pixel position that we're reading.
|
||||
unsigned char offset[2];
|
||||
ok &= ioread(offset, 2);
|
||||
err |= (fread(offset, 1, 2, m_fd) != 2);
|
||||
x += offset[0];
|
||||
y += offset[1];
|
||||
// Strutil::print("offset by {:d},{:d} to {},{}\n", offset[0],
|
||||
// offset[1], x, y);
|
||||
} else if (npixels == 0) {
|
||||
// [0,n>2] is an "absolute" run of pixel data.
|
||||
// n is the number of pixel indices that follow, but note
|
||||
// that it pads to word size.
|
||||
npixels = value;
|
||||
int nbytes = (rletype == 4)
|
||||
? round_to_multiple((npixels + 1) / 2, 2)
|
||||
: round_to_multiple(npixels, 2);
|
||||
// Strutil::print("rle of {} pixels at {},{}\n", npixels, x, y);
|
||||
int npixels = value;
|
||||
int nbytes = (rletype == 4)
|
||||
? round_to_multiple((npixels + 1) / 2, 2)
|
||||
: round_to_multiple(npixels, 2);
|
||||
unsigned char absolute[256];
|
||||
ok &= ioread(absolute, nbytes);
|
||||
err |= (fread(absolute, 1, nbytes, m_fd) != size_t(nbytes));
|
||||
for (int i = 0; i < npixels; ++i, ++x) {
|
||||
if (rletype == 4)
|
||||
value = (i & 1) ? (absolute[i / 2] & 0x0f)
|
||||
@@ -358,7 +291,6 @@ BmpInput::read_rle_image()
|
||||
}
|
||||
} else {
|
||||
// [n>0,p] is a run of n pixels.
|
||||
// Strutil::print("direct read {} pixels at {},{}\n", npixels, x, y);
|
||||
for (int i = 0; i < npixels; ++i, ++x) {
|
||||
int v;
|
||||
if (rletype == 4)
|
||||
@@ -370,7 +302,7 @@ BmpInput::read_rle_image()
|
||||
}
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
return !err;
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +311,7 @@ bool
|
||||
BmpInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/,
|
||||
void* data)
|
||||
{
|
||||
lock_guard lock(*this);
|
||||
lock_guard lock(m_mutex);
|
||||
if (!seek_subimage(subimage, miplevel))
|
||||
return false;
|
||||
|
||||
@@ -406,8 +338,13 @@ BmpInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/,
|
||||
const int64_t scanline_off = y * m_padded_scanline_size;
|
||||
|
||||
fscanline.resize(m_padded_scanline_size);
|
||||
ioseek(m_bmp_header.offset + scanline_off);
|
||||
if (!ioread(fscanline.data(), m_padded_scanline_size)) {
|
||||
Filesystem::fseek(m_fd, m_bmp_header.offset + scanline_off, SEEK_SET);
|
||||
size_t n = fread(fscanline.data(), 1, m_padded_scanline_size, m_fd);
|
||||
if (n != (size_t)m_padded_scanline_size) {
|
||||
if (feof(m_fd))
|
||||
errorf("Hit end of file unexpectedly");
|
||||
else
|
||||
errorf("read error");
|
||||
return false; // Read failed
|
||||
}
|
||||
|
||||
@@ -423,20 +360,14 @@ BmpInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/,
|
||||
}
|
||||
|
||||
if (m_dib_header.bpp == 16) {
|
||||
const uint16_t RED = 0x7C00;
|
||||
const uint16_t GREEN = 0x03E0;
|
||||
const uint16_t BLUE = 0x001F;
|
||||
for (unsigned int i = 0, j = 0; j < scanline_bytes; i += 2, j += 3) {
|
||||
uint16_t pixel = *(uint16_t*)&fscanline[i];
|
||||
mscanline[j + 0]
|
||||
= (uint8_t)bit_range_convert((pixel & m_dib_header.red_mask)
|
||||
>> m_right_shifts[0],
|
||||
m_bit_counts[0], 8);
|
||||
mscanline[j + 1]
|
||||
= (uint8_t)bit_range_convert((pixel & m_dib_header.green_mask)
|
||||
>> m_right_shifts[1],
|
||||
m_bit_counts[1], 8);
|
||||
mscanline[j + 2]
|
||||
= (uint8_t)bit_range_convert((pixel & m_dib_header.blue_mask)
|
||||
>> m_right_shifts[2],
|
||||
m_bit_counts[2], 8);
|
||||
uint16_t pixel = (uint16_t) * (&fscanline[i]);
|
||||
mscanline[j] = (uint8_t)((pixel & RED) >> 8);
|
||||
mscanline[j + 1] = (uint8_t)((pixel & GREEN) >> 4);
|
||||
mscanline[j + 2] = (uint8_t)(pixel & BLUE);
|
||||
}
|
||||
}
|
||||
if (m_dib_header.bpp == 8) {
|
||||
@@ -495,9 +426,12 @@ BmpInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/,
|
||||
|
||||
|
||||
|
||||
bool
|
||||
BmpInput::close(void)
|
||||
bool inline BmpInput::close(void)
|
||||
{
|
||||
if (m_fd) {
|
||||
fclose(m_fd);
|
||||
m_fd = NULL;
|
||||
}
|
||||
init();
|
||||
return true;
|
||||
}
|
||||
@@ -513,7 +447,7 @@ BmpInput::read_color_table(void)
|
||||
// m_dib_header.cpalete entries
|
||||
if (m_dib_header.cpalete < 0
|
||||
|| m_dib_header.cpalete > (1 << m_dib_header.bpp)) {
|
||||
errorfmt("Possible corrupted header, invalid palette size");
|
||||
errorf("Possible corrupted header, invalid palette size");
|
||||
return false;
|
||||
}
|
||||
const int32_t colors = (m_dib_header.cpalete) ? m_dib_header.cpalete
|
||||
@@ -524,21 +458,20 @@ BmpInput::read_color_table(void)
|
||||
entry_size = 3;
|
||||
m_colortable.resize(colors);
|
||||
for (int i = 0; i < colors; i++) {
|
||||
if (!ioread(&m_colortable[i], entry_size)) {
|
||||
if (ioeof())
|
||||
size_t n = fread(&m_colortable[i], 1, entry_size, m_fd);
|
||||
if (n != entry_size) {
|
||||
if (feof(m_fd))
|
||||
errorfmt(
|
||||
"Hit end of file unexpectedly while reading color table on color {}/{})",
|
||||
i, colors);
|
||||
"Hit end of file unexpectedly while reading color table on color {}/{} (read {}, expected {})",
|
||||
i, colors, n, entry_size);
|
||||
else
|
||||
errorfmt("read error while reading color table");
|
||||
errorf("read error while reading color table");
|
||||
return false; // Read failed
|
||||
}
|
||||
}
|
||||
return true; // ok
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool
|
||||
BmpInput::color_table_is_all_gray(void)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
// https://github.com/OpenImageIO/oiio
|
||||
// Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
@@ -18,20 +18,21 @@ using namespace bmp_pvt;
|
||||
class BmpOutput final : public ImageOutput {
|
||||
public:
|
||||
BmpOutput() { init(); }
|
||||
~BmpOutput() override { close(); }
|
||||
const char* format_name(void) const override { return "bmp"; }
|
||||
int supports(string_view feature) const override;
|
||||
bool open(const std::string& name, const ImageSpec& spec,
|
||||
OpenMode mode) override;
|
||||
bool close(void) override;
|
||||
bool write_scanline(int y, int z, TypeDesc format, const void* data,
|
||||
stride_t xstride) override;
|
||||
bool write_tile(int x, int y, int z, TypeDesc format, const void* data,
|
||||
stride_t xstride, stride_t ystride,
|
||||
stride_t zstride) override;
|
||||
virtual ~BmpOutput() { close(); }
|
||||
virtual const char* format_name(void) const override { return "bmp"; }
|
||||
virtual int supports(string_view feature) const override;
|
||||
virtual bool open(const std::string& name, const ImageSpec& spec,
|
||||
OpenMode mode) override;
|
||||
virtual bool close(void) override;
|
||||
virtual bool write_scanline(int y, int z, TypeDesc format, const void* data,
|
||||
stride_t xstride) override;
|
||||
virtual bool write_tile(int x, int y, int z, TypeDesc format,
|
||||
const void* data, stride_t xstride,
|
||||
stride_t ystride, stride_t zstride) override;
|
||||
|
||||
private:
|
||||
int64_t m_padded_scanline_size;
|
||||
FILE* m_fd;
|
||||
std::string m_filename;
|
||||
bmp_pvt::BmpFileHeader m_bmp_header;
|
||||
bmp_pvt::DibInformationHeader m_dib_header;
|
||||
@@ -44,8 +45,8 @@ private:
|
||||
void init(void)
|
||||
{
|
||||
m_padded_scanline_size = 0;
|
||||
m_fd = NULL;
|
||||
m_filename.clear();
|
||||
ioproxy_clear();
|
||||
}
|
||||
|
||||
void create_and_write_file_header(void);
|
||||
@@ -55,7 +56,7 @@ private:
|
||||
|
||||
|
||||
|
||||
// Obligatory material to make this a recognizable imageio plugin
|
||||
// Obligatory material to make this a recognizeable imageio plugin
|
||||
OIIO_PLUGIN_EXPORTS_BEGIN
|
||||
|
||||
OIIO_EXPORT ImageOutput*
|
||||
@@ -73,7 +74,7 @@ OIIO_PLUGIN_EXPORTS_END
|
||||
int
|
||||
BmpOutput::supports(string_view feature) const
|
||||
{
|
||||
return (feature == "alpha" || feature == "ioproxy");
|
||||
return (feature == "alpha");
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +83,7 @@ bool
|
||||
BmpOutput::open(const std::string& name, const ImageSpec& spec, OpenMode mode)
|
||||
{
|
||||
if (mode != Create) {
|
||||
errorfmt("{} does not support subimages or MIP levels", format_name());
|
||||
errorf("%s does not support subimages or MIP levels", format_name());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -92,14 +93,8 @@ BmpOutput::open(const std::string& name, const ImageSpec& spec, OpenMode mode)
|
||||
|
||||
if (m_spec.nchannels != 1 && m_spec.nchannels != 3
|
||||
&& m_spec.nchannels != 4) {
|
||||
errorfmt("{} does not support {}-channel images\n", format_name(),
|
||||
m_spec.nchannels);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_spec.x || m_spec.y || m_spec.z) {
|
||||
errorfmt("{} does not support images with non-zero image origin offset",
|
||||
format_name());
|
||||
errorf("%s does not support %d-channel images\n", format_name(),
|
||||
m_spec.nchannels);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -109,13 +104,15 @@ BmpOutput::open(const std::string& name, const ImageSpec& spec, OpenMode mode)
|
||||
|
||||
int64_t file_size = m_spec.image_bytes() + BMP_HEADER_SIZE + WINDOWS_V3;
|
||||
if (file_size >= int64_t(1) << 32) {
|
||||
errorfmt("{} does not support files over 4GB in size\n", format_name());
|
||||
errorf("%s does not support files over 4GB in size\n", format_name());
|
||||
return false;
|
||||
}
|
||||
|
||||
ioproxy_retrieve_from_config(m_spec);
|
||||
if (!ioproxy_use_or_open(name))
|
||||
m_fd = Filesystem::fopen(m_filename, "wb");
|
||||
if (!m_fd) {
|
||||
errorf("Could not open \"%s\"", m_filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Scanline size is rounded up to align to 4-byte boundary
|
||||
m_padded_scanline_size = round_to_multiple(m_spec.scanline_bytes(), 4);
|
||||
@@ -123,7 +120,7 @@ BmpOutput::open(const std::string& name, const ImageSpec& spec, OpenMode mode)
|
||||
create_and_write_file_header();
|
||||
create_and_write_bitmap_header();
|
||||
|
||||
m_image_start = iotell();
|
||||
m_image_start = Filesystem::ftell(m_fd);
|
||||
|
||||
// If user asked for tiles -- which this format doesn't support, emulate
|
||||
// it by buffering the whole image.
|
||||
@@ -139,22 +136,16 @@ bool
|
||||
BmpOutput::write_scanline(int y, int z, TypeDesc format, const void* data,
|
||||
stride_t xstride)
|
||||
{
|
||||
if (!ioproxy_opened()) {
|
||||
errorfmt("write_scanline called but file is not open.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (y > m_spec.y + m_spec.height) {
|
||||
errorfmt("Attempt to write too many scanlines to {}", m_filename);
|
||||
if (y > m_spec.height) {
|
||||
errorf("Attempt to write too many scanlines to %s", m_filename);
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
||||
y -= m_spec.y;
|
||||
if (m_spec.width >= 0)
|
||||
y = (m_spec.height - y - 1);
|
||||
int64_t scanline_off = y * m_padded_scanline_size;
|
||||
ioseek(m_image_start + scanline_off);
|
||||
Filesystem::fseek(m_fd, m_image_start + scanline_off, SEEK_SET);
|
||||
|
||||
m_scratch.clear();
|
||||
data = to_native_scanline(format, data, xstride, m_scratch, m_dither, y, z);
|
||||
@@ -168,7 +159,8 @@ BmpOutput::write_scanline(int y, int z, TypeDesc format, const void* data,
|
||||
i += m_spec.nchannels)
|
||||
std::swap(m_buf[i], m_buf[i + 2]);
|
||||
|
||||
return iowrite(&m_buf[0], m_buf.size());
|
||||
size_t byte_count = fwrite(&m_buf[0], 1, m_buf.size(), m_fd);
|
||||
return byte_count == m_buf.size(); // true if wrote all bytes (no error)
|
||||
}
|
||||
|
||||
|
||||
@@ -177,14 +169,9 @@ bool
|
||||
BmpOutput::write_tile(int x, int y, int z, TypeDesc format, const void* data,
|
||||
stride_t xstride, stride_t ystride, stride_t zstride)
|
||||
{
|
||||
if (!ioproxy_opened()) {
|
||||
errorfmt("write_tile called but file is not open.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Emulate tiles by buffering the whole image
|
||||
return copy_tile_to_image_buffer(x, y, z, format, data, xstride, ystride,
|
||||
zstride, m_tilebuffer.data());
|
||||
zstride, &m_tilebuffer[0]);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,21 +179,22 @@ BmpOutput::write_tile(int x, int y, int z, TypeDesc format, const void* data,
|
||||
bool
|
||||
BmpOutput::close(void)
|
||||
{
|
||||
if (!ioproxy_opened()) { // already closed
|
||||
if (!m_fd) { // already closed
|
||||
init();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ok = true;
|
||||
if (m_spec.tile_width && m_tilebuffer.size()) {
|
||||
if (m_spec.tile_width) {
|
||||
// Handle tile emulation -- output the buffered pixels
|
||||
OIIO_DASSERT(m_tilebuffer.size());
|
||||
ok &= write_scanlines(m_spec.y, m_spec.y + m_spec.height, 0,
|
||||
m_spec.format, m_tilebuffer.data());
|
||||
m_spec.format, &m_tilebuffer[0]);
|
||||
std::vector<unsigned char>().swap(m_tilebuffer);
|
||||
}
|
||||
|
||||
init();
|
||||
fclose(m_fd);
|
||||
m_fd = NULL;
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -223,7 +211,7 @@ BmpOutput::create_and_write_file_header(void)
|
||||
m_bmp_header.res2 = 0;
|
||||
m_bmp_header.offset = BMP_HEADER_SIZE + WINDOWS_V3 + palettesize;
|
||||
|
||||
m_bmp_header.write_header(ioproxy());
|
||||
m_bmp_header.write_header(m_fd);
|
||||
}
|
||||
|
||||
|
||||
@@ -252,20 +240,28 @@ BmpOutput::create_and_write_bitmap_header(void)
|
||||
m_dib_header.hres = 0;
|
||||
m_dib_header.vres = 0;
|
||||
|
||||
string_view res_units = m_spec.get_string_attribute("ResolutionUnit");
|
||||
if (Strutil::iequals(res_units, "m")
|
||||
|| Strutil::iequals(res_units, "pixel per meter")) {
|
||||
m_dib_header.hres = m_spec.get_int_attribute("XResolution");
|
||||
m_dib_header.vres = m_spec.get_int_attribute("YResolution");
|
||||
ParamValue* p = m_spec.find_attribute("ResolutionUnit", TypeDesc::STRING);
|
||||
if (p && p->data()) {
|
||||
std::string res_units = *(char**)p->data();
|
||||
if (Strutil::iequals(res_units, "m")
|
||||
|| Strutil::iequals(res_units, "pixel per meter")) {
|
||||
ParamValue *resx = NULL, *resy = NULL;
|
||||
resx = m_spec.find_attribute("XResolution", TypeDesc::INT32);
|
||||
if (resx && resx->data())
|
||||
m_dib_header.hres = *(int*)resx->data();
|
||||
resy = m_spec.find_attribute("YResolution", TypeDesc::INT32);
|
||||
if (resy && resy->data())
|
||||
m_dib_header.vres = *(int*)resy->data();
|
||||
}
|
||||
}
|
||||
|
||||
m_dib_header.write_header(ioproxy());
|
||||
m_dib_header.write_header(m_fd);
|
||||
|
||||
// Write palette, if there is one. This is only used for grayscale
|
||||
// images, and the palette is just the 256 possible gray values.
|
||||
for (int i = 0; i < m_dib_header.cpalete; ++i) {
|
||||
unsigned char val[4] = { uint8_t(i), uint8_t(i), uint8_t(i), 255 };
|
||||
iowrite(&val, 4);
|
||||
fwrite(&val, 1, 4, m_fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
|
||||
PROJECT (openexr)
|
||||
|
||||
SET(OPENEXR_VERSION_MAJOR "2")
|
||||
SET(OPENEXR_VERSION_MINOR "2")
|
||||
SET(OPENEXR_VERSION_PATCH "0")
|
||||
|
||||
SET(OPENEXR_VERSION ${OPENEXR_VERSION_MAJOR}.${OPENEXR_VERSION_MINOR}.${OPENEXR_VERSION_PATCH})
|
||||
SET(OPENEXR_VERSION_API ${OPENEXR_VERSION_MAJOR}_${OPENEXR_VERSION_MINOR})
|
||||
|
||||
|
||||
# enable the tests
|
||||
ENABLE_TESTING()
|
||||
|
||||
|
||||
# distro building
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${OPENEXR_VERSION_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${OPENEXR_VERSION_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${OPENEXR_VERSION_PATCH}")
|
||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
||||
"${CMAKE_PROJECT_NAME}-${OPENEXR_VERSION}"
|
||||
)
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
"/.git*;/.cvs*;${CPACK_SOURCE_IGNORE_FILES}")
|
||||
INCLUDE ( CPack )
|
||||
|
||||
|
||||
|
||||
# Allow the developer to select if Dynamic or Static libraries are built
|
||||
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON)
|
||||
OPTION (USE_ZLIB_WINAPI "Use ZLib Win API" OFF)
|
||||
OPTION (NAMESPACE_VERSIONING "Use Namespace Versioning" ON)
|
||||
OPTION (BUILD_UTILS "Build the binary/utility programs" ON)
|
||||
OPTION (BUILD_TESTS "Build the tests" ON)
|
||||
|
||||
# Setup osx rpathing
|
||||
SET (CMAKE_MACOSX_RPATH 1)
|
||||
SET (BUILD_WITH_INSTALL_RPATH 1)
|
||||
|
||||
ADD_DEFINITIONS ( -DHAVE_CONFIG_H -DILM_IMF_TEST_IMAGEDIR="${CMAKE_SOURCE_DIR}/IlmImfTest/" )
|
||||
|
||||
INCLUDE_DIRECTORIES (
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config
|
||||
IlmImf
|
||||
IlmImfUtil
|
||||
exrmaketiled
|
||||
exrenvmap
|
||||
exrmakepreview
|
||||
exrmultiview
|
||||
IlmImfFuzzTest
|
||||
)
|
||||
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
|
||||
|
||||
IF (NOT WIN32)
|
||||
SET ( PTHREAD_LIB pthread )
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES ( ${ILMBASE_PACKAGE_PREFIX}/include/OpenEXR )
|
||||
LINK_DIRECTORIES ( ${ILMBASE_PACKAGE_PREFIX}/lib )
|
||||
MESSAGE ( "ILMBASE_PACKAGE_PREFIX = " ${ILMBASE_PACKAGE_PREFIX})
|
||||
|
||||
SET (LIB_TYPE STATIC)
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
# User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
|
||||
SET (LIB_TYPE SHARED)
|
||||
IF (WIN32)
|
||||
ADD_DEFINITIONS(-DOPENEXR_DLL)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
IF (USE_ZLIB_WINAPI)
|
||||
ADD_DEFINITIONS(-DZLIB_WINAPI)
|
||||
ENDIF ()
|
||||
|
||||
# Test for GCC-style inline asm support with AVX instructions
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
CHECK_CXX_SOURCE_COMPILES (
|
||||
"
|
||||
int main()
|
||||
{
|
||||
#if defined(__GNUC__) && defined(__SSE2__)
|
||||
int n = 0;
|
||||
int eax = 0;
|
||||
int edx = 0;
|
||||
__asm__(
|
||||
\"xgetbv ;\"
|
||||
\"vzeroupper \"
|
||||
: \"=a\"(eax), \"=d\"(edx) : \"c\"(n) : );
|
||||
#else
|
||||
#error No GCC style inline asm supported for AVX instructions
|
||||
#endif
|
||||
}
|
||||
" HAVE_GCC_INLINE_ASM_AVX)
|
||||
|
||||
# Check if sysconf(_SC_NPROCESSORS_ONLN) can be used for CPU count
|
||||
CHECK_CXX_SOURCE_COMPILES (
|
||||
"
|
||||
#include <unistd.h>
|
||||
int main()
|
||||
{
|
||||
sysconf(_SC_NPROCESSORS_ONLN);
|
||||
}
|
||||
" HAVE_SYSCONF_NPROCESSORS_ONLN)
|
||||
|
||||
|
||||
##########################
|
||||
# OpenEXRConfig.h generation
|
||||
##########################
|
||||
IF (WIN32)
|
||||
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1\n" )
|
||||
ELSEIF (APPLE)
|
||||
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_DARWIN 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#include <string.h>\n" )
|
||||
ELSE ()
|
||||
# Linux
|
||||
FILE ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_LINUX_PROCFS 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_LARGE_STACK 1\n" )
|
||||
ENDIF()
|
||||
|
||||
IF (NAMESPACE_VERSIONING)
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 1\n")
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_NAMESPACE Imf\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_${OPENEXR_VERSION_API}\n\n" )
|
||||
ELSE ()
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 0\n")
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_NAMESPACE Imf\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf\n\n" )
|
||||
ENDIF ()
|
||||
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_VERSION_STRING \"${OPENEXR_VERSION}\"\n" )
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_PACKAGE_STRING \"OpenEXR ${OPENEXR_VERSION}\"\n" )
|
||||
|
||||
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "
|
||||
#define OPENEXR_VERSION_MAJOR ${OPENEXR_VERSION_MAJOR}
|
||||
#define OPENEXR_VERSION_MINOR ${OPENEXR_VERSION_MINOR}
|
||||
#define OPENEXR_VERSION_PATCH ${OPENEXR_VERSION_PATCH}
|
||||
")
|
||||
|
||||
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "
|
||||
// Version as a single hex number, e.g. 0x01000300 == 1.0.3
|
||||
#define OPENEXR_VERSION_HEX ((OPENEXR_VERSION_MAJOR << 24) | \\
|
||||
(OPENEXR_VERSION_MINOR << 16) | \\
|
||||
(OPENEXR_VERSION_PATCH << 8))\n
|
||||
")
|
||||
|
||||
IF (HAVE_GCC_INLINE_ASM_AVX)
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX 1\n" )
|
||||
ENDIF()
|
||||
|
||||
IF (HAVE_SYSCONF_NPROCESSORS_ONLN)
|
||||
FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN 1\n" )
|
||||
ENDIF()
|
||||
|
||||
SET (OPENEXR_LIBSUFFIX "")
|
||||
SET (ILMBASE_LIBSUFFIX "")
|
||||
IF (NAMESPACE_VERSIONING)
|
||||
SET ( OPENEXR_LIBSUFFIX "-${OPENEXR_VERSION_API}" )
|
||||
# assume same NAMESPACE_VERSION setting for IlmBase for now
|
||||
SET ( ILMBASE_LIBSUFFIX "-${OPENEXR_VERSION_API}" )
|
||||
ENDIF ()
|
||||
|
||||
##########################
|
||||
# IlmImf library
|
||||
##########################
|
||||
ADD_SUBDIRECTORY ( IlmImf )
|
||||
|
||||
SET_TARGET_PROPERTIES ( IlmImf
|
||||
PROPERTIES
|
||||
VERSION 22.0.0
|
||||
SOVERSION 22
|
||||
OUTPUT_NAME "IlmImf${OPENEXR_LIBSUFFIX}"
|
||||
)
|
||||
|
||||
##########################
|
||||
# IlmImfUtil library
|
||||
##########################
|
||||
ADD_SUBDIRECTORY ( IlmImfUtil )
|
||||
|
||||
SET_TARGET_PROPERTIES ( IlmImfUtil
|
||||
PROPERTIES
|
||||
VERSION 22.0.0
|
||||
SOVERSION 22
|
||||
OUTPUT_NAME "IlmImfUtil${OPENEXR_LIBSUFFIX}"
|
||||
)
|
||||
|
||||
##########################
|
||||
# Example Code
|
||||
##########################
|
||||
ADD_SUBDIRECTORY ( IlmImfExamples )
|
||||
|
||||
|
||||
##########################
|
||||
# Tests
|
||||
##########################
|
||||
if (BUILD_TESTS)
|
||||
ADD_SUBDIRECTORY ( IlmImfTest )
|
||||
ADD_SUBDIRECTORY ( IlmImfUtilTest )
|
||||
ADD_SUBDIRECTORY ( IlmImfFuzzTest )
|
||||
endif ()
|
||||
|
||||
|
||||
##########################
|
||||
# Binaries / Utilities
|
||||
##########################
|
||||
if (BUILD_UTILS)
|
||||
ADD_SUBDIRECTORY ( exrheader )
|
||||
ADD_SUBDIRECTORY ( exrmaketiled )
|
||||
ADD_SUBDIRECTORY ( exrstdattr )
|
||||
ADD_SUBDIRECTORY ( exrmakepreview )
|
||||
ADD_SUBDIRECTORY ( exrenvmap )
|
||||
ADD_SUBDIRECTORY ( exrmultiview )
|
||||
ADD_SUBDIRECTORY ( exrmultipart )
|
||||
endif ()
|
||||
|
||||
|
||||
##########################
|
||||
# Installation
|
||||
##########################
|
||||
|
||||
INSTALL ( FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/include/OpenEXR
|
||||
)
|
||||
|
||||
# Documentation
|
||||
INSTALL ( FILES
|
||||
doc/TechnicalIntroduction.pdf
|
||||
doc/ReadingAndWritingImageFiles.pdf
|
||||
doc/OpenEXRFileLayout.pdf
|
||||
doc/MultiViewOpenEXR.pdf
|
||||
doc/InterpretingDeepPixels.pdf
|
||||
doc/TheoryDeepPixels.pdf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/share/doc/OpenEXR-${OPENEXR_VERSION}
|
||||
)
|
||||
|
||||
# Examples
|
||||
INSTALL ( FILES
|
||||
IlmImfExamples/main.cpp
|
||||
IlmImfExamples/drawImage.cpp
|
||||
IlmImfExamples/rgbaInterfaceExamples.cpp
|
||||
IlmImfExamples/rgbaInterfaceTiledExamples.cpp
|
||||
IlmImfExamples/generalInterfaceExamples.cpp
|
||||
IlmImfExamples/lowLevelIoExamples.cpp
|
||||
IlmImfExamples/previewImageExamples.cpp
|
||||
IlmImfExamples/generalInterfaceTiledExamples.cpp
|
||||
IlmImfExamples/generalInterfaceTiledExamples.h
|
||||
IlmImfExamples/drawImage.h
|
||||
IlmImfExamples/rgbaInterfaceExamples.h
|
||||
IlmImfExamples/generalInterfaceExamples.h
|
||||
IlmImfExamples/rgbaInterfaceTiledExamples.h
|
||||
IlmImfExamples/lowLevelIoExamples.h
|
||||
IlmImfExamples/previewImageExamples.h
|
||||
IlmImfExamples/namespaceAlias.h
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/share/doc/OpenEXR-${OPENEXR_VERSION}/examples
|
||||
)
|
||||
@@ -0,0 +1,273 @@
|
||||
# yue.nicholas@gmail.com
|
||||
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR 1)
|
||||
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h")
|
||||
ADD_EXECUTABLE ( b44ExpLogTable
|
||||
b44ExpLogTable.cpp
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES ( b44ExpLogTable
|
||||
Half
|
||||
Iex${ILMBASE_LIBSUFFIX}
|
||||
IlmThread${ILMBASE_LIBSUFFIX}
|
||||
${PTHREAD_LIB}
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/b44ExpLogTable > ${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h
|
||||
DEPENDS b44ExpLogTable
|
||||
)
|
||||
else ()
|
||||
message (STATUS "Skipping build of b44ExpLogTable.h")
|
||||
endif ()
|
||||
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h")
|
||||
ADD_EXECUTABLE ( dwaLookups
|
||||
dwaLookups.cpp
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES ( dwaLookups
|
||||
Half
|
||||
Iex${ILMBASE_LIBSUFFIX}
|
||||
IlmThread${ILMBASE_LIBSUFFIX}
|
||||
${PTHREAD_LIB}
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND (
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/dwaLookups > ${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h
|
||||
DEPENDS dwaLookups
|
||||
)
|
||||
else ()
|
||||
message (STATUS "Skipping build of dwaLookups.h")
|
||||
endif ()
|
||||
|
||||
SET ( ILMIMF_SRCS
|
||||
ImfAttribute.cpp
|
||||
ImfBoxAttribute.cpp
|
||||
ImfCRgbaFile.cpp
|
||||
ImfChannelList.cpp
|
||||
ImfChannelListAttribute.cpp
|
||||
ImfFloatAttribute.cpp
|
||||
ImfFrameBuffer.cpp
|
||||
ImfHeader.cpp
|
||||
ImfIO.cpp
|
||||
ImfInputFile.cpp
|
||||
ImfIntAttribute.cpp
|
||||
ImfLineOrderAttribute.cpp
|
||||
ImfMatrixAttribute.cpp
|
||||
ImfOpaqueAttribute.cpp
|
||||
ImfOutputFile.cpp
|
||||
ImfRgbaFile.cpp
|
||||
ImfStringAttribute.cpp
|
||||
ImfVecAttribute.cpp
|
||||
ImfHuf.cpp
|
||||
ImfThreading.cpp
|
||||
ImfWav.cpp
|
||||
ImfLut.cpp
|
||||
ImfCompressor.cpp
|
||||
ImfRleCompressor.cpp
|
||||
ImfZipCompressor.cpp
|
||||
ImfPizCompressor.cpp
|
||||
ImfB44Compressor.cpp
|
||||
ImfDwaCompressor.cpp
|
||||
ImfMisc.cpp
|
||||
ImfCompressionAttribute.cpp
|
||||
ImfDoubleAttribute.cpp
|
||||
ImfConvert.cpp
|
||||
ImfPreviewImage.cpp
|
||||
ImfPreviewImageAttribute.cpp
|
||||
ImfVersion.cpp
|
||||
ImfChromaticities.cpp
|
||||
ImfChromaticitiesAttribute.cpp
|
||||
ImfKeyCode.cpp
|
||||
ImfKeyCodeAttribute.cpp
|
||||
ImfTimeCode.cpp
|
||||
ImfTimeCodeAttribute.cpp
|
||||
ImfRational.cpp
|
||||
ImfRationalAttribute.cpp
|
||||
ImfFramesPerSecond.cpp
|
||||
ImfStandardAttributes.cpp
|
||||
ImfStdIO.cpp
|
||||
ImfEnvmap.cpp
|
||||
ImfEnvmapAttribute.cpp
|
||||
ImfScanLineInputFile.cpp
|
||||
ImfTiledInputFile.cpp
|
||||
ImfTiledMisc.cpp
|
||||
ImfTiledOutputFile.cpp
|
||||
ImfTiledRgbaFile.cpp
|
||||
ImfTileDescriptionAttribute.cpp
|
||||
ImfTileOffsets.cpp
|
||||
ImfRgbaYca.cpp
|
||||
ImfPxr24Compressor.cpp
|
||||
ImfTestFile.cpp
|
||||
ImfStringVectorAttribute.cpp
|
||||
ImfMultiView.cpp
|
||||
ImfAcesFile.cpp
|
||||
ImfMultiPartOutputFile.cpp
|
||||
ImfGenericOutputFile.cpp
|
||||
ImfOutputPartData.cpp
|
||||
ImfMultiPartInputFile.cpp
|
||||
ImfGenericInputFile.cpp
|
||||
ImfPartType.cpp
|
||||
ImfInputPartData.cpp
|
||||
ImfOutputPart.cpp
|
||||
ImfTiledOutputPart.cpp
|
||||
ImfInputPart.cpp
|
||||
ImfTiledInputPart.cpp
|
||||
ImfDeepScanLineInputPart.cpp
|
||||
ImfDeepScanLineOutputPart.cpp
|
||||
ImfDeepScanLineInputFile.cpp
|
||||
ImfDeepScanLineOutputFile.cpp
|
||||
ImfDeepTiledInputPart.cpp
|
||||
ImfDeepTiledOutputPart.cpp
|
||||
ImfDeepTiledInputFile.cpp
|
||||
ImfDeepTiledOutputFile.cpp
|
||||
ImfDeepFrameBuffer.cpp
|
||||
ImfDeepCompositing.cpp
|
||||
ImfCompositeDeepScanLine.cpp
|
||||
ImfDeepImageStateAttribute.cpp
|
||||
ImfFastHuf.cpp
|
||||
ImfFloatVectorAttribute.cpp
|
||||
ImfRle.cpp
|
||||
ImfSystemSpecific.cpp
|
||||
ImfZip.cpp
|
||||
)
|
||||
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
ADD_DEFINITIONS(-DILMIMF_EXPORTS)
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY ( IlmImf ${LIB_TYPE}
|
||||
${ILMIMF_SRCS}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES ( IlmImf
|
||||
Half
|
||||
Iex${ILMBASE_LIBSUFFIX}
|
||||
Imath${ILMBASE_LIBSUFFIX}
|
||||
IlmThread${ILMBASE_LIBSUFFIX}
|
||||
${PTHREAD_LIB} ${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
ADD_DEPENDENCIES ( IlmImf b44ExpLogTable )
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES (
|
||||
ImfB44Compressor.cpp
|
||||
PROPERTIES
|
||||
OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/b44ExpLogTable.h
|
||||
)
|
||||
|
||||
|
||||
ADD_DEPENDENCIES ( IlmImf dwaLookups )
|
||||
|
||||
SET_SOURCE_FILES_PROPERTIES (
|
||||
ImfDwaCompressor.cpp
|
||||
PROPERTIES
|
||||
OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dwaLookups.h
|
||||
)
|
||||
|
||||
# Libraries
|
||||
|
||||
INSTALL ( TARGETS
|
||||
IlmImf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
# Headers
|
||||
INSTALL ( FILES
|
||||
ImfForward.h
|
||||
ImfExport.h
|
||||
ImfAttribute.h
|
||||
ImfBoxAttribute.h
|
||||
ImfCRgbaFile.h
|
||||
ImfChannelList.h
|
||||
ImfChannelListAttribute.h
|
||||
ImfCompressionAttribute.h
|
||||
ImfDoubleAttribute.h
|
||||
ImfFloatAttribute.h
|
||||
ImfFrameBuffer.h
|
||||
ImfHeader.h
|
||||
ImfIO.h
|
||||
ImfInputFile.h
|
||||
ImfIntAttribute.h
|
||||
ImfLineOrderAttribute.h
|
||||
ImfMatrixAttribute.h
|
||||
ImfOpaqueAttribute.h
|
||||
ImfOutputFile.h
|
||||
ImfRgbaFile.h
|
||||
ImfStringAttribute.h
|
||||
ImfVecAttribute.h
|
||||
ImfHuf.h
|
||||
ImfWav.h
|
||||
ImfLut.h
|
||||
ImfArray.h
|
||||
ImfCompression.h
|
||||
ImfLineOrder.h
|
||||
ImfName.h
|
||||
ImfPixelType.h
|
||||
ImfVersion.h
|
||||
ImfXdr.h
|
||||
ImfConvert.h
|
||||
ImfPreviewImage.h
|
||||
ImfPreviewImageAttribute.h
|
||||
ImfChromaticities.h
|
||||
ImfChromaticitiesAttribute.h
|
||||
ImfKeyCode.h
|
||||
ImfKeyCodeAttribute.h
|
||||
ImfTimeCode.h
|
||||
ImfTimeCodeAttribute.h
|
||||
ImfRational.h
|
||||
ImfRationalAttribute.h
|
||||
ImfFramesPerSecond.h
|
||||
ImfStandardAttributes.h
|
||||
ImfEnvmap.h
|
||||
ImfEnvmapAttribute.h
|
||||
ImfInt64.h
|
||||
ImfRgba.h
|
||||
ImfTileDescription.h
|
||||
ImfTileDescriptionAttribute.h
|
||||
ImfTiledInputFile.h
|
||||
ImfTiledOutputFile.h
|
||||
ImfTiledRgbaFile.h
|
||||
ImfRgbaYca.h
|
||||
ImfTestFile.h
|
||||
ImfThreading.h
|
||||
ImfB44Compressor.h
|
||||
ImfStringVectorAttribute.h
|
||||
ImfMultiView.h
|
||||
ImfAcesFile.h
|
||||
ImfMultiPartOutputFile.h
|
||||
ImfGenericOutputFile.h
|
||||
ImfMultiPartInputFile.h
|
||||
ImfGenericInputFile.h
|
||||
ImfPartType.h
|
||||
ImfPartHelper.h
|
||||
ImfOutputPart.h
|
||||
ImfTiledOutputPart.h
|
||||
ImfInputPart.h
|
||||
ImfTiledInputPart.h
|
||||
ImfDeepScanLineOutputFile.h
|
||||
ImfDeepScanLineOutputPart.h
|
||||
ImfDeepScanLineInputFile.h
|
||||
ImfDeepScanLineInputPart.h
|
||||
ImfDeepTiledInputFile.h
|
||||
ImfDeepTiledInputPart.h
|
||||
ImfDeepTiledOutputFile.h
|
||||
ImfDeepTiledOutputPart.h
|
||||
ImfDeepFrameBuffer.h
|
||||
ImfDeepCompositing.h
|
||||
ImfCompositeDeepScanLine.h
|
||||
ImfNamespace.h
|
||||
ImfMisc.h
|
||||
ImfDeepImageState.h
|
||||
ImfDeepImageStateAttribute.h
|
||||
ImfFloatVectorAttribute.h
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/include/OpenEXR
|
||||
)
|
||||
|
||||
@@ -6,5 +6,5 @@ includedir=${prefix}/include
|
||||
Name: OpenImageIO
|
||||
Description: OpenImageIO is a library for reading and writing images.
|
||||
Version: @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.@PROJECT_VERSION_TWEAK@
|
||||
Libs: -L${libdir} -lOpenImageIO -lOpenImageIO_Util
|
||||
Libs: -L${libdir} -lOpenImageIO
|
||||
Cflags: -I${includedir}
|
||||
|
||||
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
# Utility script to download and build OpenJPEG
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -32,20 +32,16 @@ if [[ ! -e ${OPENJPEG_SRC_DIR} ]] ; then
|
||||
git clone ${OPENJPEG_REPO} ${OPENJPEG_SRC_DIR}
|
||||
fi
|
||||
cd ${OPENJPEG_SRC_DIR}
|
||||
|
||||
echo "git checkout ${OPENJPEG_VERSION} --force"
|
||||
git checkout ${OPENJPEG_VERSION} --force
|
||||
|
||||
mkdir -p ${OPENJPEG_BUILD_DIR} && true
|
||||
cd ${OPENJPEG_BUILD_DIR}
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${OPENJPEG_INSTALL_DIR} \
|
||||
-DBUILD_CODEC=OFF \
|
||||
${OPENJPEG_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
fi
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${OPENJPEG_INSTALL_DIR} \
|
||||
-DBUILD_CODEC=OFF \
|
||||
${OPENJPEG_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
# ls -R ${OPENJPEG_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Utility script to download and build Ptex
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Utility script to download and build cmake
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Utility script to download and build giflib
|
||||
@@ -22,24 +22,17 @@ echo "giflib install dir will be: ${GIFLIB_INSTALL_DIR}"
|
||||
mkdir -p ${LOCAL_DEPS_DIR}
|
||||
pushd ${LOCAL_DEPS_DIR}
|
||||
|
||||
|
||||
# Clone giflib project and build
|
||||
if [[ ! -e giflib-${GIFLIB_VERSION} ]] ; then
|
||||
curl --location https://downloads.sourceforge.net/project/giflib/giflib-${GIFLIB_VERSION}.tar.gz -o giflib.tar.gz
|
||||
tar xzf giflib.tar.gz
|
||||
pushd giflib-${GIFLIB_VERSION}
|
||||
cp Makefile Makefile.old
|
||||
curl --location https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch -o Makefile.patch
|
||||
patch -p0 < Makefile.patch
|
||||
popd
|
||||
fi
|
||||
|
||||
curl --location https://downloads.sourceforge.net/project/giflib/giflib-${GIFLIB_VERSION}.tar.gz -o giflib.tar.gz
|
||||
tar xzf giflib.tar.gz
|
||||
pushd giflib-${GIFLIB_VERSION}
|
||||
cp Makefile Makefile.old
|
||||
curl --location https://sourceforge.net/p/giflib/bugs/_discuss/thread/4e811ad29b/c323/attachment/Makefile.patch -o Makefile.patch
|
||||
patch -p0 < Makefile.patch
|
||||
popd
|
||||
|
||||
cd giflib-${GIFLIB_VERSION}
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time make PREFIX=${GIFLIB_INSTALL_DIR} CC=${GIFLIB_CC} install
|
||||
fi
|
||||
time make PREFIX=${GIFLIB_INSTALL_DIR} CC=${GIFLIB_CC} install
|
||||
|
||||
popd
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Utility script to download and build libjpeg-turbo
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -38,13 +38,10 @@ git checkout ${LIBJPEGTURBO_VERSION} --force
|
||||
|
||||
mkdir -p ${LIBJPEGTURBO_BUILD_DIR}
|
||||
cd ${LIBJPEGTURBO_BUILD_DIR}
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBJPEGTURBO_INSTALL_DIR} \
|
||||
${LIBJPEGTURBO_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
fi
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBJPEGTURBO_INSTALL_DIR} \
|
||||
${LIBJPEGTURBO_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
# ls -R ${LIBJPEGTURBO_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Utility script to download and build libpng
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -33,22 +33,17 @@ if [[ ! -e ${LIBPNG_SRC_DIR} ]] ; then
|
||||
git clone ${LIBPNG_REPO} ${LIBPNG_SRC_DIR}
|
||||
fi
|
||||
cd ${LIBPNG_SRC_DIR}
|
||||
|
||||
|
||||
echo "git checkout ${LIBPNG_VERSION} --force"
|
||||
git checkout ${LIBPNG_VERSION} --force
|
||||
|
||||
mkdir -p ${LIBPNG_BUILD_DIR}
|
||||
cd ${LIBPNG_BUILD_DIR}
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBPNG_INSTALL_DIR} \
|
||||
-DPNG_EXECUTABLES=OFF \
|
||||
-DPNG_TESTS=OFF \
|
||||
${LIBPNG_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
fi
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBPNG_INSTALL_DIR} \
|
||||
-DPNG_EXECUTABLES=OFF \
|
||||
-DPNG_TESTS=OFF \
|
||||
${LIBPNG_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
# ls -R ${LIBPNG_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Utility script to download and build LibRaw
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -37,15 +33,12 @@ mkdir -p ${LIBRAW_INSTALL_DIR} && true
|
||||
mkdir -p ${LIBRAW_BUILD_DIR} && true
|
||||
|
||||
pushd ${LIBRAW_SOURCE_DIR}
|
||||
|
||||
git checkout ${LIBRAW_VERSION} --force
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
aclocal
|
||||
autoreconf --install
|
||||
./configure --prefix=${LIBRAW_INSTALL_DIR}
|
||||
time make -j ${PARALLEL:=4} && make install
|
||||
fi
|
||||
aclocal
|
||||
autoreconf --install
|
||||
./configure --prefix=${LIBRAW_INSTALL_DIR}
|
||||
time make -j ${PARALLEL:=4} && make install
|
||||
|
||||
popd
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Utility script to download and build libtiff
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -13,8 +9,7 @@ LIBTIFF_REPO=${LIBTIFF_REPO:=https://gitlab.com/libtiff/libtiff.git}
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
LIBTIFF_BUILD_DIR=${LIBTIFF_BUILD_DIR:=${LOCAL_DEPS_DIR}/libtiff}
|
||||
LIBTIFF_INSTALL_DIR=${LIBTIFF_INSTALL_DIR:=${PWD}/ext/dist}
|
||||
LIBTIFF_VERSION=${LIBTIFF_VERSION:=v4.3.0}
|
||||
LIBTIFF_BUILD_TYPE=${LIBTIFF_BUILD_TYPE:=Release}
|
||||
LIBTIFF_VERSION=${LIBTIFF_VERSION:=v4.1.0}
|
||||
if [[ `uname` == `Linux` ]] ; then
|
||||
LIBTIFF_CXX_FLAGS=${LIBTIFF_CXX_FLAGS:="-O3 -Wno-unused-function -Wno-deprecated-declarations -Wno-cast-qual -Wno-write-strings"}
|
||||
fi
|
||||
@@ -35,19 +30,13 @@ cd libtiff
|
||||
|
||||
echo "git checkout ${LIBTIFF_VERSION} --force"
|
||||
git checkout ${LIBTIFF_VERSION} --force
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=${LIBTIFF_BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBTIFF_INSTALL_DIR} \
|
||||
-DCMAKE_CXX_FLAGS="${LIBTIFF_CXX_FLAGS}" \
|
||||
-DBUILD_SHARED_LIBS=${LIBTIFF_BUILD_SHARED_LIBS:-ON} \
|
||||
${LIBTIFF_BUILDOPTS} ..
|
||||
time cmake --build . --target install
|
||||
fi
|
||||
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${LIBTIFF_INSTALL_DIR} \
|
||||
-DCMAKE_CXX_FLAGS="${LIBTIFF_CXX_FLAGS}" \
|
||||
${LIBTIFF_BUILDOPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
popd
|
||||
|
||||
# ls -R ${LIBTIFF_INSTALL_DIR}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Utility script to download and build LLVM & clang
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
@@ -14,13 +10,27 @@ uname
|
||||
|
||||
|
||||
if [[ `uname` == "Linux" ]] ; then
|
||||
: ${LLVM_VERSION:=13.0.0}
|
||||
: ${LLVM_INSTALL_DIR:=${PWD}/llvm-install}
|
||||
: ${LLVM_DISTRO_NAME:=ubuntu-18.04}
|
||||
LLVMTAR=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-${LLVM_DISTRO_NAME}.tar.xz
|
||||
LLVM_VERSION=${LLVM_VERSION:=8.0.0}
|
||||
LLVM_INSTALL_DIR=${LLVM_INSTALL_DIR:=${PWD}/llvm-install}
|
||||
if [[ "$GITHUB_WORKFLOW" != "" ]] ; then
|
||||
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-18.04}
|
||||
elif [[ "$TRAVIS_DIST" == "trusty" ]] ; then
|
||||
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-14.04}
|
||||
elif [[ "$TRAVIS_DIST" == "xenial" ]] ; then
|
||||
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-16.04}
|
||||
elif [[ "$TRAVIS_DIST" == "bionic" ]] ; then
|
||||
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=ubuntu-18.04}
|
||||
else
|
||||
LLVM_DISTRO_NAME=${LLVM_DISTRO_NAME:=error}
|
||||
fi
|
||||
if [ "$LLVM_VERSION" == "5.0.0" ] ; then
|
||||
LLVMTAR=clang+llvm-${LLVM_VERSION}-linux-x86_64-${LLVM_DISTRO_NAME}.tar.xz
|
||||
else
|
||||
LLVMTAR=clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-${LLVM_DISTRO_NAME}.tar.xz
|
||||
fi
|
||||
echo LLVMTAR = $LLVMTAR
|
||||
curl --location https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
|
||||
ls -l $LLVMTAR
|
||||
curl --location http://releases.llvm.org/${LLVM_VERSION}/${LLVMTAR} -o $LLVMTAR
|
||||
# ls -l $LLVMTAR
|
||||
tar xf $LLVMTAR
|
||||
rm -f $LLVMTAR
|
||||
echo "Installed ${LLVM_VERSION} in ${LLVM_INSTALL_DIR}"
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Utility script to download and build OpenColorIO
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -11,11 +7,11 @@ set -ex
|
||||
|
||||
# Which OCIO to retrieve, how to build it
|
||||
OPENCOLORIO_REPO=${OPENCOLORIO_REPO:=https://github.com/AcademySoftwareFoundation/OpenColorIO.git}
|
||||
OPENCOLORIO_VERSION=${OPENCOLORIO_VERSION:=v2.2.1}
|
||||
OPENCOLORIO_VERSION=${OPENCOLORIO_VERSION:=v2.0.1}
|
||||
|
||||
# Where to install the final results
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
OPENCOLORIO_SOURCE_DIR=${OPENCOLORIO_SOURCE_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO}
|
||||
OPENCOLORIO_SOURCE_DIR=${OPENCOLORIO_BUILD_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO}
|
||||
OPENCOLORIO_BUILD_DIR=${OPENCOLORIO_BUILD_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO-build}
|
||||
OPENCOLORIO_INSTALL_DIR=${OPENCOLORIO_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
|
||||
OPENCOLORIO_CXX_FLAGS=${OPENCOLORIO_CXX_FLAGS:="-Wno-unused-function -Wno-deprecated-declarations -Wno-cast-qual -Wno-write-strings"}
|
||||
@@ -25,7 +21,7 @@ OPENCOLORIO_BUILDOPTS="-DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_NUKE=OFF \
|
||||
-DOCIO_BUILD_GPU_TESTS=OFF \
|
||||
-DOCIO_BUILD_PYTHON=OFF -DOCIO_BUILD_PYGLUE=OFF \
|
||||
-DOCIO_BUILD_JAVA=OFF \
|
||||
-DBUILD_SHARED_LIBS=${OPENCOLORIO_BUILD_SHARED_LIBS:=ON}"
|
||||
-DOCIO_BUILD_STATIC=${OCIO_BUILD_STATIC:=OFF}"
|
||||
BASEDIR=`pwd`
|
||||
pwd
|
||||
echo "OpenColorIO install dir will be: ${OPENCOLORIO_INSTALL_DIR}"
|
||||
@@ -34,20 +30,20 @@ mkdir -p ${LOCAL_DEPS_DIR}
|
||||
pushd ${LOCAL_DEPS_DIR}
|
||||
|
||||
# Clone OpenColorIO project from GitHub and build
|
||||
if [[ ! -e ${OPENCOLORIO_SOURCE_DIR} ]] ; then
|
||||
echo "git clone ${OPENCOLORIO_REPO} ${OPENCOLORIO_SOURCE_DIR}"
|
||||
git clone ${OPENCOLORIO_REPO} ${OPENCOLORIO_SOURCE_DIR}
|
||||
if [[ ! -e OpenColorIO ]] ; then
|
||||
echo "git clone ${OPENCOLORIO_REPO} OpenColorIO"
|
||||
git clone ${OPENCOLORIO_REPO} OpenColorIO
|
||||
fi
|
||||
cd ${OPENCOLORIO_SOURCE_DIR}
|
||||
cd OpenColorIO
|
||||
|
||||
echo "git checkout ${OPENCOLORIO_VERSION} --force"
|
||||
git checkout ${OPENCOLORIO_VERSION} --force
|
||||
mkdir -p ${OPENCOLORIO_BUILD_DIR}
|
||||
cd ${OPENCOLORIO_BUILD_DIR}
|
||||
mkdir -p build
|
||||
cd build
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${OPENCOLORIO_INSTALL_DIR} \
|
||||
-DCMAKE_CXX_FLAGS="${OPENCOLORIO_CXX_FLAGS}" \
|
||||
${OPENCOLORIO_BUILDOPTS} ${OPENCOLORIO_SOURCE_DIR}
|
||||
${OPENCOLORIO_BUILDOPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
popd
|
||||
|
||||
|
||||
@@ -2,16 +2,12 @@
|
||||
|
||||
# Utility script to download and build OpenEXR & IlmBase
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
set -ex
|
||||
|
||||
# Which OpenEXR to retrieve, how to build it
|
||||
OPENEXR_REPO=${OPENEXR_REPO:=https://github.com/AcademySoftwareFoundation/openexr.git}
|
||||
OPENEXR_VERSION=${OPENEXR_VERSION:=v3.1.9}
|
||||
OPENEXR_VERSION=${OPENEXR_VERSION:=v2.4.1}
|
||||
|
||||
# Where to install the final results
|
||||
LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
@@ -19,6 +15,7 @@ OPENEXR_SOURCE_DIR=${OPENEXR_SOURCE_DIR:=${LOCAL_DEPS_DIR}/openexr}
|
||||
OPENEXR_BUILD_DIR=${OPENEXR_BUILD_DIR:=${LOCAL_DEPS_DIR}/openexr-build}
|
||||
OPENEXR_INSTALL_DIR=${OPENEXR_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
|
||||
OPENEXR_BUILD_TYPE=${OPENEXR_BUILD_TYPE:=Release}
|
||||
CMAKE_GENERATOR=${CMAKE_GENERATOR:="Unix Makefiles"}
|
||||
OPENEXR_CMAKE_FLAGS=${OPENEXR_CMAKE_FLAGS:=""}
|
||||
OPENEXR_CXX_FLAGS=${OPENEXR_CXX_FLAGS:=""}
|
||||
BASEDIR=$PWD
|
||||
@@ -27,24 +24,49 @@ pwd
|
||||
echo "Building OpenEXR ${OPENEXR_VERSION}"
|
||||
echo "OpenEXR build dir will be: ${OPENEXR_BUILD_DIR}"
|
||||
echo "OpenEXR install dir will be: ${OPENEXR_INSTALL_DIR}"
|
||||
echo "OpenEXR Build type is ${OPENEXR_BUILD_TYPE}"
|
||||
echo "CMAKE_PREFIX_PATH is ${CMAKE_PREFIX_PATH}"
|
||||
echo "OpenEXR Build type is ${OPENEXR_BUILD_TYPE}"
|
||||
|
||||
if [[ "$CMAKE_GENERATOR" == "" ]] ; then
|
||||
OPENEXR_GENERATOR_CMD="-G \"$CMAKE_GENERATOR\""
|
||||
fi
|
||||
|
||||
# Clone OpenEXR project (including IlmBase) from GitHub and build
|
||||
if [[ ! -e ${OPENEXR_SOURCE_DIR} ]] ; then
|
||||
echo "git clone ${OPENEXR_REPO} ${OPENEXR_SOURCE_DIR}"
|
||||
git clone ${OPENEXR_REPO} ${OPENEXR_SOURCE_DIR}
|
||||
fi
|
||||
|
||||
mkdir -p ${OPENEXR_INSTALL_DIR} && true
|
||||
mkdir -p ${OPENEXR_BUILD_DIR} && true
|
||||
|
||||
pushd ${OPENEXR_SOURCE_DIR}
|
||||
git checkout ${OPENEXR_VERSION} --force
|
||||
|
||||
if [[ ${OPENEXR_VERSION} == "v2.3.0" ]] ; then
|
||||
if [[ ${OPENEXR_VERSION} == "v2.2.0" ]] || [[ ${OPENEXR_VERSION} == "v2.2.1" ]] \
|
||||
|| [[ ${OPENEXR_VERSION} == "v2.2.2" ]] ; then
|
||||
mkdir -p ${OPENEXR_BUILD_DIR}/IlmBase && true
|
||||
mkdir -p ${OPENEXR_BUILD_DIR}/OpenEXR && true
|
||||
cd ${OPENEXR_BUILD_DIR}/IlmBase
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} ${OPENEXR_GENERATOR_CMD} \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
|
||||
-DCMAKE_CXX_STANDARD=11 \
|
||||
${OPENEXR_CMAKE_FLAGS} ${OPENEXR_SOURCE_DIR}/IlmBase
|
||||
time cmake --build . --target install --config ${OPENEXR_BUILD_TYPE}
|
||||
cd ${OPENEXR_BUILD_DIR}/OpenEXR
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} ${OPENEXR_GENERATOR_CMD} \
|
||||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}\;${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DBUILD_UTILS=0 -DBUILD_TESTS=0 \
|
||||
-DCMAKE_CXX_FLAGS="${OPENEXR_CXX_FLAGS}" \
|
||||
${OPENEXR_CMAKE_FLAGS} ${OPENEXR_SOURCE_DIR}/OpenEXR
|
||||
time cmake --build . --target install --config ${OPENEXR_BUILD_TYPE}
|
||||
elif [[ ${OPENEXR_VERSION} == "v2.3.0" ]] ; then
|
||||
# Simplified setup for 2.3+
|
||||
cd ${OPENEXR_BUILD_DIR}
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} \
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} -G "$CMAKE_GENERATOR" \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
|
||||
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
@@ -57,7 +79,7 @@ if [[ ${OPENEXR_VERSION} == "v2.3.0" ]] ; then
|
||||
else
|
||||
# Simplified setup for 2.4+
|
||||
cd ${OPENEXR_BUILD_DIR}
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} \
|
||||
cmake -DCMAKE_BUILD_TYPE=${OPENEXR_BUILD_TYPE} -G "$CMAKE_GENERATOR" \
|
||||
-DCMAKE_INSTALL_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
|
||||
-DILMBASE_PACKAGE_PREFIX="${OPENEXR_INSTALL_DIR}" \
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Utility script to download and build pugixml
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -34,21 +34,17 @@ if [[ ! -e ${PUGIXML_SRC_DIR} ]] ; then
|
||||
git clone ${PUGIXML_REPO} ${PUGIXML_SRC_DIR}
|
||||
fi
|
||||
cd ${PUGIXML_SRC_DIR}
|
||||
|
||||
echo "git checkout ${PUGIXML_VERSION} --force"
|
||||
git checkout ${PUGIXML_VERSION} --force
|
||||
|
||||
mkdir -p ${PUGIXML_BUILD_DIR}
|
||||
cd ${PUGIXML_BUILD_DIR}
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${PUGIXML_INSTALL_DIR} \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTS=OFF \
|
||||
${PUGIXML_BUILD_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
fi
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${PUGIXML_INSTALL_DIR} \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_TESTS=OFF \
|
||||
${PUGIXML_BUILD_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
# ls -R ${PUGIXML_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Utility script to download and build pybind11
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -11,7 +7,7 @@ set -ex
|
||||
|
||||
# Repo and branch/tag/commit of pybind11 to download if we don't have it yet
|
||||
PYBIND11_REPO=${PYBIND11_REPO:=https://github.com/pybind/pybind11.git}
|
||||
PYBIND11_VERSION=${PYBIND11_VERSION:=v2.8.1}
|
||||
PYBIND11_VERSION=${PYBIND11_VERSION:=v2.5.0}
|
||||
|
||||
# Where to put pybind11 repo source (default to the ext area)
|
||||
PYBIND11_SRC_DIR=${PYBIND11_SRC_DIR:=${PWD}/ext/pybind11}
|
||||
@@ -38,20 +34,16 @@ if [[ ! -e ${PYBIND11_SRC_DIR} ]] ; then
|
||||
git clone ${PYBIND11_REPO} ${PYBIND11_SRC_DIR}
|
||||
fi
|
||||
cd ${PYBIND11_SRC_DIR}
|
||||
|
||||
echo "git checkout ${PYBIND11_VERSION} --force"
|
||||
git checkout ${PYBIND11_VERSION} --force
|
||||
|
||||
mkdir -p ${PYBIND11_BUILD_DIR}
|
||||
cd ${PYBIND11_BUILD_DIR}
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${PYBIND11_INSTALL_DIR} \
|
||||
-DPYBIND11_TEST=OFF \
|
||||
${PYBIND11_BUILD_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
fi
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${PYBIND11_INSTALL_DIR} \
|
||||
-DPYBIND11_TEST=OFF \
|
||||
${PYBIND11_BUILD_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
# ls -R ${PYBIND11_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Utility script to download and build webp
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -18,7 +18,6 @@ LOCAL_DEPS_DIR=${LOCAL_DEPS_DIR:=${PWD}/ext}
|
||||
WEBP_SRC_DIR=${WEBP_SRC_DIR:=${LOCAL_DEPS_DIR}/webp}
|
||||
WEBP_BUILD_DIR=${WEBP_BUILD_DIR:=${WEBP_SRC_DIR}/build}
|
||||
WEBP_INSTALL_DIR=${WEBP_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist}
|
||||
WEBP_BUILD_TYPE=${WEBP_BUILD_TYPE:=${CMAKE_BUILD_TYPE:-Release}}
|
||||
#WEBP_CONFIG_OPTS=${WEBP_CONFIG_OPTS:=}
|
||||
|
||||
pwd
|
||||
@@ -33,27 +32,24 @@ if [[ ! -e ${WEBP_SRC_DIR} ]] ; then
|
||||
git clone ${WEBP_REPO} ${WEBP_SRC_DIR}
|
||||
fi
|
||||
cd ${WEBP_SRC_DIR}
|
||||
|
||||
echo "git checkout ${WEBP_VERSION} --force"
|
||||
git checkout ${WEBP_VERSION} --force
|
||||
|
||||
mkdir -p ${WEBP_BUILD_DIR}
|
||||
cd ${WEBP_BUILD_DIR}
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${WEBP_INSTALL_DIR} \
|
||||
-DWEBP_BUILD_ANIM_UTILS=OFF \
|
||||
-DWEBP_BUILD_CWEBP=OFF \
|
||||
-DWEBP_BUILD_DWEBP=OFF \
|
||||
-DWEBP_BUILD_VWEBP=OFF \
|
||||
-DWEBP_BUILD_GIF2WEBPx=OFF \
|
||||
-DWEBP_BUILD_IMG2WEBP=OFF \
|
||||
-DWEBP_BUILD_EXTRAS=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
${WEBP_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=${WEBP_BUILD_TYPE} \
|
||||
-DCMAKE_INSTALL_PREFIX=${WEBP_INSTALL_DIR} \
|
||||
-DWEBP_BUILD_ANIM_UTILS=OFF \
|
||||
-DWEBP_BUILD_CWEBP=OFF \
|
||||
-DWEBP_BUILD_DWEBP=OFF \
|
||||
-DWEBP_BUILD_VWEBP=OFF \
|
||||
-DWEBP_BUILD_GIF2WEBPx=OFF \
|
||||
-DWEBP_BUILD_IMG2WEBP=OFF \
|
||||
-DWEBP_BUILD_EXTRAS=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
${WEBP_CONFIG_OPTS} ..
|
||||
time cmake --build . --target install
|
||||
fi
|
||||
|
||||
|
||||
# ls -R ${WEBP_INSTALL_DIR}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Utility script to download and build zlib
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Exit the whole script if any command fails.
|
||||
@@ -33,20 +33,15 @@ if [[ ! -e ${ZLIB_SRC_DIR} ]] ; then
|
||||
git clone ${ZLIB_REPO} ${ZLIB_SRC_DIR}
|
||||
fi
|
||||
cd ${ZLIB_SRC_DIR}
|
||||
|
||||
echo "git checkout ${ZLIB_VERSION} --force"
|
||||
git checkout ${ZLIB_VERSION} --force
|
||||
|
||||
mkdir -p ${ZLIB_BUILD_DIR} && true
|
||||
cd ${ZLIB_BUILD_DIR}
|
||||
|
||||
|
||||
if [[ -z $DEP_DOWNLOAD_ONLY ]]; then
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${ZLIB_INSTALL_DIR} \
|
||||
${ZLIB_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
fi
|
||||
time cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${ZLIB_INSTALL_DIR} \
|
||||
${ZLIB_CONFIG_OPTS} ..
|
||||
time cmake --build . --config Release --target install
|
||||
|
||||
# ls -R ${ZLIB_INSTALL_DIR}
|
||||
popd
|
||||
|
||||
@@ -1,52 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Important: set -ex causes this whole script to terminate with error if
|
||||
# any command in it fails. This is crucial for CI tests.
|
||||
set -ex
|
||||
|
||||
OIIO_CMAKE_FLAGS="$MY_CMAKE_FLAGS $OIIO_CMAKE_FLAGS"
|
||||
|
||||
if [[ "$USE_SIMD" != "" ]] ; then
|
||||
OIIO_CMAKE_FLAGS="$OIIO_CMAKE_FLAGS -DUSE_SIMD=$USE_SIMD"
|
||||
MY_CMAKE_FLAGS="$MY_CMAKE_FLAGS -DUSE_SIMD=$USE_SIMD"
|
||||
fi
|
||||
|
||||
if [[ -n "$FMT_VERSION" ]] ; then
|
||||
OIIO_CMAKE_FLAGS="$OIIO_CMAKE_FLAGS -DBUILD_FMT_VERSION=$FMT_VERSION"
|
||||
fi
|
||||
|
||||
if [[ -n "$CODECOV" ]] ; then
|
||||
OIIO_CMAKE_FLAGS="$OIIO_CMAKE_FLAGS -DCODECOV=${CODECOV}"
|
||||
fi
|
||||
|
||||
# On GHA, we can reduce build time with "unity" builds.
|
||||
if [[ ${GITHUB_ACTIONS} == true ]] ; then
|
||||
OIIO_CMAKE_FLAGS+=" -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:=ON} -DCMAKE_UNITY_BUILD_MODE=${CMAKE_UNITY_BUILD_MODE:=BATCH}"
|
||||
fi
|
||||
|
||||
pushd build
|
||||
cmake .. -G "$CMAKE_GENERATOR" \
|
||||
pushd build/$PLATFORM
|
||||
cmake ../.. -G "$CMAKE_GENERATOR" \
|
||||
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
|
||||
-DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \
|
||||
-DCMAKE_INSTALL_PREFIX="$OpenImageIO_ROOT" \
|
||||
-DPYTHON_VERSION="$PYTHON_VERSION" \
|
||||
-DCMAKE_INSTALL_LIBDIR="$OpenImageIO_ROOT/lib" \
|
||||
-DCMAKE_CXX_STANDARD="$CMAKE_CXX_STANDARD" \
|
||||
-DOIIO_DOWNLOAD_MISSING_TESTDATA=ON \
|
||||
-DEXTRA_CPP_ARGS="${OIIO_EXTRA_CPP_ARGS}" \
|
||||
$OIIO_CMAKE_FLAGS -DVERBOSE=1
|
||||
|
||||
# Save a copy of the generated files for debugging broken CI builds.
|
||||
mkdir cmake-save || /bin/true
|
||||
cp -r CMake* *.cmake cmake-save
|
||||
|
||||
: ${BUILDTARGET:=install}
|
||||
$MY_CMAKE_FLAGS -DVERBOSE=1
|
||||
if [[ "$BUILDTARGET" != "none" ]] ; then
|
||||
echo "Parallel build ${CMAKE_BUILD_PARALLEL_LEVEL} of target ${BUILDTARGET}"
|
||||
time ${OIIO_CMAKE_BUILD_WRAPPER} cmake --build . --target ${BUILDTARGET} --config ${CMAKE_BUILD_TYPE}
|
||||
echo "Parallel build " ${CMAKE_BUILD_PARALLEL_LEVEL}
|
||||
time cmake --build . --target ${BUILDTARGET:=install} --config ${CMAKE_BUILD_TYPE}
|
||||
fi
|
||||
popd
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Run code coverage analysis
|
||||
# This assumes that the build occurred with CODECOV=1 and tests have already
|
||||
# fully run.
|
||||
|
||||
set -ex
|
||||
|
||||
echo "Performing code coverage analysis"
|
||||
mkdir _coverage
|
||||
pushd _coverage
|
||||
|
||||
|
||||
# The sed command below converts from:
|
||||
# ../build/src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/foo.gcno
|
||||
# to:
|
||||
# ../src/libOpenImageIO/foo.cpp
|
||||
|
||||
for g in $(find ../build -name "*.gcno" -type f); do
|
||||
echo "Processing $g"
|
||||
echo "dirname $g = $(dirname $g) to " `$(echo "$g" | sed -e 's/\/build\//\//' -e 's/\.gcno/\.cpp/' -e 's/\.cpp\.cpp/\.cpp/' -e 's/\/CMakeFiles.*\.dir\//\//')`
|
||||
gcov -l -p -o $(dirname "$g") $(echo "$g" | sed -e 's/\/build\//\//' -e 's/\.gcno/\.cpp/' -e 's/\/CMakeFiles.*\.dir\//\//')
|
||||
done
|
||||
popd
|
||||
@@ -1,13 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# This script is run when CI system first starts up.
|
||||
# Since it sets many env variables needed by the caller, it should be run
|
||||
# with 'source', not in a separate shell.
|
||||
|
||||
# Figure out the platform
|
||||
if [[ $RUNNER_OS == macOS ]] ; then
|
||||
export ARCH=macosx
|
||||
elif [[ $RUNNER_OS == Linux ]] ; then
|
||||
export ARCH=linux64
|
||||
elif [[ $RUNNER_OS == Windows ]] ; then
|
||||
export ARCH=windows64
|
||||
elif [[ `uname -m` == aarch64 ]] ; then
|
||||
export ARCH=aarch64
|
||||
else
|
||||
export ARCH=unknown
|
||||
exit -1
|
||||
fi
|
||||
export PLATFORM=$ARCH
|
||||
|
||||
if [[ "${DEBUG:=0}" != "0" ]] ; then
|
||||
export PLATFORM=${PLATFORM}.debug
|
||||
fi
|
||||
|
||||
echo "Architecture is $ARCH"
|
||||
echo "Build platform name is $PLATFORM"
|
||||
|
||||
# Environment variables we always need
|
||||
export PATH=/usr/local/bin/_ccache:/usr/lib/ccache:$PATH
|
||||
export USE_CCACHE=${USE_CCACHE:=1}
|
||||
@@ -18,22 +36,20 @@ if [[ "${RUNNER_OS}" == "macOS" ]] ; then
|
||||
fi
|
||||
mkdir -p $CCACHE_DIR
|
||||
|
||||
export OpenImageIO_ROOT=$PWD/dist
|
||||
export OpenImageIO_ROOT=$PWD/dist/$PLATFORM
|
||||
export DYLD_LIBRARY_PATH=$OpenImageIO_ROOT/lib:$DYLD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$OpenImageIO_ROOT/lib:$LD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH=$OpenImageIO_ROOT/lib64:$LD_LIBRARY_PATH
|
||||
export OIIO_LIBRARY_PATH=$OpenImageIO_ROOT/lib
|
||||
export LSAN_OPTIONS=suppressions=$PWD/src/build-scripts/nosanitize.txt
|
||||
export ASAN_OPTIONS=print_suppressions=0
|
||||
export UBSAN_OPTIONS=suppressions=$PWD/src/build-scripts/ubsan-suppressions.txt
|
||||
|
||||
export PYTHON_VERSION=${PYTHON_VERSION:="2.7"}
|
||||
export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
|
||||
export BUILD_MISSING_DEPS=${BUILD_MISSING_DEPS:=1}
|
||||
export COMPILER=${COMPILER:=gcc}
|
||||
export CC=${CC:=gcc}
|
||||
export CXX=${CXX:=g++}
|
||||
export OpenImageIO_CI=true
|
||||
export CI=true
|
||||
export USE_NINJA=${USE_NINJA:=1}
|
||||
export CMAKE_GENERATOR=${CMAKE_GENERATOR:=Ninja}
|
||||
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release}
|
||||
@@ -53,7 +69,7 @@ export DYLD_LIBRARY_PATH=${LOCAL_DEPS_DIR}/dist/lib:$DYLD_LIBRARY_PATH
|
||||
export OCIO="$PWD/testsuite/common/OpenColorIO/nuke-default/config.ocio"
|
||||
export TESTSUITE_CLEANUP_ON_SUCCESS=${TESTSUITE_CLEANUP_ON_SUCCESS:=1}
|
||||
|
||||
mkdir -p build dist
|
||||
mkdir -p build/$PLATFORM dist/$PLATFORM
|
||||
|
||||
echo "HOME = $HOME"
|
||||
echo "PWD = $PWD"
|
||||
@@ -68,7 +84,7 @@ env | sort
|
||||
|
||||
if [[ `uname -s` == "Linux" ]] ; then
|
||||
head -40 /proc/cpuinfo
|
||||
elif [[ "${RUNNER_OS}" == "macOS" ]] ; then
|
||||
elif [[ $ARCH == macosx ]] ; then
|
||||
sysctl machdep.cpu.features
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,47 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Important: set -ex causes this whole script to terminate with error if
|
||||
# any command in it fails. This is crucial for CI tests.
|
||||
# (Though we let it run all the way through for code coverage workflows.)
|
||||
if [[ "${CODECOV}" == "" ]]; then
|
||||
set -ex
|
||||
fi
|
||||
set -ex
|
||||
|
||||
: ${CTEST_EXCLUSIONS:="broken"}
|
||||
: ${CTEST_TEST_TIMEOUT:=180}
|
||||
|
||||
#
|
||||
# Try a few command line options to test them and also get some important
|
||||
# debugging info in the CI logs.
|
||||
#
|
||||
echo ; echo "Results of oiiotool --version:"
|
||||
$OpenImageIO_ROOT/bin/oiiotool --version || true
|
||||
echo ; echo "Results of oiiotool brief help:"
|
||||
$OpenImageIO_ROOT/bin/oiiotool || true
|
||||
echo ; echo "Results of oiiotool full --help:"
|
||||
$OpenImageIO_ROOT/bin/oiiotool --help || true
|
||||
echo ; echo "Results of oiiotool with no args (should get short help message):"
|
||||
$OpenImageIO_ROOT/bin/oiiotool || true
|
||||
echo ; echo "Run unit tests and simple stats:"
|
||||
$OpenImageIO_ROOT/bin/oiiotool --unittest --list-formats --threads 0 \
|
||||
--cache 1000 --autotile --autopremult --runstats || true
|
||||
echo ; echo "Try unknown command:"
|
||||
$OpenImageIO_ROOT/bin/oiiotool -q --unknown || true
|
||||
|
||||
|
||||
#
|
||||
# Full test suite
|
||||
#
|
||||
echo "Parallel test ${CTEST_PARALLEL_LEVEL}"
|
||||
echo "Default timeout ${CTEST_TEST_TIMEOUT}"
|
||||
echo "Test exclusions '${CTEST_EXCLUSIONS}'"
|
||||
echo "CTEST_ARGS '${CTEST_ARGS}'"
|
||||
|
||||
pushd build
|
||||
time ctest -C ${CMAKE_BUILD_TYPE} --force-new-ctest-process --output-on-failure \
|
||||
-E "${CTEST_EXCLUSIONS}" --timeout ${CTEST_TEST_TIMEOUT} ${CTEST_ARGS}
|
||||
echo "Parallel test " ${CTEST_PARALLEL_LEVEL}
|
||||
pushd build/$PLATFORM
|
||||
time ctest -C ${CMAKE_BUILD_TYPE} -E broken --force-new-ctest-process \
|
||||
--output-on-failure --timeout ${CTEST_TEST_TIMEOUT:=180} ${CTEST_ARGS}
|
||||
popd
|
||||
|
||||
|
||||
# if [[ "$CODECOV" == 1 ]] ; then
|
||||
# bash <(curl -s https://codecov.io/bash)
|
||||
# fi
|
||||
|
||||
Binary file not shown.
@@ -1,11 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
|
||||
set -ex
|
||||
|
||||
|
||||
@@ -15,77 +10,38 @@ set -ex
|
||||
if [[ "$ASWF_ORG" != "" ]] ; then
|
||||
# Using ASWF CentOS container
|
||||
|
||||
export PATH=/opt/rh/devtoolset-6/root/usr/bin:/usr/local/bin:$PATH
|
||||
|
||||
#ls /etc/yum.repos.d
|
||||
|
||||
sudo yum install -y giflib giflib-devel && true
|
||||
sudo yum install -y opencv opencv-devel && true
|
||||
sudo yum install -y Field3D Field3D-devel && true
|
||||
sudo yum install -y ffmpeg ffmpeg-devel && true
|
||||
if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then
|
||||
time sudo yum install -y ${EXTRA_DEP_PACKAGES}
|
||||
fi
|
||||
|
||||
if [[ "${CONAN_LLVM_VERSION}" != "" ]] ; then
|
||||
mkdir conan
|
||||
pushd conan
|
||||
# Simple way to conan install just one package:
|
||||
# conan install clang/${CONAN_LLVM_VERSION}@aswftesting/ci_common1 -g deploy -g virtualenv
|
||||
# But the below method can accommodate multiple requirements:
|
||||
echo "[imports]" >> conanfile.txt
|
||||
echo "., * -> ." >> conanfile.txt
|
||||
echo "[requires]" >> conanfile.txt
|
||||
echo "clang/${CONAN_LLVM_VERSION}@aswftesting/ci_common1" >> conanfile.txt
|
||||
time conan install .
|
||||
echo "--ls--"
|
||||
ls -R .
|
||||
export PATH=$PWD/bin:$PATH
|
||||
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH
|
||||
export LLVM_ROOT=$PWD
|
||||
popd
|
||||
fi
|
||||
|
||||
if [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" ]] ; then
|
||||
# Lock down icc to 2022.1 because newer versions hosted on the Intel
|
||||
# repo require a glibc too new for the ASWF CentOS7-based containers
|
||||
# we run CI on.
|
||||
sudo cp src/build-scripts/oneAPI.repo /etc/yum.repos.d
|
||||
sudo /usr/bin/yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2022.1.0.x86_64
|
||||
set +e; source /opt/intel/oneapi/setvars.sh --config oneapi_2022.1.0.cfg; set -e
|
||||
elif [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" || "$CXX" == "icpx" || "$CC" == "icx" || "$USE_ICX" != "" ]] ; then
|
||||
# Lock down icx to 2023.1 because newer versions hosted on the Intel
|
||||
# repo require a libstd++ too new for the ASWF containers we run CI on
|
||||
# because their default install of gcc 9 based toolchain.
|
||||
sudo cp src/build-scripts/oneAPI.repo /etc/yum.repos.d
|
||||
sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.1.0.x86_64
|
||||
# sudo yum install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||
set +e; source /opt/intel/oneapi/setvars.sh; set -e
|
||||
echo "Verifying installation of Intel(r) oneAPI DPC++/C++ Compiler:"
|
||||
icpx --version
|
||||
fi
|
||||
|
||||
else
|
||||
# Using native Ubuntu runner
|
||||
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
time sudo apt-get update
|
||||
|
||||
time sudo apt-get -q install -y \
|
||||
git cmake ninja-build ccache g++ \
|
||||
libboost-dev libboost-thread-dev libboost-filesystem-dev \
|
||||
libboost-dev libboost-thread-dev \
|
||||
libboost-filesystem-dev libboost-regex-dev \
|
||||
libilmbase-dev libopenexr-dev \
|
||||
libtbb-dev \
|
||||
libtiff-dev libgif-dev libpng-dev libraw-dev libwebp-dev \
|
||||
libavcodec-dev libavformat-dev libswscale-dev libavutil-dev \
|
||||
dcmtk libopenvdb-dev \
|
||||
dcmtk libsquish-dev libopenvdb-dev \
|
||||
libfreetype6-dev \
|
||||
locales wget \
|
||||
libopencolorio-dev \
|
||||
libopencv-dev \
|
||||
qt5-default \
|
||||
libhdf5-dev
|
||||
if [[ "${QT_VERSION:-5}" == "5" ]] ; then
|
||||
time sudo apt-get -q install -y \
|
||||
qt5-default || /bin/true
|
||||
elif [[ "${QT_VERSION}" == "6" ]] ; then
|
||||
time sudo apt-get -q install -y qt6-base-dev || /bin/true
|
||||
fi
|
||||
if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then
|
||||
time sudo apt-get -q install -y ${EXTRA_DEP_PACKAGES}
|
||||
fi
|
||||
@@ -102,16 +58,16 @@ else
|
||||
fi
|
||||
|
||||
if [[ "$USE_LIBHEIF" != "0" ]] ; then
|
||||
sudo add-apt-repository ppa:strukturag/libde265 || true
|
||||
sudo add-apt-repository ppa:strukturag/libheif || true
|
||||
time sudo apt-get -q install -y libheif-plugin-aomdec \
|
||||
libheif-plugin-aomenc libheif-plugin-libde265 \
|
||||
libheif-plugin-x265 libheif-dev || true
|
||||
sudo add-apt-repository ppa:strukturag/libde265
|
||||
sudo add-apt-repository ppa:strukturag/libheif
|
||||
time sudo apt-get -q install -y libheif-dev
|
||||
fi
|
||||
|
||||
export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu:$CMAKE_PREFIX_PATH
|
||||
|
||||
if [[ "$CXX" == "g++-6" ]] ; then
|
||||
if [[ "$CXX" == "g++-4.8" ]] ; then
|
||||
time sudo apt-get install -y g++-4.8
|
||||
elif [[ "$CXX" == "g++-6" ]] ; then
|
||||
time sudo apt-get install -y g++-6
|
||||
elif [[ "$CXX" == "g++-7" ]] ; then
|
||||
time sudo apt-get install -y g++-7
|
||||
@@ -123,17 +79,6 @@ else
|
||||
time sudo apt-get install -y g++-10
|
||||
elif [[ "$CXX" == "g++-11" ]] ; then
|
||||
time sudo apt-get install -y g++-11
|
||||
elif [[ "$CXX" == "g++-12" ]] ; then
|
||||
time sudo apt-get install -y g++-12
|
||||
fi
|
||||
|
||||
if [[ "$CXX" == "icpc" || "$CC" == "icc" || "$USE_ICC" != "" || "$USE_ICX" != "" ]] ; then
|
||||
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
|
||||
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
||||
time sudo apt-get update
|
||||
time sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
|
||||
set +e; source /opt/intel/oneapi/setvars.sh; set -e
|
||||
fi
|
||||
|
||||
fi
|
||||
@@ -173,10 +118,6 @@ if [[ "$LIBRAW_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_libraw.bash
|
||||
fi
|
||||
|
||||
if [[ "$OPENJPEG_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_OpenJPEG.bash
|
||||
fi
|
||||
|
||||
if [[ "$PUGIXML_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_pugixml.bash
|
||||
export MY_CMAKE_FLAGS+=" -DUSE_EXTERNAL_PUGIXML=1 "
|
||||
@@ -190,12 +131,8 @@ if [[ "$PTEX_VERSION" != "" ]] ; then
|
||||
source src/build-scripts/build_Ptex.bash
|
||||
fi
|
||||
|
||||
if [[ "$USE_ICC" != "" ]] ; then
|
||||
# We used gcc for the prior dependency builds, but use icc for OIIO itself
|
||||
echo "which icpc:" $(which icpc)
|
||||
export CXX=icpc
|
||||
export CC=icc
|
||||
fi
|
||||
src/build-scripts/install_test_images.bash
|
||||
|
||||
|
||||
# Save the env for use by other stages
|
||||
src/build-scripts/save-env.bash
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
# DEP_DIR="$PWD/ext/dist"
|
||||
DEP_DIR="$PWD/dist/$PLATFORM"
|
||||
@@ -27,14 +27,10 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$DEP_DIR/lib:$VCPKG_INSTALLATION_ROOT/i
|
||||
|
||||
if [[ "$PYTHON_VERSION" == "3.6" ]] ; then
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.6.8/x64"
|
||||
elif [[ "$PYTHON_VERSION" == "3.7" ]] ; then
|
||||
else
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.7.9/x64"
|
||||
export Python_EXECUTABLE="/c/hostedtoolcache/windows/Python/3.7.9/x64/python.exe"
|
||||
export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages
|
||||
elif [[ "$PYTHON_VERSION" == "3.9" ]] ; then
|
||||
export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/c/hostedtoolcache/windows/Python/3.9.10/x64"
|
||||
export Python_EXECUTABLE="/c/hostedtoolcache/windows/Python/3.9.10/x64/python3.exe"
|
||||
export PYTHONPATH=$OpenImageIO_ROOT/lib/python${PYTHON_VERSION}/site-packages
|
||||
fi
|
||||
pip install numpy
|
||||
|
||||
@@ -50,12 +46,15 @@ echo "---------------"
|
||||
# vcpkg update
|
||||
#
|
||||
|
||||
time vcpkg install boost-asio:x64-windows
|
||||
time vcpkg install boost-container:x64-windows
|
||||
time vcpkg install boost-filesystem:x64-windows
|
||||
time vcpkg install boost-math:x64-windows
|
||||
time vcpkg install boost-regex:x64-windows
|
||||
time vcpkg install boost-stacktrace:x64-windows
|
||||
time vcpkg install boost-system:x64-windows
|
||||
time vcpkg install boost-thread:x64-windows
|
||||
time vcpkg install boost-tokenizer:x64-windows
|
||||
|
||||
# # vcpkg install zlib:x64-windows
|
||||
vcpkg install tiff:x64-windows
|
||||
@@ -67,6 +66,7 @@ vcpkg install libjpeg-turbo:x64-windows
|
||||
#
|
||||
# vcpkg install libraw:x64-windows
|
||||
# vcpkg install openjpeg:x64-windows
|
||||
# vcpkg install libsquish:x64-windows
|
||||
# # vcpkg install ffmpeg:x64-windows # takes FOREVER!
|
||||
# # vcpkg install webp:x64-windows # No such vcpkg package?a
|
||||
#
|
||||
@@ -136,6 +136,9 @@ echo "DEP_DIR $DEP_DIR :"
|
||||
ls -R -l "$DEP_DIR"
|
||||
|
||||
|
||||
src/build-scripts/install_test_images.bash
|
||||
|
||||
|
||||
# source src/build-scripts/build_openexr.bash
|
||||
# export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;$ILMBASE_ROOT;$OPENEXR_ROOT"
|
||||
# source src/build-scripts/build_opencolorio.bash
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# This script, which assumes it is running on a Mac OSX with Homebrew
|
||||
# This script, which assumes it is runnign on a Mac OSX with Homebrew
|
||||
# installed, does a "brew install" in all packages reasonably needed by
|
||||
# OIIO.
|
||||
|
||||
@@ -28,36 +24,45 @@ brew list --versions
|
||||
# All cases except for clang-format target, we need the dependencies.
|
||||
brew install --display-times -q gcc ccache cmake ninja boost || true
|
||||
brew link --overwrite gcc
|
||||
brew install --display-times -q python@${PYTHON_VERSION} || true
|
||||
brew unlink python@3.8 || true
|
||||
brew unlink python@2.7 || true
|
||||
brew unlink python@3.9 || true
|
||||
brew unlink python@3.10 || true
|
||||
brew unlink python@3.8 || true
|
||||
brew link --overwrite --force python@${PYTHON_VERSION} || true
|
||||
#brew upgrade --display-times -q cmake || true
|
||||
#brew install --display-times -q libtiff
|
||||
brew install --display-times -q imath openexr opencolorio
|
||||
#brew install --display-times -q libpng giflib webp
|
||||
brew install --display-times -q jpeg-turbo openjpeg
|
||||
brew upgrade --display-times -q cmake || true
|
||||
brew install --display-times -q libtiff imath openexr opencolorio
|
||||
brew install --display-times -q libpng giflib webp jpeg-turbo openjpeg
|
||||
brew install --display-times -q freetype libraw dcmtk pybind11 numpy || true
|
||||
brew install --display-times -q ffmpeg libheif ptex || true
|
||||
brew install --display-times -q ffmpeg libheif libsquish ptex || true
|
||||
brew install --display-times -q tbb || true
|
||||
brew install --display-times -q openvdb || true
|
||||
# No OpenVDB until it's upgraded to use Imath 3
|
||||
# brew install --display-times -q openvdb || true
|
||||
brew install --display-times -q opencv || true
|
||||
brew install --display-times -q qt${QT_VERSION}
|
||||
brew install --display-times -q qt@5
|
||||
brew install --display-times -q field3d || true
|
||||
|
||||
echo ""
|
||||
echo "After brew installs:"
|
||||
brew list --versions
|
||||
|
||||
# Needed on some systems
|
||||
pip${PYTHON_VERSION} install numpy
|
||||
if [[ $PYTHON_VERSION != "2.7" ]] ; then
|
||||
pip3 install numpy
|
||||
else
|
||||
pip install numpy
|
||||
fi
|
||||
|
||||
# Set up paths. These will only affect the caller if this script is
|
||||
# run with 'source' rather than in a separate shell.
|
||||
export PATH=/usr/local/opt/qt5/bin:$PATH
|
||||
export PATH=/usr/local/opt/python/libexec/bin:$PATH
|
||||
export PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
|
||||
#export PATH=/usr/local/opt/llvm/bin:$PATH
|
||||
export PATH=/usr/local/opt/qt5/bin:$PATH ;
|
||||
export PATH=/usr/local/opt/python/libexec/bin:$PATH ;
|
||||
export PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH ;
|
||||
export PATH=/usr/local/opt/llvm/bin:$PATH ;
|
||||
|
||||
# If field3d and hdf5 get even slightly out of sync, hdf5 will throw fits.
|
||||
# This is unnecessary, so we disable the step to make CI more likely to
|
||||
# pass in cases where they don't exactly match on the CI instances.
|
||||
export HDF5_DISABLE_VERSION_CHECK=1
|
||||
|
||||
|
||||
# Save the env for use by other stages
|
||||
src/build-scripts/save-env.bash
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ! -e ../oiio-images ]] ; then
|
||||
git clone https://github.com/OpenImageIO/oiio-images.git -b RB-2.4 --depth 1 ../oiio-images
|
||||
# NOTE: on release branches, this should include `-b RB-x.y`` so that
|
||||
# updates to the master oiio-images don't break tests in release branches.
|
||||
git clone -b RB-2.2 https://github.com/OpenImageIO/oiio-images.git ../oiio-images
|
||||
fi
|
||||
|
||||
# if [[ ! -e ../libtiffpic ]] ; then
|
||||
# curl -o pics-3.8.0.tar.gz https://download.osgeo.org/libtiff/pics-3.8.0.tar.gz
|
||||
# tar xf pics-3.8.0.tar.gz -C ..
|
||||
# fi
|
||||
if [[ ! -e ../libtiffpic ]] ; then
|
||||
curl -o pics-3.8.0.tar.gz https://download.osgeo.org/libtiff/pics-3.8.0.tar.gz
|
||||
tar xf pics-3.8.0.tar.gz -C ..
|
||||
fi
|
||||
|
||||
if [[ ! -e ../openexr-images ]] ; then
|
||||
git clone https://github.com/openexr/openexr-images.git --depth 1 ../openexr-images
|
||||
git clone https://github.com/openexr/openexr-images.git ../openexr-images
|
||||
fi
|
||||
|
||||
# if [[ ! -e ../bmpsuite ]] ; then
|
||||
# mkdir ../bmpsuite
|
||||
# curl -o bmpsuite.zip http://entropymine.com/jason/bmpsuite/bmpsuite.zip
|
||||
# unzip bmpsuite.zip -d ../bmpsuite
|
||||
# fi
|
||||
if [[ ! -e ../bmpsuite ]] ; then
|
||||
mkdir ../bmpsuite
|
||||
curl -o bmpsuite.zip http://entropymine.com/jason/bmpsuite/bmpsuite.zip
|
||||
unzip bmpsuite.zip -d ../bmpsuite
|
||||
fi
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
leak:Imf_2_2
|
||||
leak:Imf_2_3
|
||||
leak:libIlmImf
|
||||
leak:libgomp
|
||||
leak:boost::detail::make_external_thread_data
|
||||
leak:boost::detail::add_new_tss_node
|
||||
leak:g_malloc0
|
||||
leak:ArgParse::options
|
||||
leak:LibRaw::copy_fuji_uncropped
|
||||
leak:libtbb
|
||||
leak:libjpeg
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
[oneAPI]
|
||||
name=Intel® oneAPI repository
|
||||
baseurl=https://yum.repos.intel.com/oneapi
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=1
|
||||
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
|
||||
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Save the env for use by other stages. Exclude things that we know aren't
|
||||
# needed.
|
||||
printenv \
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
add_oiio_plugin (cineoninput.cpp
|
||||
libcineon/Cineon.cpp libcineon/OutStream.cpp libcineon/Codec.cpp
|
||||
libcineon/Reader.cpp libcineon/CineonHeader.cpp
|
||||
libcineon/Reader.cpp libcineon/Writer.cpp libcineon/CineonHeader.cpp
|
||||
libcineon/ElementReadStream.cpp libcineon/InStream.cpp)
|
||||
|
||||
# Note: OIIO doesn't support cineon output, so we don't compile
|
||||
# libcineon/Writer.cpp
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// https://github.com/OpenImageIO/oiio
|
||||
// Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@@ -19,12 +19,12 @@ OIIO_PLUGIN_NAMESPACE_BEGIN
|
||||
class CineonInput final : public ImageInput {
|
||||
public:
|
||||
CineonInput() { init(); }
|
||||
~CineonInput() override { close(); }
|
||||
const char* format_name(void) const override { return "cineon"; }
|
||||
bool open(const std::string& name, ImageSpec& newspec) override;
|
||||
bool close() override;
|
||||
bool read_native_scanline(int subimage, int miplevel, int y, int z,
|
||||
void* data) override;
|
||||
virtual ~CineonInput() { close(); }
|
||||
virtual const char* format_name(void) const override { return "cineon"; }
|
||||
virtual bool open(const std::string& name, ImageSpec& newspec) override;
|
||||
virtual bool close() override;
|
||||
virtual bool read_native_scanline(int subimage, int miplevel, int y, int z,
|
||||
void* data) override;
|
||||
|
||||
private:
|
||||
InStream* m_stream = nullptr;
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
|
||||
|
||||
|
||||
// Obligatory material to make this a recognizable imageio plugin:
|
||||
// Obligatory material to make this a recognizeable imageio plugin:
|
||||
OIIO_PLUGIN_EXPORTS_BEGIN
|
||||
|
||||
OIIO_EXPORT ImageInput*
|
||||
@@ -79,13 +79,13 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
// open the image
|
||||
m_stream = new InStream();
|
||||
if (!m_stream->Open(name.c_str())) {
|
||||
errorfmt("Could not open file \"{}\"", name);
|
||||
errorf("Could not open file \"%s\"", name);
|
||||
return false;
|
||||
}
|
||||
|
||||
m_cin.SetInStream(m_stream);
|
||||
if (!m_cin.ReadHeader()) {
|
||||
errorfmt("Could not read header");
|
||||
errorf("Could not read header");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -101,18 +101,19 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
case 2: typedesc = TypeDesc::UINT16; break;
|
||||
case 3:
|
||||
case 4: typedesc = TypeDesc::UINT32; break;
|
||||
default: errorfmt("Unsupported bit depth {}", maxbits); return false;
|
||||
default: errorf("Unsupported bit depth %d", maxbits); return false;
|
||||
}
|
||||
m_spec = ImageSpec(m_cin.header.Width(), m_cin.header.Height(),
|
||||
m_cin.header.NumberOfElements(), typedesc);
|
||||
// fill channel names
|
||||
m_spec.channelnames.clear();
|
||||
int gscount = 0, rcount = 0, gcount = 0, bcount = 0;
|
||||
char buf[3];
|
||||
for (int i = 0; i < m_cin.header.NumberOfElements(); i++) {
|
||||
switch (m_cin.header.ImageDescriptor(i)) {
|
||||
case cineon::kGrayscale:
|
||||
if (++gscount > 1) {
|
||||
std::string ch = Strutil::fmt::format("I{}", gscount);
|
||||
std::string ch = Strutil::sprintf("I%d", gscount);
|
||||
m_spec.channelnames.push_back(ch);
|
||||
} else
|
||||
m_spec.channelnames.emplace_back("I");
|
||||
@@ -120,7 +121,7 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
case cineon::kPrintingDensityRed:
|
||||
case cineon::kRec709Red:
|
||||
if (++gscount > 1) {
|
||||
std::string ch = Strutil::fmt::format("R{}", rcount);
|
||||
std::string ch = Strutil::sprintf("R%d", rcount);
|
||||
m_spec.channelnames.push_back(ch);
|
||||
} else
|
||||
m_spec.channelnames.emplace_back("R");
|
||||
@@ -128,7 +129,7 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
case cineon::kPrintingDensityGreen:
|
||||
case cineon::kRec709Green:
|
||||
if (++gcount > 1) {
|
||||
std::string ch = Strutil::fmt::format("G{}", gcount);
|
||||
std::string ch = Strutil::sprintf("G%d", gcount);
|
||||
m_spec.channelnames.push_back(ch);
|
||||
} else
|
||||
m_spec.channelnames.emplace_back("G");
|
||||
@@ -136,14 +137,14 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
case cineon::kPrintingDensityBlue:
|
||||
case cineon::kRec709Blue:
|
||||
if (++bcount > 1) {
|
||||
std::string ch = Strutil::fmt::format("B{}", bcount);
|
||||
std::string ch = Strutil::sprintf("B%d", bcount);
|
||||
m_spec.channelnames.push_back(ch);
|
||||
} else
|
||||
m_spec.channelnames.emplace_back("B");
|
||||
break;
|
||||
default:
|
||||
std::string ch = Strutil::fmt::format("channel{}",
|
||||
m_spec.channelnames.size());
|
||||
std::string ch = Strutil::sprintf("channel%d",
|
||||
m_spec.channelnames.size());
|
||||
m_spec.channelnames.push_back(ch);
|
||||
break;
|
||||
}
|
||||
@@ -183,7 +184,7 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
if (!std::isinf(m_cin.header.Gamma()) && m_cin.header.Gamma() != 0.0f)
|
||||
// actual gamma value is read later on
|
||||
m_spec.attribute("oiio:ColorSpace",
|
||||
Strutil::fmt::format("Gamma{:.2g}", g));
|
||||
Strutil::sprintf("GammaCorrected%.2g", g));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -200,9 +201,8 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
// libcineon's date/time format is pretty close to OIIO's (libcineon
|
||||
// uses %Y:%m:%d:%H:%M:%S%Z)
|
||||
m_spec.attribute("DateTime",
|
||||
Strutil::fmt::format("{} {}",
|
||||
m_cin.header.creationDate,
|
||||
m_cin.header.creationTime));
|
||||
Strutil::sprintf("%s %s", m_cin.header.creationDate,
|
||||
m_cin.header.creationTime));
|
||||
// FIXME: do something about the time zone
|
||||
}
|
||||
|
||||
@@ -332,16 +332,13 @@ CineonInput::open(const std::string& name, ImageSpec& newspec)
|
||||
// libcineon's date/time format is pretty close to OIIO's (libcineon
|
||||
// uses %Y:%m:%d:%H:%M:%S%Z)
|
||||
m_spec.attribute("DateTime",
|
||||
Strutil::fmt::format("{} {}", m_cin.header.sourceDate,
|
||||
m_cin.header.sourceTime));
|
||||
Strutil::sprintf("%s %s", m_cin.header.sourceDate,
|
||||
m_cin.header.sourceTime));
|
||||
// FIXME: do something about the time zone
|
||||
}
|
||||
{
|
||||
char filmedge[17];
|
||||
m_cin.header.FilmEdgeCode(filmedge, sizeof(filmedge));
|
||||
if (filmedge[0])
|
||||
m_spec.attribute("cineon:FilmEdgeCode", filmedge);
|
||||
}
|
||||
m_cin.header.FilmEdgeCode(buf);
|
||||
if (buf[0])
|
||||
m_spec.attribute("cineon:FilmEdgeCode", buf);
|
||||
|
||||
// read in user data
|
||||
if (m_cin.header.UserSize() != 0 && m_cin.header.UserSize() != 0xFFFFFFFF) {
|
||||
@@ -372,7 +369,7 @@ bool
|
||||
CineonInput::read_native_scanline(int subimage, int miplevel, int y, int /*z*/,
|
||||
void* data)
|
||||
{
|
||||
lock_guard lock(*this);
|
||||
lock_guard lock(m_mutex);
|
||||
if (!seek_subimage(subimage, miplevel))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ cineon::GenericHeader::GenericHeader()
|
||||
void cineon::GenericHeader::Reset()
|
||||
{
|
||||
// File Information
|
||||
this->magicNumber = CINEON_MAGIC_COOKIE;
|
||||
this->magicNumber = MAGIC_COOKIE;
|
||||
this->imageOffset = ~0;
|
||||
EmptyString(this->version);
|
||||
OIIO::Strutil::safe_strcpy(this->version, SPEC_VERSION, sizeof(this->version));
|
||||
@@ -212,8 +212,6 @@ bool cineon::Header::Check()
|
||||
|
||||
|
||||
|
||||
#ifdef OIIO_DOES_NOT_NEED_THIS
|
||||
|
||||
bool cineon::Header::Write(OutStream *io)
|
||||
{
|
||||
// write the header to the file
|
||||
@@ -256,7 +254,7 @@ bool cineon::Header::WriteOffsetData(OutStream *io)
|
||||
//const long IMAGE_STRUCTURE = 72; // sizeof the image data structure
|
||||
|
||||
/*int i;
|
||||
for (i = 0; i < CINEON_MAX_ELEMENTS; i++)
|
||||
for (i = 0; i < MAX_ELEMENTS; i++)
|
||||
{
|
||||
// only write if there is a defined image description
|
||||
if (this->chan[i].descriptor == kUndefinedDescriptor)
|
||||
@@ -274,12 +272,11 @@ bool cineon::Header::WriteOffsetData(OutStream *io)
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif /* OIIO_DOES_NOT_NEED_THIS */
|
||||
|
||||
|
||||
bool cineon::Header::ValidMagicCookie(const U32 magic)
|
||||
{
|
||||
U32 mc = CINEON_MAGIC_COOKIE;
|
||||
U32 mc = MAGIC_COOKIE;
|
||||
|
||||
if (magic == mc)
|
||||
return true;
|
||||
@@ -292,7 +289,7 @@ bool cineon::Header::ValidMagicCookie(const U32 magic)
|
||||
|
||||
bool cineon::Header::DetermineByteSwap(const U32 magic) const
|
||||
{
|
||||
U32 mc = CINEON_MAGIC_COOKIE;
|
||||
U32 mc = MAGIC_COOKIE;
|
||||
|
||||
bool byteSwap = false;
|
||||
|
||||
@@ -320,7 +317,7 @@ bool cineon::Header::Validate()
|
||||
SwapBytes(this->fileSize);
|
||||
|
||||
// Image information
|
||||
for (int i = 0; i < CINEON_MAX_ELEMENTS; i++)
|
||||
for (int i = 0; i < MAX_ELEMENTS; i++)
|
||||
{
|
||||
SwapBytes(this->chan[i].pixelsPerLine);
|
||||
SwapBytes(this->chan[i].linesPerElement);
|
||||
@@ -375,7 +372,7 @@ int cineon::GenericHeader::ImageElementCount() const
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (i < CINEON_MAX_ELEMENTS )
|
||||
while (i < MAX_ELEMENTS )
|
||||
{
|
||||
if (this->ImageDescriptor(i) == kUndefinedDescriptor)
|
||||
break;
|
||||
@@ -386,7 +383,6 @@ int cineon::GenericHeader::ImageElementCount() const
|
||||
}
|
||||
|
||||
|
||||
#ifdef OIIO_DOES_NOT_NEED_THIS
|
||||
void cineon::GenericHeader::CalculateNumberOfElements()
|
||||
{
|
||||
int i = this->ImageElementCount();
|
||||
@@ -402,7 +398,7 @@ void cineon::Header::CalculateOffsets()
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CINEON_MAX_ELEMENTS; i++)
|
||||
for (i = 0; i < MAX_ELEMENTS; i++)
|
||||
{
|
||||
// only write if there is a defined image description
|
||||
if (this->chan[i].designator[1] == kUndefinedDescriptor)
|
||||
@@ -411,12 +407,11 @@ void cineon::Header::CalculateOffsets()
|
||||
|
||||
}
|
||||
}
|
||||
#endif /* OIIO_DOES_NOT_NEED_THIS */
|
||||
|
||||
|
||||
cineon::DataSize cineon::GenericHeader::ComponentDataSize(const int element) const
|
||||
{
|
||||
if (element < 0 || element >= CINEON_MAX_ELEMENTS)
|
||||
if (element < 0 || element >= MAX_ELEMENTS)
|
||||
return kByte;
|
||||
|
||||
cineon::DataSize ret;
|
||||
@@ -449,7 +444,7 @@ cineon::DataSize cineon::GenericHeader::ComponentDataSize(const int element) con
|
||||
|
||||
int cineon::GenericHeader::ComponentByteCount(const int element) const
|
||||
{
|
||||
if (element < 0 || element >= CINEON_MAX_ELEMENTS)
|
||||
if (element < 0 || element >= MAX_ELEMENTS)
|
||||
return kByte;
|
||||
|
||||
int ret;
|
||||
@@ -505,33 +500,43 @@ int cineon::GenericHeader::DataSizeByteCount(const DataSize ds)
|
||||
}
|
||||
|
||||
|
||||
void cineon::IndustryHeader::FilmEdgeCode(char *edge, size_t size) const
|
||||
void cineon::IndustryHeader::FilmEdgeCode(char *edge) const
|
||||
{
|
||||
if (this->filmManufacturingIdCode == 0xff && this->filmType == 0xff
|
||||
&& this->perfsOffset == 0xff && this->prefix == 0xffffffff
|
||||
&& this->count == 0xffffffff)
|
||||
*edge = 0;
|
||||
else {
|
||||
std::string e = OIIO::Strutil::sprintf(
|
||||
"%02u%02u%02u%06u%04u",
|
||||
(unsigned int)this->filmManufacturingIdCode,
|
||||
(unsigned int)this->filmType,
|
||||
(unsigned int)this->perfsOffset, this->prefix, this->count);
|
||||
OIIO::Strutil::safe_strcpy(edge, e, size);
|
||||
}
|
||||
if (this->filmManufacturingIdCode == 0xff
|
||||
&& this->filmType == 0xff
|
||||
&& this->perfsOffset == 0xff
|
||||
&& this->prefix == 0xffffffff
|
||||
&& this->count == 0xffffffff)
|
||||
*edge = 0;
|
||||
else
|
||||
sprintf(edge, "%02u%02u%02u%06u%04u",
|
||||
(unsigned int)this->filmManufacturingIdCode,
|
||||
(unsigned int)this->filmType,
|
||||
(unsigned int)this->perfsOffset,
|
||||
this->prefix,
|
||||
this->count);
|
||||
}
|
||||
|
||||
|
||||
#ifdef OIIO_DOES_NOT_NEED_THIS
|
||||
void cineon::IndustryHeader::SetFilmEdgeCode(const char *edge)
|
||||
{
|
||||
this->filmManufacturingIdCode = OIIO::Strutil::stoi(OIIO::string_view(edge, 2));
|
||||
this->filmType = OIIO::Strutil::stoi(OIIO::string_view(edge + 2, 2));
|
||||
this->perfsOffset = OIIO::Strutil::stoi(OIIO::string_view(edge + 4, 2));
|
||||
this->prefix = OIIO::Strutil::stoi(OIIO::string_view(edge + 6, 6));
|
||||
this->count = OIIO::Strutil::stoi(OIIO::string_view(edge + 12, 4));
|
||||
char buf[7];
|
||||
|
||||
strncpy(buf, edge, 2);
|
||||
this->filmManufacturingIdCode = OIIO::Strutil::stoi(buf);
|
||||
|
||||
strncpy(buf, edge + 2, 2);
|
||||
this->filmType = OIIO::Strutil::stoi(buf);
|
||||
|
||||
strncpy(buf, edge + 4, 2);
|
||||
this->perfsOffset = OIIO::Strutil::stoi(buf);
|
||||
|
||||
strncpy(buf, edge + 6, 6);
|
||||
this->prefix = OIIO::Strutil::stoi(buf);
|
||||
|
||||
strncpy(buf, edge + 12, 4);
|
||||
this->count = OIIO::Strutil::stoi(buf);
|
||||
}
|
||||
#endif /* OIIO_DOES_NOT_NEED_THIS */
|
||||
|
||||
|
||||
void cineon::GenericHeader::SetCreationTimeDate(const long sec)
|
||||
|
||||
@@ -64,17 +64,24 @@
|
||||
*/
|
||||
#define SPEC_VERSION "V4.5"
|
||||
|
||||
/*!
|
||||
* \def CINEON_MAX_ELEMENTS
|
||||
/*!
|
||||
* \def MAX_ELEMENTS
|
||||
* \brief Maximum number of image elements
|
||||
*/
|
||||
#define CINEON_MAX_ELEMENTS 8
|
||||
#define MAX_ELEMENTS 8
|
||||
|
||||
/*!
|
||||
* \def CINEON_MAGIC_COOKIE
|
||||
/*!
|
||||
* \def MAX_COMPONENTS
|
||||
* \brief Maximum number of components per image element
|
||||
*/
|
||||
#define MAX_COMPONENTS 8
|
||||
|
||||
|
||||
/*!
|
||||
* \def MAGIC_COOKIE
|
||||
* \brief HEX value of 0x802A5FD7
|
||||
*/
|
||||
#define CINEON_MAGIC_COOKIE 0x802A5FD7
|
||||
#define MAGIC_COOKIE 0x802A5FD7
|
||||
|
||||
|
||||
|
||||
@@ -268,8 +275,8 @@ namespace cineon
|
||||
U8 imageOrientation; //!< Image orientation \see Orientation
|
||||
U8 numberOfElements; //!< Number of elements (1-8)
|
||||
U8 unused1[2]; //!< Unused (word alignment)
|
||||
ImageElement chan[CINEON_MAX_ELEMENTS]; //!< Image element data structures
|
||||
R32 whitePoint[2]; //!< White point (x, y pair)
|
||||
ImageElement chan[MAX_ELEMENTS]; //!< Image element data structures
|
||||
R32 whitePoint[2]; //!< White point (x, y pair)
|
||||
R32 redPrimary[2]; //!< Red primary chromaticity (x, y pair)
|
||||
R32 greenPrimary[2]; //!< Green primary chromaticity (x, y pair)
|
||||
R32 bluePrimary[2]; //!< Blue primary chromaticity (x, y pair)
|
||||
@@ -849,7 +856,7 @@ namespace cineon
|
||||
inline void SetXDevicePitch(const R32 size);
|
||||
|
||||
/*!
|
||||
* \brief Get the vertical pitch of the device
|
||||
* \brief Get the veritcal pitch of the device
|
||||
* \return pitch in samples/mm
|
||||
*/
|
||||
inline R32 YDevicePitch() const;
|
||||
@@ -955,7 +962,7 @@ namespace cineon
|
||||
* \brief Get the film edge code information that is machine readable
|
||||
* \param edge buffer to write film edge code information (16+1 chars)
|
||||
*/
|
||||
void FilmEdgeCode(char *edge, size_t size) const;
|
||||
void FilmEdgeCode(char *edge) const;
|
||||
|
||||
/*!
|
||||
* \brief Set the film edge code information that is machine readable
|
||||
@@ -1049,7 +1056,6 @@ namespace cineon
|
||||
*/
|
||||
bool Read(InStream *);
|
||||
|
||||
#ifdef OIIO_DOES_NOT_NEED_THIS
|
||||
/*!
|
||||
* \brief Set the Output Stream object to write header to
|
||||
*/
|
||||
@@ -1057,7 +1063,6 @@ namespace cineon
|
||||
|
||||
// write the offset within the header
|
||||
bool WriteOffsetData(OutStream *);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* \brief Validate the header
|
||||
@@ -1237,30 +1242,30 @@ namespace cineon
|
||||
|
||||
inline U32 GenericHeader::PixelsPerLine(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return 0xffffffff;
|
||||
return this->chan[i].pixelsPerLine;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return 0xffffffff;
|
||||
return this->chan[i].pixelsPerLine;
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetPixelsPerLine(const int i, const U32 ppl)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].pixelsPerLine = ppl;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].pixelsPerLine = ppl;
|
||||
}
|
||||
|
||||
inline U32 GenericHeader::LinesPerElement(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return 0xffffffff;
|
||||
return this->chan[i].linesPerElement;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return 0xffffffff;
|
||||
return this->chan[i].linesPerElement;
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetLinesPerElement(const int i, const U32 lpe)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].linesPerElement = lpe;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].linesPerElement = lpe;
|
||||
}
|
||||
|
||||
inline U8 GenericHeader::DataSign() const
|
||||
@@ -1275,100 +1280,100 @@ namespace cineon
|
||||
|
||||
inline R32 GenericHeader::LowData(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::infinity();
|
||||
return this->chan[i].lowData;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::infinity();
|
||||
return this->chan[i].lowData;
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetLowData(const int i, const R32 data)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].lowData = data;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].lowData = data;
|
||||
}
|
||||
|
||||
inline R32 GenericHeader::LowQuantity(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::max();
|
||||
return this->chan[i].lowQuantity;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::max();
|
||||
return this->chan[i].lowQuantity;
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetLowQuantity(const int i, const R32 quant)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].lowQuantity = quant;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].lowQuantity = quant;
|
||||
}
|
||||
|
||||
inline R32 GenericHeader::HighData(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::max();
|
||||
return this->chan[i].highData;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::max();
|
||||
return this->chan[i].highData;
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetHighData(const int i, const R32 data)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].highData = data;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].highData = data;
|
||||
}
|
||||
|
||||
inline R32 GenericHeader::HighQuantity(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::max();
|
||||
return this->chan[i].highQuantity;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return std::numeric_limits<R32>::max();
|
||||
return this->chan[i].highQuantity;
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetHighQuantity(const int i, const R32 quant)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].highQuantity = quant;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].highQuantity = quant;
|
||||
}
|
||||
|
||||
inline U8 GenericHeader::Metric(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return 0xff;
|
||||
return this->chan[i].designator[0];
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return 0xff;
|
||||
return this->chan[i].designator[0];
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetMetric(const int i, const U8 m)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].designator[0] = m;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].designator[0] = m;
|
||||
}
|
||||
|
||||
inline Descriptor GenericHeader::ImageDescriptor(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return Descriptor(0xff);
|
||||
return Descriptor(this->chan[i].designator[1]);
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return Descriptor(0xff);
|
||||
return Descriptor(this->chan[i].designator[1]);
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetImageDescriptor(const int i, const Descriptor desc)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].designator[1] = (U8)desc;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].designator[1] = (U8)desc;
|
||||
}
|
||||
|
||||
inline U8 GenericHeader::BitDepth(const int i) const
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return 0xff;
|
||||
return this->chan[i].bitDepth;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return 0xff;
|
||||
return this->chan[i].bitDepth;
|
||||
}
|
||||
|
||||
inline void GenericHeader::SetBitDepth(const int i, const U8 depth)
|
||||
{
|
||||
if (i < 0 || i >= CINEON_MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].bitDepth = depth;
|
||||
if (i < 0 || i >= MAX_ELEMENTS)
|
||||
return;
|
||||
this->chan[i].bitDepth = depth;
|
||||
}
|
||||
|
||||
inline Interleave GenericHeader::ImageInterleave() const
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace cineon
|
||||
offset += block.x1 * numberOfComponents / 3 * 4;
|
||||
|
||||
|
||||
// get the read count in bytes, round to the 32-bit boundary
|
||||
// get the read count in bytes, round to the 32-bit boundry
|
||||
int readSize = (block.x2 - block.x1 + 1) * numberOfComponents;
|
||||
readSize += readSize % 3;
|
||||
readSize = readSize / 3 * 4;
|
||||
@@ -110,7 +110,7 @@ namespace cineon
|
||||
|
||||
for (int count = (block.x2 - block.x1 + 1) * numberOfComponents - 1; count >= 0; count--)
|
||||
{
|
||||
// unpacking the buffer backwards
|
||||
// unpacking the buffer backwords
|
||||
U16 d1 = U16(readBuf[(count + index) / 3] >> ((2 - (count + index) % 3) * 10 + PADDINGBITS) & 0x3ff);
|
||||
BaseTypeConvertU10ToU16(d1, d1);
|
||||
BaseTypeConverter(d1, obuf[count]);
|
||||
@@ -146,7 +146,7 @@ namespace cineon
|
||||
|
||||
for (int i = count - 1; i >= 0; i--)
|
||||
{
|
||||
// unpacking the buffer backwards
|
||||
// unpacking the buffer backwords
|
||||
// find the byte that the data starts in, read in as a 16 bits then shift and mask
|
||||
// the pattern with byte offset is:
|
||||
// 10 bits datasize rotates every 4 data elements
|
||||
|
||||
@@ -82,12 +82,12 @@ void cineon::Writer::SetImageInfo(const U32 width, const U32 height)
|
||||
}
|
||||
|
||||
|
||||
// returns next available or CINEON_MAX_ELEMENTS if full
|
||||
// returns next available or MAX_ELEMENTS if full
|
||||
int cineon::Writer::NextAvailElement() const
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < CINEON_MAX_ELEMENTS; i++)
|
||||
for (i = 0; i < MAX_ELEMENTS; i++)
|
||||
{
|
||||
if (this->header.ImageDescriptor(i) == kUndefinedDescriptor)
|
||||
break;
|
||||
@@ -139,7 +139,7 @@ void cineon::Writer::SetElement(const int num, const Descriptor desc, const U8 b
|
||||
const R32 highData, const R32 highQuantity)
|
||||
{
|
||||
// make sure the range is good
|
||||
if (num < 0 || num >= CINEON_MAX_ELEMENTS)
|
||||
if (num < 0 || num >= MAX_ELEMENTS)
|
||||
return;
|
||||
|
||||
// set values
|
||||
@@ -160,7 +160,7 @@ void cineon::Writer::SetElement(const int num, const Descriptor desc, const U8 b
|
||||
bool cineon::Writer::WriteElement(const int element, void *data, const long count)
|
||||
{
|
||||
// make sure the range is good
|
||||
if (element < 0 || element >= CINEON_MAX_ELEMENTS)
|
||||
if (element < 0 || element >= MAX_ELEMENTS)
|
||||
return false;
|
||||
|
||||
// make sure the entry is valid
|
||||
@@ -180,7 +180,7 @@ bool cineon::Writer::WriteElement(const int element, void *data, const long coun
|
||||
bool cineon::Writer::WriteElement(const int element, void *data)
|
||||
{
|
||||
// make sure the range is good
|
||||
if (element < 0 || element >= CINEON_MAX_ELEMENTS)
|
||||
if (element < 0 || element >= MAX_ELEMENTS)
|
||||
return false;
|
||||
|
||||
// make sure the entry is valid
|
||||
@@ -197,7 +197,7 @@ bool cineon::Writer::WriteElement(const int element, void *data, const DataSize
|
||||
bool status = true;
|
||||
|
||||
// make sure the range is good
|
||||
if (element < 0 || element >= CINEON_MAX_ELEMENTS)
|
||||
if (element < 0 || element >= MAX_ELEMENTS)
|
||||
return false;
|
||||
|
||||
// make sure the entry is valid
|
||||
|
||||
+13
-57
@@ -1,76 +1,32 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
# add here all the find_dependency() whenever switching to config based dependencies
|
||||
if (NOT @OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH@ AND NOT OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH)
|
||||
if (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 3.0)
|
||||
find_dependency(Imath @Imath_VERSION@
|
||||
HINTS @Imath_DIR@)
|
||||
elseif (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 2.4 AND @FOUND_OPENEXR_WITH_CONFIG@)
|
||||
find_dependency(IlmBase @OpenEXR_VERSION@
|
||||
HINTS @IlmBase_DIR@ @OpenEXR_DIR@)
|
||||
find_dependency(OpenEXR @OpenEXR_VERSION@
|
||||
HINTS @OpenEXR_DIR@)
|
||||
find_dependency(ZLIB @ZLIB_VERSION@) # Because OpenEXR doesn't do it
|
||||
find_dependency(Threads) # Because OpenEXR doesn't do it
|
||||
endif ()
|
||||
if (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 3.0)
|
||||
find_dependency(Imath @Imath_VERSION@
|
||||
HINTS @Imath_DIR@)
|
||||
elseif (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 2.4 AND @FOUND_OPENEXR_WITH_CONFIG@)
|
||||
find_dependency(IlmBase @OpenEXR_VERSION@
|
||||
HINTS @IlmBase_DIR@ @OpenEXR_DIR@)
|
||||
find_dependency(OpenEXR @OpenEXR_VERSION@
|
||||
HINTS @OpenEXR_DIR@)
|
||||
find_dependency(ZLIB @ZLIB_VERSION@) # Because OpenEXR doesn't do it
|
||||
find_dependency(Threads) # Because OpenEXR doesn't do it
|
||||
endif ()
|
||||
|
||||
if (NOT @OIIO_USING_FMT_LOCAL@ AND NOT @INTERNALIZE_FMT@)
|
||||
find_dependency(fmt)
|
||||
endif ()
|
||||
|
||||
if (NOT @BUILD_SHARED_LIBS@)
|
||||
# This is required in static library builds, as e.g. PNG::PNG appears among
|
||||
# INTERFACE_LINK_LIBRARIES. If the project does not know about PNG target, it will cause
|
||||
# configuration error about unknown targets being linked in.
|
||||
find_dependency(TIFF)
|
||||
if (@JPEG_FOUND@)
|
||||
find_dependency(JPEG)
|
||||
endif()
|
||||
if (@PNG_FOUND@)
|
||||
find_dependency(PNG)
|
||||
endif()
|
||||
# The following have the same problem except that INTERFACE_LINK_LIBRARIES use
|
||||
# TARGET_NAME_IF_EXISTS, so the error only happens on link time.
|
||||
if (@OIIO_TBB@)
|
||||
find_dependency(TBB)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Compute the installation prefix relative to this file. Note that cmake files are installed
|
||||
# to ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} (see OIIO_CONFIG_INSTALL_DIR)
|
||||
get_filename_component(_CURR_INSTALL_LIBDIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
|
||||
get_filename_component(_ABS_CMAKE_INSTALL_LIBDIR "@CMAKE_INSTALL_FULL_LIBDIR@" ABSOLUTE)
|
||||
get_filename_component(_ABS_CMAKE_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" ABSOLUTE)
|
||||
file(RELATIVE_PATH _INCLUDEDIR_RELATIVE_TO_LIBDIR
|
||||
"${_ABS_CMAKE_INSTALL_LIBDIR}" "${_ABS_CMAKE_INSTALL_INCLUDEDIR}")
|
||||
get_filename_component(_CURR_INSTALL_INCLUDE_DIR
|
||||
"${_CURR_INSTALL_LIBDIR}/${_INCLUDEDIR_RELATIVE_TO_LIBDIR}" ABSOLUTE)
|
||||
|
||||
set_and_check (@PROJECT_NAME@_INCLUDE_DIR "${_CURR_INSTALL_INCLUDE_DIR}")
|
||||
set_and_check (@PROJECT_NAME@_INCLUDES "${_CURR_INSTALL_INCLUDE_DIR}")
|
||||
set_and_check (@PROJECT_NAME@_LIB_DIR "${_CURR_INSTALL_LIBDIR}")
|
||||
set_and_check (@PROJECT_NAME@_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set_and_check (@PROJECT_NAME@_INCLUDES "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
|
||||
set_and_check (@PROJECT_NAME@_LIB_DIR "@CMAKE_INSTALL_FULL_LIBDIR@")
|
||||
set (@PROJECT_NAME@_PLUGIN_SEARCH_PATH "@PLUGIN_SEARCH_PATH_NATIVE@")
|
||||
|
||||
if (NOT @FOUND_OPENEXR_WITH_CONFIG@)
|
||||
list (APPEND @PROJECT_NAME@_INCLUDES ${IMATH_INCLUDES} ${OPENEXR_INCLUDES})
|
||||
endif ()
|
||||
|
||||
set (OIIO_USING_IMATH_VERSION_MAJOR @Imath_VERSION_MAJOR@)
|
||||
set (OIIO_USING_IMATH_VERSION_MINOR @Imath_VERSION_MINOR@)
|
||||
|
||||
#...logic to determine installedPrefix from the own location...
|
||||
#set (@PROJECT_NAME@_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@")
|
||||
|
||||
include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
|
||||
check_required_components ("@PROJECT_NAME@")
|
||||
|
||||
# Set a CMake variable that says if this OpenImageIO build has OCIO support
|
||||
set (@PROJECT_NAME@_HAS_OpenColorIO @OpenColorIO_FOUND@)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
|
||||
@@ -39,24 +39,20 @@ macro (add_oiio_plugin)
|
||||
get_filename_component (_plugin_name ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE)
|
||||
if (NOT _plugin_NAME)
|
||||
# If NAME is not supplied, infer target name (and therefore the
|
||||
# library name) from the directory name.
|
||||
# executable name) from the directory name.
|
||||
get_filename_component (_plugin_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
endif ()
|
||||
# If SRC is supplied, use it. Otherwise, assume any unparsed arguments are the
|
||||
# source files. If there are none, then glob *.cpp of the current directory.
|
||||
if (NOT _plugin_SRC)
|
||||
set (_plugin_SRC ${_plugin_UNPARSED_ARGUMENTS})
|
||||
endif ()
|
||||
if (NOT _plugin_SRC)
|
||||
file (GLOB _plugin_SRC *.cpp)
|
||||
endif ()
|
||||
# if (NOT _plugin_SRC)
|
||||
# # If SRC is not supplied, assume local cpp files are its source.
|
||||
# file (GLOB _plugin_SRC *.cpp)
|
||||
# endif ()
|
||||
check_is_enabled (${_plugin_name} _enable_plugin)
|
||||
if (_enable_plugin)
|
||||
if (EMBEDPLUGINS)
|
||||
# Add each source file to the libOpenImageIO_srcs, but it takes some
|
||||
# bending over backwards to change it in the parent scope.
|
||||
set (_plugin_all_source ${libOpenImageIO_srcs})
|
||||
foreach (_plugin_source_file ${_plugin_SRC})
|
||||
foreach (_plugin_source_file ${_plugin_UNPARSED_ARGUMENTS} )
|
||||
list (APPEND _plugin_all_source "${CMAKE_CURRENT_SOURCE_DIR}/${_plugin_source_file}")
|
||||
endforeach ()
|
||||
set (libOpenImageIO_srcs "${_plugin_all_source}" PARENT_SCOPE)
|
||||
@@ -64,17 +60,17 @@ macro (add_oiio_plugin)
|
||||
set (format_plugin_include_dirs ${format_plugin_include_dirs} ${_plugin_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
set (format_plugin_libs ${format_plugin_libs} ${_plugin_LINK_LIBRARIES} PARENT_SCOPE)
|
||||
else ()
|
||||
# # Get the name of the current directory and use it as the target name.
|
||||
# get_filename_component (_plugin_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
add_library (${_plugin_NAME} MODULE ${_plugin_SRC})
|
||||
target_compile_definitions (${_plugin_NAME} PRIVATE
|
||||
# Get the name of the current directory and use it as the target name.
|
||||
get_filename_component (_plugin_name ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
add_library (${_plugin_name} MODULE ${_plugin_UNPARSED_ARGUMENTS})
|
||||
target_compile_definitions (${_plugin_name} PRIVATE
|
||||
${_plugin_DEFINITIONS}
|
||||
OpenImageIO_EXPORTS)
|
||||
target_include_directories (${_plugin_NAME} PRIVATE ${_plugin_INCLUDE_DIRS})
|
||||
target_link_libraries (${_plugin_NAME} PUBLIC OpenImageIO
|
||||
target_include_directories (${_plugin_name} PRIVATE ${_plugin_INCLUDE_DIRS})
|
||||
target_link_libraries (${_plugin_name} PUBLIC OpenImageIO
|
||||
PRIVATE ${_plugin_LINK_LIBRARIES})
|
||||
set_target_properties (${_plugin_NAME} PROPERTIES PREFIX "" FOLDER "Plugins")
|
||||
install_targets (${_plugin_NAME})
|
||||
set_target_properties (${_plugin_name} PROPERTIES PREFIX "" FOLDER "Plugins")
|
||||
install_targets (${_plugin_name})
|
||||
endif ()
|
||||
else ()
|
||||
message (STATUS "${ColorRed}Disabling ${_plugin_name} ${ColorReset}")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
# Is the named package "enabled" via our disabling convention? If either
|
||||
# USE_pkgname (or the all-uppercase USE_PKGNAME, or ENABLE_pkgname, or
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
|
||||
set (REQUIRED_DEPS "" CACHE STRING
|
||||
@@ -9,23 +9,6 @@ set (OPTIONAL_DEPS "" CACHE STRING
|
||||
"Additional dependencies to consider optional (semicolon-separated list, or ALL)")
|
||||
option (ALWAYS_PREFER_CONFIG "Prefer a dependency's exported config file if it's available" OFF)
|
||||
|
||||
|
||||
# Utility function to list the names and values of all variables matching
|
||||
# the pattern (case-insensitive)
|
||||
function (dump_matching_variables pattern)
|
||||
string (TOLOWER ${pattern} _pattern_lower)
|
||||
get_cmake_property(_allvars VARIABLES)
|
||||
list (SORT _allvars)
|
||||
foreach (_var IN LISTS _allvars)
|
||||
string (TOLOWER ${_var} _var_lower)
|
||||
if (_var_lower MATCHES ${_pattern_lower})
|
||||
message (STATUS " ${_var} = ${${_var}}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
|
||||
|
||||
# checked_find_package(Pkgname ...) is a wrapper for find_package, with the
|
||||
# following extra features:
|
||||
# * If either `USE_Pkgname` or the all-uppercase `USE_PKGNAME` (or
|
||||
@@ -37,11 +20,8 @@ endfunction ()
|
||||
# turned off explicitly from one of these sources.
|
||||
# * Print a message if the package is enabled but not found. This is based
|
||||
# on ${Pkgname}_FOUND or $PKGNAME_FOUND.
|
||||
# * Optional DEFINITIONS <string>... are passed to add_definitions if the
|
||||
# * Optional DEFINITIONS <string> are passed to add_definitions if the
|
||||
# package is found.
|
||||
# * Optional SETVARIABLES <id>... is a list of CMake variables to set to
|
||||
# TRUE if the package is found (they will not be set or changed if the
|
||||
# package is not found).
|
||||
# * Optional PRINT <list> is a list of variables that will be printed
|
||||
# if the package is found, if VERBOSE is on.
|
||||
# * Optional DEPS <list> is a list of hard dependencies; for each one, if
|
||||
@@ -64,8 +44,6 @@ endfunction ()
|
||||
# can give an optional explanation, passed as RECOMMEND_MIN_REASON.
|
||||
# * Optional PREFER_CONFIG, if supplied, tries to use an exported config
|
||||
# file from the package before using a FindPackage.cmake module.
|
||||
# * Optional DEBUG turns on extra debugging information related to how
|
||||
# this package is found.
|
||||
#
|
||||
# N.B. This needs to be a macro, not a function, because the find modules
|
||||
# will set(blah val PARENT_SCOPE) and we need that to be the global scope,
|
||||
@@ -73,20 +51,16 @@ endfunction ()
|
||||
macro (checked_find_package pkgname)
|
||||
cmake_parse_arguments(_pkg # prefix
|
||||
# noValueKeywords:
|
||||
"REQUIRED;PREFER_CONFIG;DEBUG"
|
||||
"REQUIRED;PREFER_CONFIG"
|
||||
# singleValueKeywords:
|
||||
"ENABLE;ISDEPOF;VERSION_MIN;VERSION_MAX;RECOMMEND_MIN;RECOMMEND_MIN_REASON"
|
||||
# multiValueKeywords:
|
||||
"DEFINITIONS;PRINT;DEPS;SETVARIABLES"
|
||||
"DEFINITIONS;PRINT;DEPS"
|
||||
# argsToParse:
|
||||
${ARGN})
|
||||
string (TOLOWER ${pkgname} pkgname_lower)
|
||||
string (TOUPPER ${pkgname} pkgname_upper)
|
||||
set (_pkg_VERBOSE ${VERBOSE})
|
||||
if (_pkg_DEBUG)
|
||||
set (_pkg_VERBOSE ON)
|
||||
endif ()
|
||||
if (NOT _pkg_VERBOSE)
|
||||
if (NOT VERBOSE)
|
||||
set (${pkgname}_FIND_QUIETLY true)
|
||||
set (${pkgname_upper}_FIND_QUIETLY true)
|
||||
endif ()
|
||||
@@ -146,10 +120,20 @@ macro (checked_find_package pkgname)
|
||||
endif ()
|
||||
endforeach ()
|
||||
message (STATUS "${ColorGreen}Found ${pkgname} ${${pkgname}_VERSION} ${_config_status}${ColorReset}")
|
||||
if (VERBOSE)
|
||||
set (_vars_to_print ${pkgname}_INCLUDES ${pkgname_upper}_INCLUDES
|
||||
${pkgname}_INCLUDE_DIR ${pkgname_upper}_INCLUDE_DIR
|
||||
${pkgname}_INCLUDE_DIRS ${pkgname_upper}_INCLUDE_DIRS
|
||||
${pkgname}_LIBRARIES ${pkgname_upper}_LIBRARIES
|
||||
${_pkg_PRINT})
|
||||
list (REMOVE_DUPLICATES _vars_to_print)
|
||||
foreach (_v IN LISTS _vars_to_print)
|
||||
if (NOT "${${_v}}" STREQUAL "")
|
||||
message (STATUS " ${_v} = ${${_v}}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
add_definitions (${_pkg_DEFINITIONS})
|
||||
foreach (_v IN LISTS _pkg_SETVARIABLES)
|
||||
set (${_v} TRUE)
|
||||
endforeach ()
|
||||
if (_pkg_RECOMMEND_MIN)
|
||||
if (${${pkgname}_VERSION} VERSION_LESS ${_pkg_RECOMMEND_MIN})
|
||||
message (STATUS "${ColorYellow}Recommend ${pkgname} >= ${_pkg_RECOMMEND_MIN} ${_pkg_RECOMMEND_MIN_REASON} ${ColorReset}")
|
||||
@@ -177,22 +161,6 @@ macro (checked_find_package pkgname)
|
||||
message (FATAL_ERROR "${ColorRed}${pkgname} is required, aborting.${ColorReset}")
|
||||
endif ()
|
||||
endif()
|
||||
if (_pkg_VERBOSE AND (${pkgname}_FOUND OR ${pkgname_upper}_FOUND OR _pkg_DEBUG))
|
||||
if (_pkg_DEBUG)
|
||||
dump_matching_variables (${pkgname})
|
||||
endif ()
|
||||
set (_vars_to_print ${pkgname}_INCLUDES ${pkgname_upper}_INCLUDES
|
||||
${pkgname}_INCLUDE_DIR ${pkgname_upper}_INCLUDE_DIR
|
||||
${pkgname}_INCLUDE_DIRS ${pkgname_upper}_INCLUDE_DIRS
|
||||
${pkgname}_LIBRARIES ${pkgname_upper}_LIBRARIES
|
||||
${_pkg_PRINT})
|
||||
list (REMOVE_DUPLICATES _vars_to_print)
|
||||
foreach (_v IN LISTS _vars_to_print)
|
||||
if (NOT "${${_v}}" STREQUAL "")
|
||||
message (STATUS " ${_v} = ${${_v}}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
endif ()
|
||||
else ()
|
||||
if (NOT _quietskip)
|
||||
message (STATUS "${ColorRed}Not using ${pkgname} -- disabled ${_disablereason} ${ColorReset}")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
|
||||
# Define color codes for pretty terminal output
|
||||
|
||||
+65
-138
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
@@ -27,13 +27,11 @@ message (STATUS "CMAKE_CXX_COMPILER_ID = ${CMAKE_CXX_COMPILER_ID}")
|
||||
###########################################################################
|
||||
# C++ language standard
|
||||
#
|
||||
set (CMAKE_CXX_STANDARD 14 CACHE STRING
|
||||
"C++ standard to build with (14, 17, 20, etc.)")
|
||||
set (DOWNSTREAM_CXX_STANDARD 14 CACHE STRING
|
||||
"C++ minimum standard to impose on downstream clients")
|
||||
set (CMAKE_CXX_STANDARD 11 CACHE STRING
|
||||
"C++ standard to prefer (11, 14, 17, 20, etc.)")
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||
message (STATUS "Building with C++${CMAKE_CXX_STANDARD}, downstream minimum C++${DOWNSTREAM_CXX_STANDARD}")
|
||||
message (STATUS "Building for C++${CMAKE_CXX_STANDARD}")
|
||||
|
||||
|
||||
###########################################################################
|
||||
@@ -51,8 +49,7 @@ else ()
|
||||
set (GCC_VERSION 0)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "[Cc]lang"
|
||||
OR CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "[Cc]lang")
|
||||
# If using any flavor of clang, set CMAKE_COMPILER_IS_CLANG. If it's
|
||||
# Apple's variety, set CMAKE_COMPILER_IS_APPLECLANG and
|
||||
# APPLECLANG_VERSION_STRING, otherwise for generic clang set
|
||||
@@ -66,12 +63,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER MATCHES "[Cc]lan
|
||||
if (VERBOSE)
|
||||
message (STATUS "The compiler is Clang: ${CMAKE_CXX_COMPILER_ID} version ${APPLECLANG_VERSION_STRING}")
|
||||
endif ()
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM")
|
||||
set (CMAKE_COMPILER_IS_INTELCLANG 1)
|
||||
string (REGEX MATCH "[0-9]+(\\.[0-9]+)+" INTELCLANG_VERSION_STRING ${clang_full_version_string})
|
||||
if (VERBOSE)
|
||||
message (STATUS "The compiler is Intel Clang: ${CMAKE_CXX_COMPILER_ID} version ${INTELCLANG_VERSION_STRING}")
|
||||
endif ()
|
||||
else ()
|
||||
string (REGEX REPLACE ".* version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${clang_full_version_string})
|
||||
if (VERBOSE)
|
||||
@@ -89,14 +80,10 @@ endif ()
|
||||
###########################################################################
|
||||
# Turn on more detailed warnings and optionally consider warnings as errors
|
||||
#
|
||||
if (NOT ${PROJECT_NAME}_SUPPORTED_RELEASE OR DEFINED ENV{${PROJECT_NAME}_CI})
|
||||
# For development branches (i.e., not a supported release), or when
|
||||
# running CI, default to treating all warnings as errors.
|
||||
option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
|
||||
else ()
|
||||
# For release branches not doing a CI build default to just printing
|
||||
# warnings but not letting them stop the build.
|
||||
if (${PROJECT_NAME}_SUPPORTED_RELEASE)
|
||||
option (STOP_ON_WARNING "Stop building if there are any compiler warnings" OFF)
|
||||
else ()
|
||||
option (STOP_ON_WARNING "Stop building if there are any compiler warnings" ON)
|
||||
endif()
|
||||
option (EXTRA_WARNINGS "Enable lots of extra pedantic warnings" OFF)
|
||||
if (NOT MSVC)
|
||||
@@ -104,8 +91,11 @@ if (NOT MSVC)
|
||||
if (EXTRA_WARNINGS)
|
||||
add_compile_options ("-Wextra")
|
||||
endif ()
|
||||
if (STOP_ON_WARNING)
|
||||
if (STOP_ON_WARNING OR DEFINED ENV{CI})
|
||||
add_compile_options ("-Werror")
|
||||
# N.B. Force CI builds to use -Werror, even if STOP_ON_WARNING has
|
||||
# been switched off by default, which we may do in release
|
||||
# branches.
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
@@ -125,7 +115,7 @@ set (CXX_VISIBILITY_PRESET "hidden" CACHE STRING "Symbol visibility (hidden or d
|
||||
option (VISIBILITY_INLINES_HIDDEN "Hide symbol visibility of inline functions" ON)
|
||||
set (VISIBILITY_MAP_FILE "${PROJECT_SOURCE_DIR}/src/build-scripts/hidesymbols.map" CACHE FILEPATH "Visibility map file")
|
||||
set (C_VISIBILITY_PRESET ${CXX_VISIBILITY_PRESET})
|
||||
if (${CXX_VISIBILITY_PRESET} STREQUAL "hidden" AND VISIBILITY_MAP_FILE AND
|
||||
if (${CXX_VISIBILITY_PRESET} STREQUAL "hidden" AND
|
||||
(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) AND
|
||||
(CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU"))
|
||||
# Linux/FreeBSD/Hurd: also hide all the symbols of dependent libraries
|
||||
@@ -160,9 +150,6 @@ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG)
|
||||
# Don't warn about using unknown preprocessor symbols in `#if`
|
||||
add_compile_options ("-Wno-expansion-to-defined")
|
||||
endif ()
|
||||
if (CMAKE_GENERATOR MATCHES "Xcode")
|
||||
add_compile_options ("-Wno-shorten-64-to-32")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC AND NOT (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_APPLECLANG))
|
||||
@@ -181,11 +168,8 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||
# Ensure this macro is set for stdint.h
|
||||
add_definitions ("-D__STDC_LIMIT_MACROS")
|
||||
add_definitions ("-D__STDC_CONSTANT_MACROS")
|
||||
endif ()
|
||||
|
||||
if (INTELCLANG_VERSION_STRING VERSION_GREATER_EQUAL 2022.1.0)
|
||||
# New versions of icx warn about changing certain floating point options
|
||||
add_compile_options ("-Wno-overriding-t-option")
|
||||
# this allows native instructions to be used for sqrtf instead of a function call
|
||||
add_compile_options ("-fno-math-errno")
|
||||
endif ()
|
||||
|
||||
if (MSVC)
|
||||
@@ -204,32 +188,6 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"
|
||||
add_compile_options (-march=i586)
|
||||
endif ()
|
||||
|
||||
# Fast-math mode may go faster, but it breaks IEEE and also makes inconsistent
|
||||
# results on different compilers/platforms, so we don't use it by default.
|
||||
option (ENABLE_FAST_MATH "Use fast math (may break IEEE fp rules)" OFF)
|
||||
if (ENABLE_FAST_MATH)
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||
add_compile_options ("-ffast-math")
|
||||
elseif (MSVC)
|
||||
add_compile_options ("/fp:fast")
|
||||
endif ()
|
||||
else ()
|
||||
if (CMAKE_COMPILER_IS_INTELCLANG)
|
||||
# Intel icx is fast-math by default, so if we don't want that, we need
|
||||
# to explicitly disable it.
|
||||
add_compile_options ("-fno-fast-math")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
|
||||
# this allows native instructions to be used for sqrtf instead of a function call
|
||||
add_compile_options ("-fno-math-errno")
|
||||
endif ()
|
||||
|
||||
|
||||
# We will use this for ccache and timing
|
||||
set (MY_RULE_LAUNCH "")
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Use ccache if found
|
||||
@@ -244,30 +202,12 @@ if (CCACHE_FOUND AND USE_CCACHE)
|
||||
if (CMAKE_COMPILER_IS_CLANG AND USE_QT AND (NOT DEFINED ENV{CCACHE_CPP2}))
|
||||
message (STATUS "Ignoring ccache because clang + Qt + env CCACHE_CPP2 is not set")
|
||||
else ()
|
||||
set (MY_RULE_LAUNCH ccache)
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Build time debugging aid: time all compile & link commands
|
||||
#
|
||||
# Note, though, that this is not especially helpful when doing a parallel
|
||||
# build. If you wish to time individual compile commands, it's best to also
|
||||
# set `-j 1` or CMAKE_BUILD_PARALLEL_LEVEL to 1.
|
||||
option (TIME_COMMANDS "Time each compile and link command" OFF)
|
||||
if (TIME_COMMANDS)
|
||||
set (MY_RULE_LAUNCH "${CMAKE_COMMAND} -E time ${MY_RULE_LAUNCH}")
|
||||
endif ()
|
||||
|
||||
|
||||
# Note: This must be after any option that alters MY_RULE_LAUNCH
|
||||
if (MY_RULE_LAUNCH)
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${MY_RULE_LAUNCH})
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ${MY_RULE_LAUNCH})
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Option to force use of libc++ (the LLVM project's alternate C++ standard
|
||||
# library). Currently this only has an effect if using clang as the
|
||||
@@ -341,18 +281,36 @@ if (NOT VERBOSE)
|
||||
set (CMAKE_REQUIRED_QUIET 1)
|
||||
endif ()
|
||||
include (CMakePushCheckState)
|
||||
include (CheckCXXSourceCompiles)
|
||||
include (CheckCXXSourceRuns)
|
||||
include (CheckLibraryExists)
|
||||
|
||||
###########################################################################
|
||||
# Find out if it's safe for us to use std::regex or if we need boost.regex.
|
||||
# This is primarily about gcc 4.8 having a broken regex implementation.
|
||||
# This will be obsolete once our minimum supported gcc is >= 4.9.
|
||||
#
|
||||
cmake_push_check_state ()
|
||||
check_cxx_source_runs("
|
||||
#include <regex>
|
||||
int main() {
|
||||
std::string r = std::regex_replace(std::string(\"abc\"), std::regex(\"b\"), \" \");
|
||||
return r == \"a c\" ? 0 : -1;
|
||||
}"
|
||||
USE_STD_REGEX)
|
||||
cmake_pop_check_state ()
|
||||
if (USE_STD_REGEX)
|
||||
add_definitions (-DUSE_STD_REGEX)
|
||||
else ()
|
||||
add_definitions (-DUSE_BOOST_REGEX)
|
||||
endif ()
|
||||
|
||||
###########################################################################
|
||||
# Check if we need libatomic on this platform. We shouldn't on mainstream
|
||||
# x86/x86_64, but might on some other platforms.
|
||||
#
|
||||
if (NOT MSVC AND NOT APPLE AND NOT ANDROID)
|
||||
if (NOT MSVC AND NOT APPLE)
|
||||
cmake_push_check_state ()
|
||||
check_cxx_source_compiles(
|
||||
check_cxx_source_runs(
|
||||
"#include <atomic>
|
||||
#include <cstdint>
|
||||
std::atomic<uint64_t> x {0};
|
||||
@@ -378,38 +336,17 @@ if (NOT MSVC AND NOT APPLE AND NOT ANDROID)
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Check if we need have std::filesystem on this platform.
|
||||
#
|
||||
cmake_push_check_state ()
|
||||
set (CMAKE_REQUIRED_DEFINITIONS ${CSTD_FLAGS})
|
||||
check_cxx_source_compiles("#include <filesystem>
|
||||
int main() { std::filesystem::path p; return 0; }"
|
||||
USE_STD_FILESYSTEM)
|
||||
if (USE_STD_FILESYSTEM AND GCC_VERSION AND GCC_VERSION VERSION_LESS 9.0)
|
||||
message (STATUS "Excluding USE_STD_FILESYSTEM because gcc is ${GCC_VERSION}")
|
||||
set (USE_STD_FILESYSTEM OFF)
|
||||
endif ()
|
||||
if (USE_STD_FILESYSTEM)
|
||||
# Note: std::filesystem seems unreliable for gcc until 9
|
||||
message (STATUS "Compiler supports std::filesystem")
|
||||
add_definitions (-DUSE_STD_FILESYSTEM)
|
||||
else ()
|
||||
message (STATUS "Using Boost::filesystem")
|
||||
add_definitions (-DUSE_BOOST_FILESYSTEM)
|
||||
endif ()
|
||||
cmake_pop_check_state ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Code coverage options
|
||||
#
|
||||
option (CODECOV "Build code coverage tests" OFF)
|
||||
if (CODECOV AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))
|
||||
message (STATUS "Compiling for code coverage analysis")
|
||||
add_compile_options (-ftest-coverage -fprofile-arcs)
|
||||
add_link_options (-ftest-coverage -fprofile-arcs)
|
||||
add_compile_options ("-ftest-coverage -fprofile-arcs -O0")
|
||||
add_definitions ("-D${PROJ_NAME}_CODE_COVERAGE=1")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage -fprofile-arcs")
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -423,9 +360,22 @@ if (SANITIZE AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))
|
||||
foreach (feature ${SANITIZE_FEATURE_LIST})
|
||||
message (STATUS " sanitize feature: ${feature}")
|
||||
add_compile_options (-fsanitize=${feature})
|
||||
add_link_options (-fsanitize=${feature})
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=${feature}")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=${feature}")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=${feature}")
|
||||
endforeach()
|
||||
add_compile_options (-g -fno-omit-frame-pointer)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set (SANITIZE_ON_LINUX 1)
|
||||
endif ()
|
||||
if (CMAKE_COMPILER_IS_GNUCC AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
add_compile_options ("-fuse-ld=gold")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold")
|
||||
set (SANITIZE_LIBRARIES "asan;pthread")
|
||||
# set (SANITIZE_LIBRARIES "asan" "ubsan")
|
||||
endif()
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
# turn on glibcxx extra annotations to find vector writes past end
|
||||
add_definitions ("-D_GLIBCXX_SANITIZE_VECTOR=1")
|
||||
@@ -434,29 +384,6 @@ if (SANITIZE AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Fortification and hardening options
|
||||
#
|
||||
# In modern gcc and clang, FORTIFY_SOURCE provides buffer overflow checks
|
||||
# (with some compiler-assisted deduction of buffer lengths) for the following
|
||||
# functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy, strncpy,
|
||||
# strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf, gets.
|
||||
#
|
||||
# We try to avoid these unsafe functions anyway, but it's good to have the
|
||||
# extra protection, at least as an extra set of checks during CI. Some users
|
||||
# may also wish to enable it at some level if they are deploying it in a
|
||||
# security-sensitive environment. FORTIFY_SOURCE=3 may have minor performance
|
||||
# impact, though FORTIFY_SOURCE=2 should not have a measurable effect on
|
||||
# performance versus not doing any fortification. All fortification levels are
|
||||
# not available in all compilers.
|
||||
|
||||
set (FORTIFY_SOURCE "0" CACHE STRING "Turn on Fortification level (0, 1, 2, 3)")
|
||||
if (FORTIFY_SOURCE AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))
|
||||
message (STATUS "Compiling with _FORTIFY_SOURCE=${FORTIFY_SOURCE}")
|
||||
add_compile_options (-D_FORTIFY_SOURCE=${FORTIFY_SOURCE})
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# clang-tidy options
|
||||
#
|
||||
@@ -511,15 +438,16 @@ endif ()
|
||||
#
|
||||
# Note: skip all of this checking, setup, and cmake-format target if this
|
||||
# is being built as a subproject.
|
||||
if (PROJECT_IS_TOP_LEVEL)
|
||||
if (NOT ${PROJECT_NAME}_IS_SUBPROJECT)
|
||||
set (CLANG_FORMAT_EXE_HINT "" CACHE PATH "clang-format executable's directory (will search if not specified")
|
||||
set (CLANG_FORMAT_INCLUDES "src/*.h" "src/*.cpp"
|
||||
CACHE STRING "Glob patterns to include for clang-format")
|
||||
set (CLANG_FORMAT_EXCLUDES "*pugixml*" "*SHA1*" "*/farmhash.cpp"
|
||||
"src/dpx.imageio/libdpx/*"
|
||||
"src/cineon.imageio/libcineon/*"
|
||||
"src/dds.imageio/bcdec.h"
|
||||
"src/dds.imageio/squish/*"
|
||||
"src/gif.imageio/gif.h"
|
||||
"src/hdr.imageio/rgbe.cpp"
|
||||
"src/libutil/stb_sprintf.h"
|
||||
CACHE STRING "Glob patterns to exclude for clang-format")
|
||||
find_program (CLANG_FORMAT_EXE
|
||||
@@ -554,7 +482,7 @@ endif ()
|
||||
set (EXTRA_CPP_ARGS "" CACHE STRING "Extra C++ command line definitions")
|
||||
if (EXTRA_CPP_ARGS)
|
||||
message (STATUS "Extra C++ args: ${EXTRA_CPP_ARGS}")
|
||||
add_compile_options (${EXTRA_CPP_ARGS})
|
||||
add_compile_options ("${EXTRA_CPP_ARGS}")
|
||||
endif()
|
||||
set (EXTRA_DSO_LINK_ARGS "" CACHE STRING "Extra command line definitions when building DSOs")
|
||||
|
||||
@@ -606,10 +534,9 @@ endif ()
|
||||
|
||||
###########################################################################
|
||||
# Any extra logic to be run only for CI builds goes here.
|
||||
# We expect our own CI runs to define env variable ${PROJECT_NAME}_CI
|
||||
#
|
||||
if (DEFINED ENV{${PROJECT_NAME}_CI})
|
||||
add_definitions (-D${PROJ_NAME}_CI=1 -DBUILD_CI=1)
|
||||
if (DEFINED ENV{CI} OR DEFINED ENV{GITHUB_ACTIONS})
|
||||
add_definitions ("-D${PROJ_NAME}_CI=1" "-DBUILD_CI=1")
|
||||
if (APPLE)
|
||||
# Keep Mono framework from being incorrectly searched for include
|
||||
# files on GitHub Actions CI.
|
||||
@@ -621,7 +548,7 @@ endif ()
|
||||
###########################################################################
|
||||
# Rpath handling at the install step
|
||||
#
|
||||
# set (MACOSX_RPATH ON)
|
||||
set (MACOSX_RPATH ON)
|
||||
if (CMAKE_SKIP_RPATH)
|
||||
# We need to disallow the user from truly setting CMAKE_SKIP_RPATH, since
|
||||
# we want to run the generated executables from the build tree in order to
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
###########################################################################
|
||||
# Find external dependencies
|
||||
@@ -23,14 +23,12 @@ message (STATUS "${ColorReset}")
|
||||
|
||||
set (OIIO_LOCAL_DEPS_PATH "${CMAKE_SOURCE_DIR}/ext/dist" CACHE STRING
|
||||
"Local area for dependencies added to CMAKE_PREFIX_PATH")
|
||||
list (APPEND CMAKE_PREFIX_PATH ${OIIO_LOCAL_DEPS_PATH})
|
||||
list (APPEND CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR}/ext/dist)
|
||||
|
||||
include (ExternalProject)
|
||||
|
||||
option (BUILD_MISSING_DEPS "Try to download and build any missing dependencies" OFF)
|
||||
|
||||
include (FindThreads)
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Boost setup
|
||||
@@ -52,26 +50,28 @@ if (MSVC)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
set (Boost_COMPONENTS thread)
|
||||
if (NOT USE_STD_FILESYSTEM)
|
||||
list (APPEND Boost_COMPONENTS filesystem)
|
||||
endif ()
|
||||
message (STATUS "Boost_COMPONENTS = ${Boost_COMPONENTS}")
|
||||
# The FindBoost.cmake interface is broken if it uses boost's installed
|
||||
# cmake output (e.g. boost 1.70.0, cmake <= 3.14). Specifically it fails
|
||||
# to set the expected variables printed below. So until that's fixed
|
||||
# force FindBoost.cmake to use the original brute force path.
|
||||
if (NOT DEFINED Boost_NO_BOOST_CMAKE)
|
||||
if (BOOST_CUSTOM)
|
||||
set (Boost_FOUND true)
|
||||
# N.B. For a custom version, the caller had better set up the variables
|
||||
# Boost_VERSION, Boost_INCLUDE_DIRS, Boost_LIBRARY_DIRS, Boost_LIBRARIES.
|
||||
else ()
|
||||
set (Boost_COMPONENTS filesystem system thread)
|
||||
if (NOT USE_STD_REGEX)
|
||||
list (APPEND Boost_COMPONENTS regex)
|
||||
endif ()
|
||||
# The FindBoost.cmake interface is broken if it uses boost's installed
|
||||
# cmake output (e.g. boost 1.70.0, cmake <= 3.14). Specifically it fails
|
||||
# to set the expected variables printed below. So until that's fixed
|
||||
# force FindBoost.cmake to use the original brute force path.
|
||||
set (Boost_NO_BOOST_CMAKE ON)
|
||||
checked_find_package (Boost REQUIRED
|
||||
VERSION_MIN 1.53
|
||||
COMPONENTS ${Boost_COMPONENTS}
|
||||
RECOMMEND_MIN 1.66
|
||||
RECOMMEND_MIN_REASON "Boost 1.66 is the oldest version our CI tests against"
|
||||
PRINT Boost_INCLUDE_DIRS Boost_LIBRARIES )
|
||||
endif ()
|
||||
|
||||
checked_find_package (Boost REQUIRED
|
||||
VERSION_MIN 1.53
|
||||
COMPONENTS ${Boost_COMPONENTS}
|
||||
RECOMMEND_MIN 1.66
|
||||
RECOMMEND_MIN_REASON "Boost 1.66 is the oldest version our CI tests against"
|
||||
PRINT Boost_INCLUDE_DIRS Boost_LIBRARIES )
|
||||
|
||||
# On Linux, Boost 1.55 and higher seems to need to link against -lrt
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND ${Boost_VERSION} VERSION_GREATER_EQUAL 105500)
|
||||
@@ -81,8 +81,6 @@ endif ()
|
||||
include_directories (SYSTEM "${Boost_INCLUDE_DIRS}")
|
||||
link_directories ("${Boost_LIBRARY_DIRS}")
|
||||
|
||||
option (OIIO_DISABLE_BOOST_STACKTRACE "Disable use of Boost stacktrace." OFF)
|
||||
|
||||
# end Boost setup
|
||||
###########################################################################
|
||||
|
||||
@@ -99,52 +97,36 @@ checked_find_package (TIFF REQUIRED
|
||||
|
||||
# IlmBase & OpenEXR
|
||||
checked_find_package (OpenEXR REQUIRED
|
||||
VERSION_MIN 2.3
|
||||
RECOMMEND_MIN 2.4
|
||||
VERSION_MIN 2.0
|
||||
RECOMMEND_MIN 2.2
|
||||
RECOMMEND_MIN_REASON "for DWA compression"
|
||||
PRINT IMATH_INCLUDES OPENEXR_INCLUDES)
|
||||
# Force Imath includes to be before everything else to ensure that we have
|
||||
# the right Imath/OpenEXR version, not some older version in the system
|
||||
# library. This shouldn't be necessary, except for the common case of people
|
||||
# library. This shoudn't be necessary, except for the common case of people
|
||||
# building against Imath/OpenEXR 3.x when there is still a system-level
|
||||
# install version of 2.x.
|
||||
include_directories(BEFORE ${IMATH_INCLUDES} ${OPENEXR_INCLUDES})
|
||||
if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3)
|
||||
# clang C++ >= 11 doesn't like 'register' keyword in old exr headers
|
||||
add_compile_options (-Wno-deprecated-register)
|
||||
endif ()
|
||||
if (MSVC AND NOT LINKSTATIC)
|
||||
add_definitions (-DOPENEXR_DLL) # Is this needed for new versions?
|
||||
endif ()
|
||||
if (OpenEXR_VERSION VERSION_GREATER_EQUAL 3.0)
|
||||
|
||||
if (OPENEXR_VERSION VERSION_GREATER_EQUAL 2.5.99)
|
||||
set (OIIO_USING_IMATH 3)
|
||||
else ()
|
||||
set (OIIO_USING_IMATH 2)
|
||||
endif ()
|
||||
set (OPENIMAGEIO_IMATH_TARGETS
|
||||
# For OpenEXR/Imath 3.x:
|
||||
$<TARGET_NAME_IF_EXISTS:Imath::Imath>
|
||||
$<TARGET_NAME_IF_EXISTS:Imath::Half>
|
||||
# For OpenEXR >= 2.4/2.5 with reliable exported targets
|
||||
$<TARGET_NAME_IF_EXISTS:IlmBase::Imath>
|
||||
$<TARGET_NAME_IF_EXISTS:IlmBase::Half>
|
||||
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex>
|
||||
# For OpenEXR <= 2.3:
|
||||
${ILMBASE_LIBRARIES} )
|
||||
set (OPENIMAGEIO_OPENEXR_TARGETS
|
||||
# For OpenEXR/Imath 3.x:
|
||||
$<TARGET_NAME_IF_EXISTS:OpenEXR::OpenEXR>
|
||||
# For OpenEXR >= 2.4/2.5 with reliable exported targets
|
||||
$<TARGET_NAME_IF_EXISTS:OpenEXR::IlmImf>
|
||||
$<TARGET_NAME_IF_EXISTS:IlmBase::IlmThread>
|
||||
$<TARGET_NAME_IF_EXISTS:IlmBase::Iex>
|
||||
# For OpenEXR <= 2.3:
|
||||
${OPENEXR_LIBRARIES} )
|
||||
set (OPENIMAGEIO_IMATH_DEPENDENCY_VISIBILITY "PUBLIC" CACHE STRING
|
||||
"Should we expose Imath library dependency as PUBLIC or PRIVATE")
|
||||
set (OPENIMAGEIO_CONFIG_DO_NOT_FIND_IMATH OFF CACHE BOOL
|
||||
"Exclude find_dependency(Imath) from the exported OpenImageIOConfig.cmake")
|
||||
|
||||
|
||||
# JPEG -- prefer Turbo-JPEG to regular libjpeg
|
||||
checked_find_package (JPEGTurbo
|
||||
DEFINITIONS -DUSE_JPEG_TURBO=1
|
||||
PRINT JPEG_INCLUDES JPEG_INCLUDE_DIRS
|
||||
JPEG_LIBRARIES JPEG_VERSION)
|
||||
JPEG_LIBRARIES)
|
||||
if (NOT JPEG_FOUND) # Try to find the non-turbo version
|
||||
checked_find_package (JPEG REQUIRED)
|
||||
endif ()
|
||||
@@ -179,24 +161,24 @@ endif ()
|
||||
checked_find_package (Freetype
|
||||
DEFINITIONS -DUSE_FREETYPE=1 )
|
||||
|
||||
checked_find_package (HDF5
|
||||
ISDEPOF Field3D)
|
||||
checked_find_package (OpenColorIO
|
||||
DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1
|
||||
# PREFER_CONFIG
|
||||
)
|
||||
if (NOT OpenColorIO_FOUND)
|
||||
set (OpenColorIO_FOUND 0)
|
||||
endif ()
|
||||
checked_find_package (OpenCV 3.0
|
||||
DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1)
|
||||
checked_find_package (OpenCV
|
||||
DEFINITIONS -DUSE_OPENCV=1)
|
||||
|
||||
# Intel TBB
|
||||
set (TBB_USE_DEBUG_BUILD OFF)
|
||||
checked_find_package (TBB 2017
|
||||
SETVARIABLES OIIO_TBB
|
||||
DEFINITIONS -DUSE_TBB=1
|
||||
PREFER_CONFIG)
|
||||
|
||||
checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images
|
||||
checked_find_package (FFmpeg VERSION_MIN 3.0)
|
||||
checked_find_package (FFmpeg VERSION_MIN 2.6)
|
||||
checked_find_package (Field3D
|
||||
DEPS HDF5
|
||||
DEFINITIONS -DUSE_FIELD3D=1)
|
||||
checked_find_package (GIF
|
||||
VERSION_MIN 4
|
||||
RECOMMEND_MIN 5.0
|
||||
@@ -224,16 +206,24 @@ if (LibRaw_FOUND AND LibRaw_VERSION VERSION_LESS 0.20 AND CMAKE_CXX_STANDARD VER
|
||||
# set (LIBRAW_FOUND 0)
|
||||
endif ()
|
||||
|
||||
checked_find_package (OpenJPEG VERSION_MIN 2.0
|
||||
RECOMMEND_MIN 2.2
|
||||
RECOMMEND_MIN_REASON "for multithreading support")
|
||||
# Note: Recent OpenJPEG versions have exported cmake configs, but we don't
|
||||
# find them reliable at all, so we stick to our FindOpenJPEG.cmake module.
|
||||
checked_find_package (OpenJPEG VERSION_MIN 2.0)
|
||||
|
||||
checked_find_package (OpenVDB
|
||||
VERSION_MIN 5.0
|
||||
DEPS TBB
|
||||
DEFINITIONS -DUSE_OPENVDB=1)
|
||||
if (OpenVDB_FOUND AND OpenVDB_VERSION VERSION_GREATER_EQUAL 8.0
|
||||
AND CMAKE_CXX_STANDARD VERSION_LESS 14)
|
||||
set (OpenVDB_FOUND OFF)
|
||||
add_definitions (-UUSE_OPENVDB)
|
||||
message (WARNING
|
||||
"${ColorYellow}OpenVDB 8.0+ requires C++14 or higher (was ${CMAKE_CXX_STANDARD}). "
|
||||
"To build against this OpenVDB ${OpenVDB_VERSION}, you need to set "
|
||||
"build option CMAKE_CXX_STANDARD=14 (or higher). The minimum requirements "
|
||||
"for that are gcc >= 5.1, clang >= 3.5, Apple clang >= 7, icc >= 7, MSVS >= 2017. "
|
||||
"If you must use C++11, you need to build against OpenVDB 7 or earlier. ${ColorReset}")
|
||||
message (STATUS "${ColorRed}Not using OpenVDB -- OpenVDB ${OpenVDB_VERSION} requires C++14 or later. ${ColorReset}")
|
||||
endif ()
|
||||
|
||||
checked_find_package (Ptex PREFER_CONFIG)
|
||||
if (NOT Ptex_FOUND OR NOT Ptex_VERSION)
|
||||
@@ -251,24 +241,23 @@ checked_find_package (R3DSDK) # RED camera
|
||||
set (NUKE_VERSION "7.0" CACHE STRING "Nuke version to target")
|
||||
checked_find_package (Nuke)
|
||||
|
||||
checked_find_package (OpenGL) # used for iv
|
||||
|
||||
# Qt -- used for iv
|
||||
set (qt5_modules Core Gui Widgets)
|
||||
if (OPENGL_FOUND)
|
||||
list (APPEND qt5_modules OpenGL)
|
||||
endif ()
|
||||
option (USE_QT "Use Qt if found" ON)
|
||||
if (USE_QT)
|
||||
checked_find_package (OpenGL) # used for iv
|
||||
endif ()
|
||||
if (USE_QT AND OPENGL_FOUND)
|
||||
checked_find_package (Qt6 COMPONENTS Core Gui Widgets OpenGLWidgets)
|
||||
if (NOT Qt6_FOUND)
|
||||
checked_find_package (Qt5 COMPONENTS Core Gui Widgets OpenGL)
|
||||
endif ()
|
||||
if (NOT Qt5_FOUND AND NOT Qt6_FOUND AND APPLE)
|
||||
message (STATUS " If you think you installed qt with Homebrew and it still doesn't work,")
|
||||
message (STATUS " try: export PATH=/usr/local/opt/qt/bin:$PATH")
|
||||
endif ()
|
||||
checked_find_package (Qt5 COMPONENTS ${qt5_modules})
|
||||
if (USE_QT AND NOT Qt5_FOUND AND APPLE)
|
||||
message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,")
|
||||
message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH")
|
||||
endif ()
|
||||
|
||||
|
||||
|
||||
|
||||
###########################################################################
|
||||
# Tessil/robin-map
|
||||
|
||||
@@ -309,13 +298,22 @@ macro (find_or_download_robin_map)
|
||||
endmacro()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# libsquish
|
||||
|
||||
option (USE_EMBEDDED_LIBSQUISH
|
||||
"Force use of embedded Libsquish, even if external is found" OFF)
|
||||
if (NOT USE_EMBEDDED_LIBSQUISH)
|
||||
checked_find_package (Libsquish)
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################################################
|
||||
# fmtlib
|
||||
|
||||
option (BUILD_FMT_FORCE "Force local download/build of fmt even if installed" OFF)
|
||||
option (BUILD_MISSING_FMT "Local download/build of fmt if not installed" ON)
|
||||
option (INTERNALIZE_FMT "Copy fmt headers into <install>/include/OpenImageIO/detail/fmt" ON)
|
||||
set (BUILD_FMT_VERSION "9.0.0" CACHE STRING "Preferred fmtlib/fmt version, when downloading/building our own")
|
||||
set (BUILD_FMT_VERSION "7.1.3" CACHE STRING "Preferred fmtlib/fmt version, when downloading/building our own")
|
||||
|
||||
macro (find_or_download_fmt)
|
||||
# If we weren't told to force our own download/build of fmt, look
|
||||
@@ -344,16 +342,9 @@ macro (find_or_download_fmt)
|
||||
endif ()
|
||||
endif ()
|
||||
set (FMT_INCLUDE_DIR "${FMT_INSTALL_DIR}/include")
|
||||
set (OIIO_USING_FMT_LOCAL TRUE)
|
||||
else ()
|
||||
set (OIIO_USING_FMT_LOCAL FALSE)
|
||||
endif ()
|
||||
checked_find_package (fmt REQUIRED)
|
||||
endmacro()
|
||||
|
||||
find_or_download_fmt()
|
||||
|
||||
if (FMT_VERSION VERSION_EQUAL 90100
|
||||
AND GCC_VERSION VERSION_GREATER 0.0 AND NOT GCC_VERSION VERSION_GREATER 7.2)
|
||||
message (WARNING "${ColorRed}fmt 9.1 is known to not work with gcc <= 7.2${ColorReset}")
|
||||
endif ()
|
||||
include_directories (${FMT_INCLUDES})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# Macro to add an executable build target. The executable name can be
|
||||
@@ -12,9 +12,6 @@
|
||||
# The executable may be disabled individually using any of the usual
|
||||
# check_is_enabled() conventions (e.g. -DENABLE_<executable>=OFF).
|
||||
#
|
||||
# If -DENABLE_INSTALL_<executable>=OFF was specified, the target will be built
|
||||
# (in the build area) but will not be installed.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# fancy_add_executable ([ NAME targetname ... ]
|
||||
@@ -51,17 +48,7 @@ macro (fancy_add_executable)
|
||||
target_link_libraries (${_target_NAME} PRIVATE ${_target_LINK_LIBRARIES})
|
||||
endif ()
|
||||
set_target_properties (${_target_NAME} PROPERTIES FOLDER "Tools")
|
||||
check_is_enabled (INSTALL_${_target_NAME} _target_NAME_INSTALL_enabled)
|
||||
if (CMAKE_UNITY_BUILD AND UNITY_BUILD_MODE STREQUAL GROUP)
|
||||
set_source_files_properties(${_target_SRC} PROPERTIES
|
||||
UNITY_GROUP ${_target_NAME})
|
||||
if (VERBOSE)
|
||||
message (STATUS "Unity group ${_target_NAME} = ${_target_SRC}")
|
||||
endif ()
|
||||
endif ()
|
||||
if (_target_NAME_INSTALL_enabled)
|
||||
install_targets (${_target_NAME})
|
||||
endif ()
|
||||
install_targets (${_target_NAME})
|
||||
else ()
|
||||
message (STATUS "${ColorRed}Disabling ${_target_NAME} ${ColorReset}")
|
||||
endif ()
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
# Module to find DCMTK
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - DCMTK_ROOT, DCMTK_INCLUDE_PATH, DCMTK_LIBRARY_PATH
|
||||
#
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
# BSD license.
|
||||
#
|
||||
# Modifications:
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
# Copyright 2008-present Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
|
||||
|
||||
if (FFMPEG_INCLUDES AND FFMPEG_LIBRARIES)
|
||||
set (FFmpeg_FOUND TRUE)
|
||||
@@ -59,25 +59,17 @@ else ()
|
||||
endif ()
|
||||
|
||||
if (FFMPEG_INCLUDES)
|
||||
set (_libavcodec_version_major_h "${FFMPEG_INCLUDES}/libavcodec/version_major.h")
|
||||
if (NOT EXISTS "${_libavcodec_version_major_h}")
|
||||
set (_libavcodec_version_major_h "${FFMPEG_INCLUDES}/libavcodec/version.h")
|
||||
endif()
|
||||
file(STRINGS "${_libavcodec_version_major_h}" TMP
|
||||
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
|
||||
REGEX "^#define LIBAVCODEC_VERSION_MAJOR .*$")
|
||||
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MAJOR "${TMP}")
|
||||
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MAJOR ${TMP})
|
||||
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
|
||||
REGEX "^#define LIBAVCODEC_VERSION_MINOR .*$")
|
||||
string (REGEX MATCHALL "[0-9]+[.]?[0-9]*" LIBAVCODEC_VERSION_MINOR "${TMP}")
|
||||
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MINOR ${TMP})
|
||||
file(STRINGS "${FFMPEG_INCLUDES}/libavcodec/version.h" TMP
|
||||
REGEX "^#define LIBAVCODEC_VERSION_MICRO .*$")
|
||||
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MICRO "${TMP}")
|
||||
string (REGEX MATCHALL "[0-9]+[.0-9]+" LIBAVCODEC_VERSION_MICRO ${TMP})
|
||||
set (LIBAVCODEC_VERSION "${LIBAVCODEC_VERSION_MAJOR}.${LIBAVCODEC_VERSION_MINOR}.${LIBAVCODEC_VERSION_MICRO}")
|
||||
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 60.3.100)
|
||||
set (FFMPEG_VERSION 6.0)
|
||||
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.37.100)
|
||||
set (FFMPEG_VERSION 5.1)
|
||||
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.18.100)
|
||||
if (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 59.18.100)
|
||||
set (FFMPEG_VERSION 5.0)
|
||||
elseif (LIBAVCODEC_VERSION VERSION_GREATER_EQUAL 58.134.100)
|
||||
set (FFMPEG_VERSION 4.4)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# Module to find Field3D
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - Field3D_ROOT, FIELD3D_INCLUDE_PATH, FIELD3D_LIBRARY_PATH
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# Field3D_FOUND True if Field3D was found.
|
||||
# FIELD3D_INCLUDES Where to find Field3D headers
|
||||
# FIELD3D_LIBRARIES List of libraries to link against when using Field3D
|
||||
# FIELD3D_VERSION Version of Field3D (e.g., 3.6.2)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
find_path (FIELD3D_INCLUDE_DIR Field3D/Field.h
|
||||
HINTS
|
||||
${FIELD3D_INCLUDE_PATH}
|
||||
ENV FIELD3D_INCLUDE_PATH
|
||||
DOC "The directory where Field3D headers reside")
|
||||
|
||||
find_library (FIELD3D_LIBRARY Field3D
|
||||
HINTS
|
||||
${FIELD3D_LIBRARY_PATH}
|
||||
ENV FIELD3D_LIBRARY_PATH
|
||||
DOC "The Field3D libraries")
|
||||
|
||||
find_package_handle_standard_args (Field3D
|
||||
REQUIRED_VARS FIELD3D_INCLUDE_DIR FIELD3D_LIBRARY
|
||||
)
|
||||
|
||||
if (Field3D_FOUND)
|
||||
set (FIELD3D_INCLUDES ${FIELD3D_INCLUDE_DIR})
|
||||
set (FIELD3D_LIBRARIES ${FIELD3D_LIBRARY})
|
||||
|
||||
if (NOT TARGET Field3D::Field3D)
|
||||
add_library(Field3D::Field3D UNKNOWN IMPORTED)
|
||||
set_target_properties(Field3D::Field3D PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FIELD3D_INCLUDES}")
|
||||
set_property(TARGET Field3D::Field3D APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${FIELD3D_LIBRARIES}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (
|
||||
FIELD3D_INCLUDE_DIR
|
||||
FIELD3D_LIBRARY
|
||||
)
|
||||
@@ -1,7 +1,3 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: BSD-3-Clause and Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# - Try to find libjpeg-turbo
|
||||
# Once done, this will define
|
||||
#
|
||||
@@ -33,12 +29,6 @@ endif ()
|
||||
if (JPEG_INCLUDE_DIR AND JPEG_LIBRARY)
|
||||
set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR} CACHE PATH "JPEG include dirs")
|
||||
set (JPEG_LIBRARIES ${JPEG_LIBRARY} CACHE STRING "JPEG libraries")
|
||||
file(STRINGS "${JPEG_INCLUDE_DIR}/jconfig.h"
|
||||
jpeg_lib_version REGEX "^#define[\t ]+JPEG_LIB_VERSION[\t ]+.*")
|
||||
if (jpeg_lib_version)
|
||||
string(REGEX REPLACE "^#define[\t ]+JPEG_LIB_VERSION[\t ]+([0-9]+).*"
|
||||
"\\1" JPEG_VERSION "${jpeg_lib_version}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
|
||||
@@ -47,12 +37,6 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARIES JPEG_INCLUDE_D
|
||||
|
||||
if (JPEG_FOUND)
|
||||
set (JPEGTURBO_FOUND true)
|
||||
|
||||
# Use an intermediary target named "JPEG::JPEG" to match libjpeg's export
|
||||
if(NOT TARGET JPEG::JPEG)
|
||||
add_library(JPEG::JPEG INTERFACE IMPORTED)
|
||||
target_link_libraries(JPEG::JPEG INTERFACE ${JPEG_LIBRARY})
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(JPEG_LIBRARIES JPEG_INCLUDE_DIRS )
|
||||
|
||||
@@ -86,10 +86,6 @@ MARK_AS_ADVANCED(LibRaw_VERSION_STRING
|
||||
|
||||
if (LINKSTATIC)
|
||||
# Necessary?
|
||||
find_package (Jasper)
|
||||
if (JASPER_FOUND)
|
||||
set (LibRaw_r_LIBRARIES ${LibRaw_r_LIBRARIES} ${JASPER_LIBRARIES})
|
||||
endif()
|
||||
find_library (LCMS2_LIBRARIES NAMES lcms2)
|
||||
if (LCMS2_LIBRARIES)
|
||||
set (LibRaw_r_LIBRARIES ${LibRaw_r_LIBRARIES} ${LCMS2_LIBRARIES})
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
# Module to find LIBHEIF
|
||||
#
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - Libheif_ROOT, LIBHEIF_INCLUDE_PATH, LIBHEIF_LIBRARY_PATH
|
||||
#
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
# Module to find Libsquish
|
||||
#
|
||||
# This module will first look into the directories defined by the variables:
|
||||
# - Libsquish_ROOT, LIBSQUISH_INCLUDE_PATH, LIBSQUISH_LIBRARY_PATH
|
||||
#
|
||||
# This module defines the following variables:
|
||||
#
|
||||
# Libsquish_FOUND True if Libsquish was found.
|
||||
# LIBSQUISH_INCLUDES Where to find Libsquish headers
|
||||
# LIBSQUISH_LIBRARIES List of libraries to link against when using Libsquish
|
||||
# LIBSQUISH_VERSION Version of Libsquish (e.g., 3.6.2)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
find_path (LIBSQUISH_INCLUDE_DIR squish.h
|
||||
HINTS
|
||||
${LIBSQUISH_INCLUDE_PATH}
|
||||
ENV LIBSQUISH_INCLUDE_PATH
|
||||
DOC "The directory where Libsquish headers reside")
|
||||
|
||||
find_library (LIBSQUISH_LIBRARY squish
|
||||
HINTS
|
||||
${LIBSQUISH_LIBRARY_PATH}
|
||||
ENV LIBSQUISH_LIBRARY_PATH
|
||||
DOC "The Libsquish libraries")
|
||||
|
||||
find_package_handle_standard_args (Libsquish
|
||||
REQUIRED_VARS
|
||||
LIBSQUISH_INCLUDE_DIR
|
||||
LIBSQUISH_LIBRARY
|
||||
)
|
||||
|
||||
if (Libsquish_FOUND)
|
||||
set (LIBSQUISH_INCLUDES ${LIBSQUISH_INCLUDE_DIR})
|
||||
set (LIBSQUISH_LIBRARIES ${LIBSQUISH_LIBRARY})
|
||||
|
||||
if (NOT TARGET Libsquish::Libsquish)
|
||||
add_library(Libsquish::Libsquish UNKNOWN IMPORTED)
|
||||
set_target_properties(Libsquish::Libsquish PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LIBSQUISH_INCLUDES}")
|
||||
|
||||
set_property(TARGET Libsquish::Libsquish APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${LIBSQUISH_LIBRARIES}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (
|
||||
LIBSQUISH_INCLUDE_DIR
|
||||
LIBSQUISH_LIBRARY
|
||||
)
|
||||
@@ -1,7 +1,3 @@
|
||||
# Copyright Contributors to the OpenImageIO project.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# https://github.com/OpenImageIO/oiio
|
||||
|
||||
# - CMake find module for Nuke
|
||||
#
|
||||
# If requesting a specific release, the Nuke version string must be converted
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user