Hello everyone,
Currently I'm using cmake for building my c++/Qt project.
The source directory structure looks like this:
Project
|_ src
|_ include
|_ data
Currently I run cmake from the source directory, having an in-source-build.
Now I want to be able to have a complete seperate build folder.
Send some code for us to look at.
If the cwd is where your exe is, and there's a file at ./data/file1
then you should certainly be able to open and read that file with that
file name.
Maybe your cwd is not what you think it is.
Maybe your code changes it somewhere between launching and
ok, sorry, let's make it more real. I cannot disclose much code, but
it's like this:
I have a normal Qt application started out of a main.cpp which is
located in $SOURCE_DIR/src
In another QWidget also located in $SOURCE_DIR/src I call a function
which is also declared in $SOURCE_DIR/src
with
Look at these two documents:
http://doc.trolltech.com/4.1/qt-conf.html
http://doc.trolltech.com/4.1/qlibraryinfo.html#location
By creating a qt.conf in your build directory next to your application
you can make your code completely agnostic to the location of your data
files.
HTH
Michael
On
You can install target and data and then run your program.
2011/1/26, Benjamin Kurz benjamin.k...@bioskill.com:
Hello everyone,
Currently I'm using cmake for building my c++/Qt project.
The source directory structure looks like this:
Project
|_ src
|_ include
|_ data
Currently I run