SVN commit 861977 by rivol: Use qt resource system here as well. KGLLib can now be compiled with srcdir = builddir (not that it's a good idea) and the demos can be run anywhere. M +2 -1 CMakeLists.txt M +2 -2 logos.cpp A logos.qrc D spinninglogos --- trunk/playground/libs/kgllib/examples/spinninglogos/CMakeLists.txt #861976:861977 @@ -8,6 +8,7 @@ logos.cpp ) qt4_automoc(${spinninglogos_SRCS}) -add_executable(spinninglogos ${spinninglogos_SRCS}) +qt4_add_resources(spinninglogos_RESOURCES logos.qrc) +add_executable(spinninglogos ${spinninglogos_SRCS} ${spinninglogos_RESOURCES}) target_link_libraries(spinninglogos kgllib-extras) --- trunk/playground/libs/kgllib/examples/spinninglogos/logos.cpp #861976:861977 @@ -59,8 +59,8 @@ GLWidget::initializeGL(); // Load logo textures - mKDELogoTex = new Texture("kde.png"); - mQtLogoTex = new Texture("qt.png"); + mKDELogoTex = new Texture(":/kde.png"); + mQtLogoTex = new Texture(":/qt.png"); // If either of the logos couldn't be loaded then show an error if (!mKDELogoTex->isValid() || !mQtLogoTex->isValid()) { return setErrorText("Data couldn't be loaded");