diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d9ad7861c..3cda64ffd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -509,6 +509,8 @@ find_package(PNG REQUIRED) set(OpenGL_GL_PREFERENCE "LEGACY") find_package(OpenGL REQUIRED) +set(GLEW_ROOT "${CMAKE_PREFIX_PATH}") +message("GLEW_ROOT: ${GLEW_ROOT}") # Find glew or use bundled version if (SLIC3R_STATIC AND NOT SLIC3R_STATIC_EXCLUDE_GLEW) set(GLEW_USE_STATIC_LIBS ON) diff --git a/cmake/modules/FindGLEW.cmake b/cmake/modules/FindGLEW.cmake index dc1faeca14..432d731d28 100644 --- a/cmake/modules/FindGLEW.cmake +++ b/cmake/modules/FindGLEW.cmake @@ -64,16 +64,6 @@ This module defines the following variables: include(FindPackageHandleStandardArgs) -find_package(GLEW CONFIG QUIET) - -if(GLEW_FOUND) - find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_CONFIG) - return() -endif() - -if(GLEW_VERBOSE) - message(STATUS "FindGLEW: did not find GLEW CMake config file. Searching for libraries.") -endif() if(APPLE) find_package(OpenGL QUIET)