Define the installation prefix using qmake?
-
Hello, I need to make my project file to have a PREFIX variable, I assume as the guy here: http://lists.trolltech.com/qt-interest/2002-01/thread00062-0.html
although he is not showing how he declares PREFIX, but I assume that's the correct way to do it. (and no, it's not PREFIX = /usr/local simply)
The same thing using cmake is:
cmake "-DCMAKE_INSTALL_PREFIX:PATH=/usr/local"So it actually passes to command line the prefix path whilst it can be used from inside the program (so as to know where it is installed and communicate with the necessary files)
Any ideas?
-
I'm not sure what you mean. How do you intend to pass the PREFIX to qmake? For instance, by using environment variables, you could set up something like
@
target.path = $$(PREFIX)
INSTALLS += target
DEFINES += INSTALL_PREFIX=$$(PREFIX)
@and then use INSTALL_PREFIX inside your code?
-
Hello peppe (the one from IRC(?))
I finally got a solution: http://stackoverflow.com/questions/7106442/qt-project-files-and-prefix-variablethanks anyway for the try
-
qmake PREFIX=/usr/local