[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/libs/kgllib/examples/earth
From: Rivo Laks <rivolaks () hot ! ee>
Date: 2008-09-17 17:37:25
Message-ID: 1221673045.361865.26887.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 861966 by rivol:
Put data to qt resource file so the executable can be run outside of the source dir
M +2 -1 CMakeLists.txt
M +1 -1 earth.cpp
--- trunk/playground/libs/kgllib/examples/earth/CMakeLists.txt #861965:861966
@@ -8,6 +8,7 @@
earth.cpp
)
qt4_automoc(${earth_SRCS})
-add_executable(earth ${earth_SRCS})
+qt4_add_resources(earth_RESOURCES earth.qrc)
+add_executable(earth ${earth_SRCS} ${earth_RESOURCES})
target_link_libraries(earth kgllib-extras)
--- trunk/playground/libs/kgllib/examples/earth/earth.cpp #861965:861966
@@ -68,7 +68,7 @@
{
GLWidget::initializeGL();
- mDiffuseTex = new Texture("data/earth.png");
+ mDiffuseTex = new Texture(":/data/earth.png");
if (!mDiffuseTex->isValid()) {
return setErrorText("Error: data files weren't found");
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic