Define the installation prefix using qmake?
-
wrote on 19 Aug 2011, 22:22 last edited by
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?
-
wrote on 20 Aug 2011, 23:40 last edited by
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?
-
wrote on 21 Aug 2011, 00:14 last edited by
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
-
wrote on 19 Dec 2011, 18:22 last edited by
qmake PREFIX=/usr/local
-
wrote on 2 Jan 2014, 05:03 last edited by
[quote author="luispereira" date="1324318967"]qmake PREFIX=/usr/local[/quote]
This worked for me