mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 15:11:46 +00:00
- Make OpenGL library link fully dynamic on Unix.
Also, remove all the OpenGL CMake checks, because they're not needed anymore.
This commit is contained in:
parent
7e114c1127
commit
da3da61b67
2 changed files with 7 additions and 15 deletions
|
@ -13,7 +13,6 @@ include( CheckIncludeFile )
|
|||
include( CheckIncludeFiles )
|
||||
include( CheckLibraryExists )
|
||||
include( FindPkgConfig )
|
||||
include( FindOpenGL )
|
||||
|
||||
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||
option( NO_STRIP "Do not strip Release or MinSizeRel builds" )
|
||||
|
@ -255,15 +254,6 @@ else()
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Check if we have OpenGL
|
||||
|
||||
if( NOT OPENGL_FOUND )
|
||||
message( FATAL_ERROR "OpenGL is required for building." )
|
||||
endif( NOT OPENGL_FOUND )
|
||||
|
||||
set( ZDOOM_LIBS ${ZDOOM_LIBS} ${OPENGL_LIBRARIES} )
|
||||
include_directories( ${OPENGL_INCLUDE_DIR} )
|
||||
|
||||
if( NOT NO_OPENAL )
|
||||
find_package( OpenAL )
|
||||
mark_as_advanced(CLEAR OPENAL_INCLUDE_DIR)
|
||||
|
|
|
@ -17,11 +17,12 @@ static void* AppleGLGetProcAddress (const char *name)
|
|||
}
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#if defined(__sgi) || defined (__sun)
|
||||
/* BEGINNING OF MANUAL CHANGES, DO NOT REMOVE! */
|
||||
#if defined(__sgi) || defined (__sun) || defined(__unix__)
|
||||
#include <dlfcn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void* SunGetProcAddress (const GLubyte* name)
|
||||
static void* PosixGetProcAddress (const GLubyte* name)
|
||||
{
|
||||
static void* h = NULL;
|
||||
static void* gpa;
|
||||
|
@ -37,7 +38,7 @@ static void* SunGetProcAddress (const GLubyte* name)
|
|||
else
|
||||
return dlsym(h, (const char*)name);
|
||||
}
|
||||
#endif /* __sgi || __sun */
|
||||
#endif /* __sgi || __sun || __unix__ */
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
|
@ -77,8 +78,9 @@ static PROC WinGetProcAddress(const char *name)
|
|||
#if defined(__APPLE__)
|
||||
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
|
||||
#else
|
||||
#if defined(__sgi) || defined(__sun)
|
||||
#define IntGetProcAddress(name) SunGetProcAddress(name)
|
||||
#if defined(__sgi) || defined(__sun) || defined(__unix__)
|
||||
#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
|
||||
/* END OF MANUAL CHANGES, DO NOT REMOVE! */
|
||||
#else /* GLX */
|
||||
#include <GL/glx.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue