mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Linux: update GLEW to 2.2.0, and enable EGL support in GLEW to match wxWidgets
On Linux, wxGTK by default attempts to use EGL if it is available on the
system, rather than GLX.  Unfortunately, the ancient version of GLEW that we
packaged in did not support EGL, and even if it did, the configuration was
not set up to enable EGL.  To solve this, we:
  * upgrade GLEW to version 2.2.0, from upstream GitHub
  * modify the Bambu build process to enforce that we use GLEW from the
    built dependency
  * remove the "extra" even older GLEW that was packaged
  * modify GLEW's CMake configuration to enable EGL support when it is
    available on the system (using the same test as wxWidgets uses to decide
    whether to enable EGL support); if EGL isn't available at compile time,
    both GLEW and wxWidgets will fall back on GLX
Note that you probably will have to blow away your CMakeCache for this to
work correctly -- otherwise, you may end up with the system GLEW, if you
have one installed (which is probably not what you want -- on Ubuntu, the
system GLEW is GLX, not EGL).
			
			
This commit is contained in:
		
							parent
							
								
									fdba5967fa
								
							
						
					
					
						commit
						fe13ca0b52
					
				
					 16 changed files with 25502 additions and 64322 deletions
				
			
		|  | @ -94,19 +94,20 @@ endif() | |||
| 
 | ||||
| function(__glew_set_find_library_suffix shared_or_static) | ||||
|   if((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "SHARED") | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" PARENT_SCOPE) | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".so") | ||||
|   elseif((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "STATIC") | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE) | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") | ||||
|   elseif(APPLE AND "${shared_or_static}" MATCHES "SHARED") | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so" PARENT_SCOPE) | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so") | ||||
|   elseif(APPLE AND "${shared_or_static}" MATCHES "STATIC") | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE) | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") | ||||
|   elseif(WIN32 AND "${shared_or_static}" MATCHES "SHARED") | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" PARENT_SCOPE) | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") | ||||
|   elseif(WIN32 AND "${shared_or_static}" MATCHES "STATIC") | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.a;.dll.a" PARENT_SCOPE) | ||||
|     set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.a;.dll.a") | ||||
|   endif() | ||||
| 
 | ||||
|   set(CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}" PARENT_SCOPE) | ||||
|   if(GLEW_VERBOSE) | ||||
|     message(STATUS "FindGLEW: CMAKE_FIND_LIBRARY_SUFFIXES for ${shared_or_static}: ${CMAKE_FIND_LIBRARY_SUFFIXES}") | ||||
|   endif() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Joshua Wise
						Joshua Wise