Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Fix workaround for GLEW

Tact Yoshidacc3dae7279b7
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e53bd0ead..6305384f7 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -51,14 +51,6 @@ jobs:
run: |
brew update
brew install pkg-config ninja glew lz4 libjpeg libpng lzo qt boost libusb libmypaint ccache
- # temp workaround to brew installed glew cmake info overriding glew lib detection
- # which causes compiling issues later
- if [ -L /usr/local/lib/cmake/glew ]
- then
- echo "Symbolic link '/usr/local/lib/cmake/glew' detected. Removing to avoid glew lib detection issue!"
- ls -l /usr/local/lib/cmake/glew
- rm /usr/local/lib/cmake/glew
- fi
- uses: actions/cache@v1
with:
diff --git a/ci-scripts/osx/travis-install.sh b/ci-scripts/osx/travis-install.sh
index 0fe7be5d0..6ae7ca23d 100755
--- a/ci-scripts/osx/travis-install.sh
+++ b/ci-scripts/osx/travis-install.sh
@@ -6,11 +6,3 @@ brew install clang-format
# from Homebrew 1.6.0 the old formula for obtaining Qt5.9.2 becomes invalid.
# so we start to use the latest version of Qt. (#1910)
brew install qt
-# temp workaround to brew installed glew cmake info overriding glew lib detection
-# which causes compiling issues later
-if [ -L /usr/local/lib/cmake/glew ]
-then
- echo "Symbolic link '/usr/local/lib/cmake/glew' detected. Removing to avoid glew lib detection issue!"
- ls -l /usr/local/lib/cmake/glew
- rm /usr/local/lib/cmake/glew
-fi
diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt
index e0ac08b4b..13d0047ea 100644
--- a/toonz/sources/CMakeLists.txt
+++ b/toonz/sources/CMakeLists.txt
@@ -381,7 +381,11 @@ elseif(BUILD_ENV_APPLE)
if(GLEW-NOTFOUND)
pkg_check_modules(GLEW REQUIRED glew)
endif()
- set(GLEW_LIB ${GLEW_LIBRARIES})
+ if (TARGET GLEW::GLEW)
+ set(GLEW_LIB GLEW::GLEW)
+ else()
+ set(GLEW_LIB ${GLEW_LIBRARIES})
+ endif()
pkg_check_modules(LZ4_LIB REQUIRED liblz4)