Browse Source

Add optional opengl support

pull/2/head
Alexander Golubev 9 years ago committed by Slávek Banko
parent
commit
440db91f91
  1. 2
      CMakeLists.txt
  2. 27
      ConfigureChecks.cmake
  3. 17
      kcontrol/info/CMakeLists.txt
  4. 4
      kcontrol/info/opengl.desktop
  5. 2
      kcontrol/screensaver/CMakeLists.txt
  6. 2
      kdesktop/lock/CMakeLists.txt
  7. 2
      tdescreensaver/CMakeLists.txt
  8. 2
      tdescreensaver/random.cpp

2
CMakeLists.txt

@ -28,6 +28,7 @@ include( CheckCXXSourceRuns )
include( CheckCXXSourceCompiles )
include( CheckLibraryExists )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckStructHasMember )
include( CheckTypeSize )
@ -70,6 +71,7 @@ option( WITH_XRENDER "Enable xrender support" ${WITH_ALL_OPTIONS} )
option( WITH_XDAMAGE "Enable xdamage support" ${WITH_ALL_OPTIONS} )
option( WITH_XEXT "Enable xext support" ${WITH_ALL_OPTIONS} )
option( WITH_XTEST "Enable xtest support" ${WITH_ALL_OPTIONS} )
option( WITH_OPENGL "Enable openGL support" ${WITH_ALL_OPTIONS} )
option( WITH_XSCREENSAVER "Enable xscreensaver support" ${WITH_ALL_OPTIONS} )
option( WITH_LIBART "Enable libart support (for SVG icons and wallpapers)" ${WITH_ALL_OPTIONS} )
option( WITH_LIBUSB "Enable control of some mouse models through libusb" ${WITH_ALL_OPTIONS} )

27
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( )

17
kcontrol/info/CMakeLists.txt

@ -9,8 +9,6 @@
#
#################################################
# FIXME no OPENGL support yet
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
@ -22,20 +20,27 @@ link_directories(
${TQT_LIBRARY_DIRS}
)
if( WITH_OPENGL )
add_definitions( -DINFO_OPENGL_AVAILABLE )
set( OPENGL_DESKTOP opengl.desktop )
set( OPENGL_SOURCES opengl.cpp )
endif( WITH_OPENGL )
##### other data ################################
install( FILES
memory.desktop processor.desktop dma.desktop
interrupts.desktop ioports.desktop opengl.desktop
pci.desktop sound.desktop devices.desktop scsi.desktop
interrupts.desktop ioports.desktop pci.desktop
sound.desktop devices.desktop scsi.desktop
partitions.desktop xserver.desktop cdinfo.desktop
${OPENGL_DESKTOP}
DESTINATION ${XDG_APPS_INSTALL_DIR} )
##### kcm_info (module) #########################
tde_add_kpart( kcm_info AUTOMOC
SOURCES main.cpp memory.cpp opengl.cpp
LINK tdeui-shared
SOURCES main.cpp memory.cpp ${OPENGL_SOURCES}
LINK tdeui-shared ${GL_LIBRARIES} ${GLU_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)

4
kcontrol/info/opengl.desktop

@ -1,5 +1,5 @@
[Desktop Entry]
NoDisplay=true
# NoDisplay=true
Exec=tdecmshell opengl
Icon=kcmopengl
Type=Application
@ -8,7 +8,7 @@ DocPath=kinfocenter/opengl/index.html
X-TDE-Library=info
X-TDE-FactoryName=opengl
X-TDE-ParentApp=kcontrol
X-TDE-ParentApp=kinfocenter
Name=OpenGL
Name[bn]=ওপন-জি-এল

2
kcontrol/screensaver/CMakeLists.txt

@ -32,6 +32,6 @@ tde_add_kpart( kcm_screensaver AUTOMOC
advanceddialogimpl.ui scrnsave.cpp testwin.cpp
saverlist.cpp saverconfig.cpp advanceddialog.cpp
kswidget.cpp
LINK tdeio-shared ${GL_LIBRARY}
LINK tdeio-shared ${GL_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)

2
kdesktop/lock/CMakeLists.txt

@ -38,6 +38,6 @@ set( ${target}_SRCS
tde_add_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK kdesktopsettings-static dmctl-static tdeio-shared Xext
${GL_LIBRARY} "${LINKER_IMMEDIATE_BINDING_FLAGS}"
${GL_LIBRARIES} "${LINKER_IMMEDIATE_BINDING_FLAGS}"
DESTINATION ${BIN_INSTALL_DIR}
)

2
tdescreensaver/CMakeLists.txt

@ -30,7 +30,7 @@ install( FILES KRandom.desktop KBlankscreen.desktop DESTINATION ${APPS_INSTALL_D
tde_add_executable( krandom.kss AUTOMOC
SOURCES random.cpp
LINK tdeui-shared ${GL_LIBRARY}
LINK tdeui-shared ${GL_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)

2
tdescreensaver/random.cpp

@ -92,7 +92,7 @@ bool hasDirectRendering () {
return false;
}
#else
#error no GL?
// no GL
return false;
#endif

Loading…
Cancel
Save