Browse Source

Add optional opengl support

tags/r14.0.0
8 changed files with 41 additions and 17 deletions
  1. +2
    -0
      CMakeLists.txt
  2. +22
    -5
      ConfigureChecks.cmake
  3. +11
    -6
      kcontrol/info/CMakeLists.txt
  4. +2
    -2
      kcontrol/info/opengl.desktop
  5. +1
    -1
      kcontrol/screensaver/CMakeLists.txt
  6. +1
    -1
      kdesktop/lock/CMakeLists.txt
  7. +1
    -1
      tdescreensaver/CMakeLists.txt
  8. +1
    -1
      tdescreensaver/random.cpp

+ 2
- 0
CMakeLists.txt View File

@@ -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} )


+ 22
- 5
ConfigureChecks.cmake View File

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




+ 11
- 6
kcontrol/info/CMakeLists.txt View File

@@ -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}
)

+ 2
- 2
kcontrol/info/opengl.desktop View File

@@ -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]=ওপেন-জি-এল


+ 1
- 1
kcontrol/screensaver/CMakeLists.txt View File

@@ -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}
)

+ 1
- 1
kdesktop/lock/CMakeLists.txt View File

@@ -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}
)

+ 1
- 1
tdescreensaver/CMakeLists.txt View File

@@ -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}
)



+ 1
- 1
tdescreensaver/random.cpp View File

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



Loading…
Cancel
Save