diff options
author | François Andriot <francois.andriot@free.fr> | 2015-05-31 18:46:08 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-05-31 18:48:46 +0200 |
commit | 8fde833b98c2872f3ee6be7a4aabeb0b622df3d6 (patch) | |
tree | ddf392505b8224b6718a4724803b6cbed9439caa | |
parent | df7946d7cdbc0f7968bb8c5666f87cdd16b7a55a (diff) | |
download | tdebase-8fde833b98c2872f3ee6be7a4aabeb0b622df3d6.tar.gz tdebase-8fde833b98c2872f3ee6be7a4aabeb0b622df3d6.zip |
Fix GL/GLU detection on older distributions
This resolves Bug 2155
Signed-off-by: François Andriot <francois.andriot@free.fr>
(cherry picked from commit d275f0984521e28e9bc8fc98446d16ac79d29dc6)
-rw-r--r-- | ConfigureChecks.cmake | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 18e2b5014..5860b88d6 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -297,13 +297,23 @@ if( WITH_OPENGL ) tde_message_fatal( "opengl is requested and found, but it doesn't provides glXChooseVisual() or GL/glx.h" ) endif( ) else( ) - tde_message_fatal( "opengl is requested, but not found on your system" ) + check_library_exists( GL glXChooseVisual "" HAVE_GLXCHOOSEVISUAL ) + if( HAVE_GLXCHOOSEVISUAL ) + set( GL_LIBRARIES "GL" ) + else( HAVE_GLXCHOOSEVISUAL ) + tde_message_fatal( "opengl is requested, but not found on your system" ) + endif( HAVE_GLXCHOOSEVISUAL ) endif( ) if( BUILD_KCONTROL ) pkg_search_module( GLU glu ) if( NOT GLU_FOUND ) - tde_message_fatal( "glu is required, but not found on your system" ) + check_library_exists( GLU gluGetString "" HAVE_GLUGETSTRING ) + if( HAVE_GLUGETSTRING ) + set( GLU_LIBRARIES "GLU" ) + else( HAVE_GLUGETSTRING ) + tde_message_fatal( "glu is required, but not found on your system" ) + endif( HAVE_GLUGETSTRING ) endif( ) endif( BUILD_KCONTROL ) |