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

Adsk Contrib - Improve GLEW detection #1112

Merged
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
5 changes: 0 additions & 5 deletions .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,6 @@ 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
- name: Create build directories
Expand Down
21 changes: 16 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 5 additions & 6 deletions src/apps/ociobakelut/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenColorIO Project.


#include <cmath>
#include <cstdlib>
#include <iostream>
Expand All @@ -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)
{
Expand All @@ -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[])
{
Expand Down Expand Up @@ -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()
Expand Down