Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration - Fixes from main into RB-2.2 - Adsk Contrib #1750

Merged
merged 13 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/analysis_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ jobs:
run: |
share/ci/scripts/multi/install_pugixml.sh latest
- name: Install fixed ext package versions
# Minizip-ng depends on ZLIB. ZLIB must be installed first.
run: |
share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH
share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH
share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH
share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH
share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH
share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH
- name: Install latest ext package versions
run: |
share/ci/scripts/multi/install_imath.sh latest $EXT_PATH
Expand Down Expand Up @@ -206,12 +209,15 @@ jobs:
share/ci/scripts/macos/install_boost.sh latest
share/ci/scripts/multi/install_pugixml.sh latest $EXT_PATH
- name: Install fixed ext package versions
# Minizip-ng depends on ZLIB. ZLIB must be installed first.
run: |
share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH
share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH
share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH
share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH
share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH
share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH
- name: Install latest ext package versions
run: |
share/ci/scripts/multi/install_imath.sh latest $EXT_PATH
Expand Down Expand Up @@ -325,12 +331,15 @@ jobs:
share/ci/scripts/multi/install_pugixml.sh latest $EXT_PATH
shell: bash
- name: Install fixed ext package versions
# Minizip-ng depends on ZLIB. ZLIB must be installed first.
run: |
share/ci/scripts/multi/install_lcms2.sh 2.2 $EXT_PATH
share/ci/scripts/multi/install_yaml-cpp.sh 0.7.0 $EXT_PATH
share/ci/scripts/multi/install_pystring.sh 1.1.3 $EXT_PATH
share/ci/scripts/multi/install_pybind11.sh 2.9.2 $EXT_PATH
share/ci/scripts/multi/install_expat.sh 2.4.1 $EXT_PATH
share/ci/scripts/multi/install_zlib.sh 1.2.12 $EXT_PATH
share/ci/scripts/multi/install_minizip-ng.sh 3.0.6 $EXT_PATH
shell: bash
# OSL not installed due to LLVM compilation time.
- name: Install latest ext package versions
Expand Down
95 changes: 92 additions & 3 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,12 @@ jobs:
--target install \
--config ${{ matrix.build-type }} \
-- -j$(nproc)
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV
working-directory: _build
- name: Test
run: ctest -V -C ${{ matrix.build-type }}
working-directory: _build
- name: Test CMake Consumer
- name: Test CMake Consumer with shared OCIO
if: matrix.build-shared == 'ON'
run: |
cmake . \
Expand All @@ -301,6 +302,34 @@ jobs:
--config ${{ matrix.build-type }}
./consumer
working-directory: _build/tests/cmake-consumer-dist
- name: Test CMake Consumer with static OCIO
if: matrix.build-shared == 'OFF'
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to
# extract it from the headers, like the other modules.
#
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY.
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to
# the static version of the package.
run: |
cmake . \
-DCMAKE_PREFIX_PATH=../../../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dexpat_STATIC_LIBRARY=ON \
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DImath_STATIC_LIBRARY=ON \
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_STATIC_LIBRARY=ON \
-Dyaml-cpp_VERSION=0.7.0 \
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DZLIB_STATIC_LIBRARY=ON \
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dminizip-ng_STATIC_LIBRARY=ON
cmake --build . \
--config ${{ matrix.build-type }}
./consumer
working-directory: _build/tests/cmake-consumer-dist

# ---------------------------------------------------------------------------
# macOS
Expand Down Expand Up @@ -424,11 +453,12 @@ jobs:
--target install \
--config ${{ matrix.build-type }} \
-- -j$(sysctl -n hw.ncpu)
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV
working-directory: _build
- name: Test
run: ctest -V -C ${{ matrix.build-type }}
working-directory: _build
- name: Test CMake Consumer
- name: Test CMake Consumer with shared OCIO
if: matrix.build-shared == 'ON'
run: |
cmake . \
Expand All @@ -438,6 +468,34 @@ jobs:
--config ${{ matrix.build-type }}
./consumer
working-directory: _build/tests/cmake-consumer-dist
- name: Test CMake Consumer with static OCIO
if: matrix.build-shared == 'OFF'
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to
# extract it from the headers, like the other modules.
#
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY.
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to
# the static version of the package.
run: |
cmake . \
-DCMAKE_PREFIX_PATH=../../../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dexpat_STATIC_LIBRARY=ON \
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DImath_STATIC_LIBRARY=ON \
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_STATIC_LIBRARY=ON \
-Dyaml-cpp_VERSION=0.7.0 \
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DZLIB_STATIC_LIBRARY=ON \
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dminizip-ng_STATIC_LIBRARY=ON
cmake --build . \
--config ${{ matrix.build-type }}
./consumer
working-directory: _build/tests/cmake-consumer-dist

# ---------------------------------------------------------------------------
# Windows
Expand Down Expand Up @@ -567,13 +625,14 @@ jobs:
cmake --build . \
--target install \
--config ${{ matrix.build-type }}
echo "ocio_build_path=$(pwd)" >> $GITHUB_ENV
shell: bash
working-directory: _build
- name: Test
run: ctest -V -C ${{ matrix.build-type }}
shell: bash
working-directory: _build
- name: Test CMake Consumer
- name: Test CMake Consumer with shared OCIO
if: matrix.build-shared == 'ON'
run: |
cmake . \
Expand All @@ -585,3 +644,33 @@ jobs:
./${{ matrix.build-type }}/consumer
shell: bash
working-directory: _build/tests/cmake-consumer-dist
- name: Test CMake Consumer with static OCIO
if: matrix.build-shared == 'OFF'
# The yaml-cpp_VERSION is set below because Findyaml-cpp.cmake needs it but is unable to
# extract it from the headers, like the other modules.
#
# Prefer the static version of each dependencies by using <pkg>_STATIC_LIBRARY.
# Alternatively, this can be done by setting <pkg>_LIBRARY and <pkg>_INCLUDE_DIR to
# the static version of the package.
run: |
cmake . \
-DCMAKE_PREFIX_PATH=../../../_install \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-Dexpat_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dexpat_STATIC_LIBRARY=ON \
-DImath_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DImath_STATIC_LIBRARY=ON \
-Dpystring_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dyaml-cpp_STATIC_LIBRARY=ON \
-Dyaml-cpp_VERSION=0.7.0 \
-DZLIB_ROOT=${{ env.ocio_build_path }}/ext/dist \
-DZLIB_STATIC_LIBRARY=ON \
-Dminizip-ng_ROOT=${{ env.ocio_build_path }}/ext/dist \
-Dminizip-ng_STATIC_LIBRARY=ON
cmake --build . \
--config ${{ matrix.build-type }}
export PATH=../../../_install/bin:$PATH
./${{ matrix.build-type }}/consumer
shell: bash
working-directory: _build/tests/cmake-consumer-dist
31 changes: 30 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ project(OpenColorIO
LANGUAGES CXX C)

# "dev", "beta1", rc1", etc or "" for an official release.
set(OpenColorIO_VERSION_RELEASE_TYPE "dev")
set(OpenColorIO_VERSION_RELEASE_TYPE "")


###############################################################################
Expand Down Expand Up @@ -251,6 +251,15 @@ if(OCIO_BUILD_STATIC)
endif()
endif()

if (NOT BUILD_SHARED_LIBS AND NOT OCIO_INSTALL_EXT_PACKAGES STREQUAL NONE)
message(STATUS "Note that building the static version of OpenColorIO does not embed the dependencies\
into the library file. The needed dependencies must be linked to the consumer
application or shared library that uses static OpenColorIO.

The following mandatory dependencies MUST be linked to the consumer application or shared library:
expat, yaml-cpp, Imath, pystring, minizip-ng and ZLIB")
endif()


###############################################################################
# Find or install external dependencies
Expand Down Expand Up @@ -299,6 +308,8 @@ set(OCIO_TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets.cmake")
set(OCIO_VERSION_CONFIG "${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake")
set(OCIO_PROJECT_CONFIG "${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake")
set(OCIO_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
set(OCIO_CUSTOM_FIND_MODULE_DIR "${CMAKE_INSTALL_PREFIX}/share/OpenColorIO/cmake/modules")
set(OCIO_CUSTOM_MACROS_MODULE_DIR "${CMAKE_INSTALL_PREFIX}/share/OpenColorIO/cmake/macros")

# Version fetched from the top level project()
write_basic_package_version_file(
Expand All @@ -321,6 +332,24 @@ install(
FILE ${OCIO_TARGETS_EXPORT_NAME}
)

if (NOT BUILD_SHARED_LIBS)
# Install custom macros used in the find modules.
install(FILES
${CMAKE_CURRENT_LIST_DIR}/share/cmake/macros/VersionUtils.cmake
DESTINATION ${OCIO_CUSTOM_MACROS_MODULE_DIR}
)

# Install custom Find modules.
install(FILES
${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findexpat.cmake
${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/FindImath.cmake
${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findpystring.cmake
${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findminizip-ng.cmake
${CMAKE_CURRENT_LIST_DIR}/share/cmake/modules/Findyaml-cpp.cmake
DESTINATION ${OCIO_CUSTOM_FIND_MODULE_DIR}
)
endif()

install(
FILES "${OCIO_PROJECT_CONFIG}" "${OCIO_VERSION_CONFIG}"
DESTINATION "${OCIO_CONFIG_INSTALL_DIR}"
Expand Down
1 change: 1 addition & 0 deletions COMMITTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ The current OpenColorIO Committers are:
| Doug Walker | @doug-walker |
| Kevin Wheatley | @KevinJW |
| Rémi Achard | @remia |
| Cédrik Fuoco | @cedrik-fuoco-adsk |
41 changes: 12 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ explains our contribution process and procedures, so please review it first:
For a description of the roles and responsibilities of the various
members of the OpenColorIO community, see [GOVERNANCE](GOVERNANCE.md), and
for further details, see the project's
[Technical Charter](docs/aswf/Charter.md). Briefly, Contributors are anyone
[Technical Charter](ASWF/Charter.md). Briefly, Contributors are anyone
who submits content to the project, Committers review and approve such
submissions, and the Technical Steering Committee provides general project
oversight.
Expand Down Expand Up @@ -214,18 +214,20 @@ the work.
a Committer other than the PR contributor may squash and merge changes into the
main branch.

See also (from the OCIO Developer Guide):
* [Getting started](http://opencolorio.org/developers/getting_started.html)
* [Submitting Changes](http://opencolorio.org/developers/submitting_changes.html)
For a more detailed description of the contribution process, please see the
Contributing Guide in the main OCIO documentation:

* [Getting Started](https://opencolorio.readthedocs.io/en/latest/guides/contributing/contributing.html#getting-started)
* [Submitting Changes](https://opencolorio.readthedocs.io/en/latest/guides/contributing/contributing.html#submitting-changes)

## Coding Standards

Please see the OpenColorIO
[Coding guidelines](http://opencolorio.org/developers/coding_guidelines.html)
[Coding guidelines](https://opencolorio.readthedocs.io/en/latest/guides/contributing/contributing.html#coding-style-guide)
for a reference on project code style and best practices.

For standards on contributing to documentation, see the
[Documentation guidelines](http://opencolorio.org/developers/documentation_guidelines.html).
[Documentation guidelines](https://opencolorio.readthedocs.io/en/latest/guides/contributing/contributing.html#documentation-guidelines).

## Test Policy

Expand All @@ -245,27 +247,8 @@ The test should should be run, via ``ctest``, before submitting a pull request.

## Versioning Policy

OpenColorIO uses [semantic versioning](https://semver.org), which labels each
version with three numbers: Major.Minor.Patch, where:

* **MAJOR** indicates incompatible API changes
* **MINOR** indicates functionality added in a backwards-compatible manner
* **PATCH** indicates backwards-compatible bug fixes

## Creating a Release

To create a new release from the main branch:

1. Update the release notes in ``CHANGELOG.md`` with a high-level summary of
the features and improvements. Also include the summary in the Release
comments.

2. Create a new release on the GitHub Releases page.

3. Tag the release with name beginning with '``v``', e.g. '``v2.1.0``'.

4. Download and sign the release tarball, as described
[here](https://wiki.debian.org/Creating%20signed%20GitHub%20releases),
OpenColorIO labels each version with three numbers: Major.Minor.Patch, where:

5. Attach the detached ``.asc`` signature file to the GitHub release as a
binary file.
* **MAJOR** indicates major architectural changes
* **MINOR** indicates an introduction of significant new features
* **PATCH** indicates ABI-compatible bug fixes and minor enhancements
Loading