From 654f583c92f359a5162d316546070ec5d250c070 Mon Sep 17 00:00:00 2001 From: Patrick Hodoul Date: Thu, 20 Aug 2020 11:55:07 -0400 Subject: [PATCH 1/3] Adsk Contrib - Improve GLEW detection Signed-off-by: Patrick Hodoul --- CMakeLists.txt | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a32b52640..4350658d52 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,13 +101,24 @@ if(OCIO_BUILD_GPU_TESTS OR OCIO_BUILD_APPS) endif() if(NOT APPLE) - find_package(GLEW) + # On some Linux platform, the glew-config.cmake is found first so make it explicit + # to fall back on the regular search if not found. + find_package(GLEW CONFIG QUIET) if(NOT GLEW_FOUND) - package_root_message(GLEW) - set(OCIO_GL_ENABLED OFF) + find_package(GLEW) + if(NOT GLEW_FOUND) + package_root_message(GLEW) + set(OCIO_GL_ENABLED OFF) + endif() + else() + # Expected variables GLEW_LIBRARIES and GLEW_INCLUDE_DIRS are missing so create + # the mandatory one. Note that the cmake bug is now fixed (issue 19662). + if(NOT GLEW_LIBRARIES) + set(GLEW_LIBRARIES GLEW::GLEW) + endif() endif() - endif() - + endif() + find_package(GLUT) if(NOT GLUT_FOUND) package_root_message(GLUT) From a5f6a80832ce4bbdb72d26f96e0b3edb343b7e98 Mon Sep 17 00:00:00 2001 From: Patrick Hodoul Date: Thu, 20 Aug 2020 12:38:18 -0400 Subject: [PATCH 2/3] Remove the CI build workaround Signed-off-by: Patrick Hodoul --- .github/workflows/ci_workflow.yml | 3 --- CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index 27c3c7ea4f..227cca223c 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -205,10 +205,7 @@ jobs: CXX: ${{ matrix.cxx-compiler }} CC: ${{ matrix.cc-compiler }} steps: - # TODO: Remove this workaround following resolution of: - # https://github.com/AcademySoftwareFoundation/aswf-docker/issues/43 - name: Setup container - run: sudo rm -rf /usr/local/lib64/cmake/glew if: matrix.vfx-cy == 2020 - name: Checkout uses: actions/checkout@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4350658d52..043bd16acf 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,7 @@ if(OCIO_BUILD_GPU_TESTS OR OCIO_BUILD_APPS) if(NOT APPLE) # On some Linux platform, the glew-config.cmake is found first so make it explicit # to fall back on the regular search if not found. - find_package(GLEW CONFIG QUIET) + find_package(GLEW CONFIG QUIET) if(NOT GLEW_FOUND) find_package(GLEW) if(NOT GLEW_FOUND) From ea5837402a44d4cd54c1b84ae9e110bb43aacf16 Mon Sep 17 00:00:00 2001 From: Patrick Hodoul Date: Thu, 20 Aug 2020 14:06:53 -0400 Subject: [PATCH 3/3] Unlock the CI builds with coding style changes Signed-off-by: Patrick Hodoul --- src/apps/ociobakelut/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/apps/ociobakelut/main.cpp b/src/apps/ociobakelut/main.cpp index c6ba883b0a..1646561c13 100644 --- a/src/apps/ociobakelut/main.cpp +++ b/src/apps/ociobakelut/main.cpp @@ -1,6 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause // Copyright Contributors to the OpenColorIO Project. + #include #include #include @@ -14,10 +15,10 @@ namespace OCIO = OCIO_NAMESPACE; #include "apputils/argparse.h" #include "ocioicc.h" + static std::string outputfile; -static int -parse_end_args(int argc, const char *argv[]) +static int parse_end_args(int argc, const char *argv[]) { if(argc>0) { @@ -27,8 +28,7 @@ parse_end_args(int argc, const char *argv[]) return 0; } -OCIO::GroupTransformRcPtr -parse_luts(int argc, const char *argv[]); +OCIO::GroupTransformRcPtr parse_luts(int argc, const char *argv[]); int main (int argc, const char* argv[]) { @@ -392,8 +392,7 @@ int main (int argc, const char* argv[]) // then atof() will likely try to convert "--invlut" to its double equivalent, // resulting in an invalid (or at least undesired) scale value. -OCIO::GroupTransformRcPtr -parse_luts(int argc, const char *argv[]) +OCIO::GroupTransformRcPtr parse_luts(int argc, const char *argv[]) { OCIO::GroupTransformRcPtr groupTransform = OCIO::GroupTransform::Create(); const char *lastCCCId = NULL; // Ugly to use this but using GroupTransform::getTransform()