diff options
author | Alexander Golubev <[email protected]> | 2013-09-01 09:29:15 +0400 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-09-08 10:50:57 +0200 |
commit | 440db91f914eb9ba19bd208c443638a508be8f46 (patch) | |
tree | 7653d29e97ea4cbd8de38f166fa1a10abdf86e94 /ConfigureChecks.cmake | |
parent | d1a487948aec5f93306f32d07979b2af42e61e33 (diff) | |
download | tdebase-440db91f914eb9ba19bd208c443638a508be8f46.tar.gz tdebase-440db91f914eb9ba19bd208c443638a508be8f46.zip |
Add optional opengl support
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 06087ba76..ce20b392b 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -168,12 +168,29 @@ if( WITH_XSCREENSAVER ) endif( ) -# GL -if( BUILD_KDESKTOP OR BUILD_KCONTROL OR BUILD_TDESCREENSAVER ) -check_library_exists( GL glXChooseVisual "" HAVE_GLXCHOOSEVISUAL ) - if( HAVE_GLXCHOOSEVISUAL ) - set( GL_LIBRARY "GL" ) +# openGL (kdesktop or kcontrol or tdescreensaver ) +if( WITH_OPENGL ) + pkg_search_module( GL gl ) + if( GL_FOUND ) + # some extra check, stricktly speaking they are not necessary + tde_save( CMAKE_REQUIRED_LIBRARIES ) + set( CMAKE_REQUIRED_LIBRARIES ${GL_LIBRARIES} ) + check_symbol_exists( glXChooseVisual "GL/glx.h" HAVE_GLXCHOOSEVISUAL ) + tde_restore( CMAKE_REQUIRED_LIBRARIES ) + if( NOT HAVE_GLXCHOOSEVISUAL ) + 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" ) 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" ) + endif( ) + endif( BUILD_KCONTROL ) + endif( ) |