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

CMake and ext package upgrades #1016

Closed
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0a8b86b
Upgrade to CMake 3.12, Add support for ext CMake configs
michdolan Apr 29, 2020
5a99141
Use OpenGL find_package messaging
michdolan May 14, 2020
f52d975
Fix FindHalf.cmake documentation
michdolan May 17, 2020
bda13d9
Fix View serialization in Config: view transform was not saved. (#1015)
BernardLefebvre May 14, 2020
5fb3382
Adsk Contrib - Enhance CLF tests (#1011)
doug-walker May 19, 2020
5966a6a
TSC meeting notes 2020-04-27 (#1012)
hodoulp May 19, 2020
96da578
Adsk Contrib - Optimize the GPU texture size for 1D LUTs (#1013)
hodoulp May 19, 2020
46ac646
2020-05-11 tsc mtg notes (#1014)
doug-walker May 19, 2020
3291419
Adsk Contrib - Fix a CDL file load bug for ColorDecisionList case (#1…
hodoulp May 26, 2020
afad84e
Add TSC notes for 05-18-2020 (#1019)
michdolan Jun 1, 2020
309b246
Adsk Contrib - Various CLF writer improvements (#1020)
hodoulp Jun 1, 2020
e026113
Add Mark Titchener as Foundry TSC member (#1021)
michdolan Jun 2, 2020
7d12e39
Updated various python unit tests. (#1025)
meimchu Jun 4, 2020
b3398c1
Add notes from 06-01-2020 TSC meeting (#1024)
michdolan Jun 8, 2020
3866694
Refactor PyBuiltinTransform (#1026)
michdolan Jun 10, 2020
57f5a96
Add TSC meeting notes from 06-08-2020 (#1033)
michdolan Jun 10, 2020
242a20a
Python unit test module LookTest update (#1027)
meimchu Jun 26, 2020
75c449a
Add TSC meeting notes for 06-22-2020 (#1041)
michdolan Jun 27, 2020
b4f32be
Rename andriod-toolchain.cmake to android-toolchain.cmake (#1043)
Simran-B Jun 27, 2020
a718428
Update links to EasyCLA docs (#1044)
Simran-B Jun 27, 2020
802a8af
Add <package>_ROOT messaging
michdolan Jun 28, 2020
2c6053c
Replace tabs with spaces
michdolan Jun 28, 2020
cc66fe4
Replace tabs with spaces
michdolan Jun 28, 2020
00e430c
Remove unnecessary oiiohelpers dependencies
michdolan Jun 30, 2020
f8504e8
Adsk Contrib - Add ViewingRules, DisplayViewTransform, and ViewingPip…
BernardLefebvre Jun 29, 2020
d06821b
Adsk Contrib - Various fixes and improvements (#1048)
hodoulp Jun 29, 2020
85be19f
PyOCIO: Fix AllocationTransform __str__, cleanup params (#1042)
michdolan Jul 1, 2020
edbce35
Add documentation working group notes from 06-12-2020, 06-19-2020 (#1…
michdolan Jul 2, 2020
a92006c
Add Config working group notes 06-16-2020 (#1040)
michdolan Jul 2, 2020
16fcc94
Add TSC meeting notes for 06-29-2020 (#1049)
michdolan Jul 7, 2020
03a1650
Headless rendering (#1047)
ChinYing-Li Jul 9, 2020
54ed8bb
Removes commented out OCIO_BUILD_PYTHON (#1055)
sobotka Jul 9, 2020
acf1d15
Clean up GPU/headless messaging
michdolan Jul 13, 2020
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
4 changes: 4 additions & 0 deletions .github/workflows/analysis_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
<${{ matrix.compiler-desc }}
cxx=${{ matrix.cxx-standard }},
docs=${{ matrix.build-docs }}>'
# Don't run on OCIO forks
if: github.repository == 'AcademySoftwareFoundation/OpenColorIO'
# GH-hosted VM. The build runs in CentOS 7 'container' defined below.
runs-on: ubuntu-latest
container:
Expand Down Expand Up @@ -145,6 +147,8 @@ jobs:

linux_sonarcloud:
name: 'Linux CentOS 7 VFX CY2020 SonarCloud <GCC 6.3.1>'
# Don't run on OCIO forks
if: github.repository == 'AcademySoftwareFoundation/OpenColorIO'
# GH-hosted VM. The build runs in CentOS 7 'container' defined below.
runs-on: ubuntu-latest
container:
Expand Down
21 changes: 13 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.

cmake_minimum_required(VERSION 3.11)
cmake_minimum_required(VERSION 3.12)
hodoulp marked this conversation as resolved.
Show resolved Hide resolved

project(OpenColorIO
VERSION 2.0.0
Expand Down Expand Up @@ -86,21 +86,18 @@ option(OCIO_WARNING_AS_ERROR "Set build error level for CI testing" OFF)

if(OCIO_BUILD_GPU_TESTS OR OCIO_BUILD_APPS)
set(OCIO_GL_ENABLED ON)
find_package(OpenGL QUIET)
find_package(OpenGL)
if(NOT OpenGL_FOUND)
message(WARNING "OpenGL not found.")
set(OCIO_GL_ENABLED OFF)
endif()
if(NOT APPLE)
find_package(GLEW QUIET)
find_package(GLEW)
if(NOT GLEW_FOUND)
message(WARNING "GLEW not found.")
set(OCIO_GL_ENABLED OFF)
endif()
endif()
find_package(GLUT QUIET)
find_package(GLUT)
if(NOT GLUT_FOUND)
message(WARNING "GLUT not found.")
set(OCIO_GL_ENABLED OFF)
endif()
endif()
Expand Down Expand Up @@ -210,12 +207,20 @@ if(OCIO_BUILD_STATIC)
endif()
endif()

###############################################################################
# Find or install external dependencies
# Some required targets may be created by third-party CMake configs, which
# don't generally produce global targets. To guarantee all imported targets are
# global, this module is included at the project root level.

include(share/cmake/modules/FindExtPackages.cmake)

###############################################################################
# Progress to other sources

add_subdirectory(ext)
add_subdirectory(tests)
add_subdirectory(include)
add_subdirectory(ext)
add_subdirectory(src)
if(OCIO_BUILD_DOCS)
add_subdirectory(docs)
Expand Down
17 changes: 2 additions & 15 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,6 @@ if(NOT OCIO_BUILD_PYTHON)
message(FATAL_ERROR "Doc generation requires that the python bindings be built")
endif()

###############################################################################
### External Python dependencies ###

include(FindPythonPackage)

# Sphinx
# https://pypi.python.org/pypi/Sphinx
set(SPHINX_MIN_VERSION 1.8.5)
find_package(Sphinx ${SPHINX_MIN_VERSION} REQUIRED)
if(NOT SPHINX_FOUND)
message(FATAL_ERROR "Doc generation requires Sphinx")
endif()

###############################################################################
### Setup PYTHONPATH ###

Expand Down Expand Up @@ -135,7 +122,7 @@ add_custom_target(rst_extraction

add_custom_target(docs ALL
COMMAND
${PYT_PRE_CMD} "${SPHINX_EXECUTABLE}" -b html . "${CMAKE_CURRENT_BINARY_DIR}/build-html"
${PYT_PRE_CMD} "${Sphinx_EXECUTABLE}" -b html . "${CMAKE_CURRENT_BINARY_DIR}/build-html"
DEPENDS
OpenColorIO
PyOpenColorIO
Expand All @@ -162,7 +149,7 @@ if(PDFLATEX_COMPILER)

add_custom_target(latex
COMMAND
${PYT_PRE_CMD} "${SPHINX_EXECUTABLE}" -b latex . "${CMAKE_CURRENT_BINARY_DIR}/build-latex"
${PYT_PRE_CMD} "${Sphinx_EXECUTABLE}" -b latex . "${CMAKE_CURRENT_BINARY_DIR}/build-latex"
DEPENDS
OpenColorIO
PyOpenColorIO
Expand Down
29 changes: 16 additions & 13 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Dependencies

The basic requirements for building OCIO are:

- cmake >= 3.10
- cmake >= 3.12
- \*Expat >= 2.2.5 (XML parser for CDL/CLF/CTF)
- \*yaml-cpp >= 0.6.3 (YAML parser for Configs)
- \*IlmBase (Half only) >= 2.3.0 (for half domain LUTs)
Expand All @@ -64,10 +64,11 @@ The basic requirements for building OCIO are:
Some optional components also depend on:

- \*Little CMS >= 2.2 (for ociobakelut ICC profile baking)
- Python 2.x (for the Python bindings and docs)
- \*pybind11 >= 2.4.3 (for the Python bindings)
- Python >= 2.7 (for the Python bindings and docs)
- \*Sphinx >= 1.8.5
- OpenImageIO >= 2.1.9 (for apps including ocioconvert)
- Nuke 6.x or newer (for the Nuke nodes)
- OpenImageIO (for apps including ocioconvert)

Automated Installation
^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -97,16 +98,18 @@ When using existing system libraries, the following CMake variables can be
defined to hint at non-standard install locations and preference of shared
or static linking:

- ``-DEXPAT_DIRS=<path>`` (include and/or library root dir)
- ``-DEXPAT_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-DYAMLCPP_DIRS=<path>`` (include and/or library root dir)
- ``-DYAMLCPP_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-DILMBASE_DIRS=<path>`` (include and/or library root dir)
- ``-DILMBASE_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-DPYSTRING_DIRS=<path>`` (include and/or library root dir)
- ``-DPYSTRING_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-DLCMS2_DIRS=<path>`` (include and/or library root dir)
- ``-DLCMS2_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-DExpat_ROOT=<path>`` (include and/or library root dir)
- ``-DExpat_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-Dyaml-cpp_ROOT=<path>`` (include and/or library root dir)
- ``-Dyaml-cpp_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-DHalf_ROOT=<path>`` (include and/or library root dir)
- ``-DHalf_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-Dpystring_ROOT=<path>`` (include and/or library root dir)
- ``-Dpystring_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-Dlcms2_ROOT=<path>`` (include and/or library root dir)
- ``-Dlcms2_STATIC_LIBRARY=ON`` (prefer static lib)
- ``-pybind11_ROOT=<path>`` (include and/or library root dir)
- ``-DPYTHON_EXECUTABLE=<path>`` (Python executable)
- ``-DNUKE_INSTALL_PATH=<path>`` (or use ``NDK_PATH`` environment variable)

To hint at Python package locations, add paths to the ``PYTHONPATH``
Expand Down
33 changes: 1 addition & 32 deletions ext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.


###############################################################################
### External third-party C/C++ dependencies. ###

# Expat
# https://github.com/libexpat/libexpat
set(EXPAT_MIN_VERSION 2.2.5)
find_package(Expat ${EXPAT_MIN_VERSION} REQUIRED)

# yaml-cpp
# https://github.com/jbeder/yaml-cpp
set(YAMLCPP_MIN_VERSION 0.6.3)
find_package(YamlCpp ${YAMLCPP_MIN_VERSION} REQUIRED)

# IlmBase (Half part only)
# https://github.com/openexr/openexr
set(ILMBASE_MIN_VERSION 2.3.0)
find_package(IlmBase ${ILMBASE_MIN_VERSION} REQUIRED)

# Pystring
# https://github.com/imageworks/pystring
set(PYSTRING_MIN_VERSION 1.1.3)
find_package(Pystring ${PYSTRING_MIN_VERSION} REQUIRED)

if(OCIO_BUILD_APPS)
# LCMS2
# https://github.com/mm2/Little-CMS
set(LCMS2_MIN_VERSION 2.2)
find_package(LCMS2 ${LCMS2_MIN_VERSION} REQUIRED)
endif()

###############################################################################
### External (modified) third-party C/C++ dependencies. ###
### External (modified) third-party C/C++ dependencies ###

# Sample ICC (modified)
add_subdirectory(sampleicc)
4 changes: 2 additions & 2 deletions share/ci/scripts/linux/install_expat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ fi
mkdir build
cd build

cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_BUILD_TYPE=Release \
cmake -DCMAKE_BUILD_TYPE=Release \
-DEXPAT_BUILD_TOOLS=OFF \
-DEXPAT_BUILD_EXAMPLES=OFF \
-DEXPAT_BUILD_TESTS=OFF \
-DEXPAT_SHARED_LIBS=ON \
-DEXPAT_BUILD_DOCS=OFF \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_CXX_FLAGS="-fPIC" \
../expat/.
Expand Down
5 changes: 2 additions & 3 deletions share/ci/scripts/linux/install_lcms2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ else
git checkout tags/lcms${LCMS2_VERSION} -b lcms${LCMS2_VERSION}
fi

cp ../share/cmake/projects/BuildLCMS2.cmake CMakeLists.txt
cp ../share/cmake/projects/Buildlcms2.cmake CMakeLists.txt

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS:BOOL=ON \
cmake -DBUILD_SHARED_LIBS=ON \
-DCMAKE_C_FLAGS="-fPIC" \
../.
make -j4
Expand Down
7 changes: 1 addition & 6 deletions share/ci/scripts/linux/install_oiio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ set -ex

OIIO_VERSION="$1"

# TODO: Remove this when the aswf-docker containers are upgraded to the newer
# version of OpenJpeg. OIIO has deprecated v1 support.
sudo yum -y install openjpeg2-devel

git clone https://github.com/OpenImageIO/oiio.git
cd oiio

Expand All @@ -22,8 +18,7 @@ fi

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DOIIO_BUILD_TOOLS=OFF \
cmake -DOIIO_BUILD_TOOLS=OFF \
-DOIIO_BUILD_TESTS=OFF \
-DVERBOSE=ON \
-DSTOP_ON_WARNING=OFF \
Expand Down
4 changes: 2 additions & 2 deletions share/ci/scripts/linux/install_openexr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ fi

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_TESTING=OFF \
cmake -DBUILD_TESTING=OFF \
-DOPENEXR_BUILD_UTILS=OFF \
-DOPENEXR_VIEWERS_ENABLE=OFF \
-DINSTALL_OPENEXR_EXAMPLES=OFF \
-DPYILMBASE_ENABLE=OFF \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_CXX_FLAGS="-fPIC" \
Expand Down
5 changes: 2 additions & 3 deletions share/ci/scripts/linux/install_pybind11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ fi

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DPYBIND11_INSTALL:BOOL=ON \
-DPYBIND11_TEST:BOOL=OFF \
cmake -DPYBIND11_INSTALL=ON \
-DPYBIND11_TEST=OFF \
../.
make -j4
sudo make install
Expand Down
5 changes: 2 additions & 3 deletions share/ci/scripts/linux/install_pystring.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ else
git checkout tags/v${PYSTRING_VERSION} -b v${PYSTRING_VERSION}
fi

cp ../share/cmake/projects/BuildPystring.cmake CMakeLists.txt
cp ../share/cmake/projects/Buildpystring.cmake CMakeLists.txt

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS:BOOL=ON \
cmake -DBUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_FLAGS="-fPIC" \
../.
make -j4
Expand Down
3 changes: 1 addition & 2 deletions share/ci/scripts/linux/install_yaml-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ fi

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS=ON \
cmake -DBUILD_SHARED_LIBS=ON \
-DYAML_CPP_BUILD_TESTS=OFF \
-DYAML_CPP_BUILD_TOOLS=OFF \
-DYAML_CPP_BUILD_CONTRIB=OFF \
Expand Down
Loading