Commit a3aa0672 authored by Johannes Bergmeier's avatar Johannes Bergmeier

- Made support for 3D-games dependant of the availability of

Qt-OpenGL
(This might break compilation, can't test it)

svn path=/trunk/KDE/kdegames/ksudoku/; revision=808878
parent 0611bfa5
......@@ -23,8 +23,9 @@ kde4_add_executable(ksudoku ${ksudoku_SRCS})
target_link_libraries(ksudoku
ksudoku_gui ksudoku_views ksudoku_logic
kdegames
${QT_QTOPENGL_LIBRARY} ${KDE4_KIO_LIBS} ${OPENGL_LIBRARIES} ${KDE4_KNEWSTUFF2_LIBRARY}
) #ksudoku_export ksudoku_draw
# ${QT_QTOPENGL_LIBRARY}
${KDE4_KIO_LIBS} ${OPENGL_LIBRARIES} ${KDE4_KNEWSTUFF2_LIBRARY}
)
install(TARGETS ksudoku DESTINATION ${BIN_INSTALL_DIR} )
......
......@@ -165,6 +165,7 @@ void KSudoku::updateShapesList()
variant = new SudokuGame(i18n("Sudoku 25x25"), 25, m_gameVariants);
variant->setDescription(i18n("Sudoku with 25 symbols"));
variant->setIcon("ksudoku-ksudoku_25x25");
#ifdef QT_OPENGL_SUPPORT
variant = new RoxdokuGame(i18n("Roxdoku 9 (3x3x3)"), 9, m_gameVariants);
variant->setDescription(i18n("The Rox 3D sudoku"));
variant->setIcon("ksudoku-roxdoku_3x3x3");
......@@ -174,6 +175,7 @@ void KSudoku::updateShapesList()
variant = new RoxdokuGame(i18n("Roxdoku 25 (5x5x5)"), 25, m_gameVariants);
variant->setDescription(i18n("The Rox 3D sudoku with 25 symbols"));
variant->setIcon("ksudoku-roxdoku_5x5x5");
#endif
QStringList filepaths = KGlobal::dirs()->findAllResources("gamevariant", "*.desktop", KStandardDirs::NoDuplicates); // Find files.
......
......@@ -64,10 +64,12 @@ void KsView::createView() {
setWidget(new View2D(0, m_game, m_gameActions));
break;
}
#ifdef QT_OPENGL_SUPPORT
case roxdoku: {
setWidget(new RoxdokuView(m_game, 0, 0));
break;
}
#endif
default:
// TODO this will not work
break;
......
......@@ -19,6 +19,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifdef QT_OPENGL_SUPPORT
#include "roxdokuview.h"
#include "puzzle.h"
......@@ -418,3 +420,5 @@ void RoxdokuView::paintGL()
}
#include "roxdokuview.moc"
#endif
......@@ -22,6 +22,8 @@
#ifndef ROXDOKUVIEW_h
#define ROXDOKUVIEW_h
#ifdef QT_OPENGL_SUPPORT
#include <qgl.h>
#include <qpixmap.h>
#include <qpainter.h>
......@@ -135,3 +137,5 @@ private:
}
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment