Hi Bernard,

there are /three/ types of variable readouts in qmake:

a)  local in qmake: $$VAR or $${VAR}
b)  environment (requires export VAR=value):  $$(VAR) or $(VAR) depending on insertion time
c)  system level:  $$[VAR]

If you set a variable using qmake -set VAR=value
it appears in QMake.conf and counts as system type!

Correspondingly, you must write in the install section of celestia.pro:

unix{   
    PREFIX = $$[PREFIX]
    isEmpty(PREFIX) { PREFIX=/usr/local }
    message ("PREFIX =" $$PREFIX)
....

In my case query -unset VAR works fine as it should

Sorry, I got to stop, perhaps more later...

Fridger


On 04/14/2012 04:21 PM, Bernard GODARD wrote:
Hi all,

I have added a section on building the QT4 version of celestia on
Linux in http://en.wikibooks.org/w/index.php?title=Celestia/Development/Qt4

I have a few questions about the celestia.pro file:
1) the unix part does not link against libpng and zlib. Why is that?

2) How can I change the INSTALL PREFIX prefix to be /opt instead of
/usr/local without editing celestia.pro but using the QMAKE variable
PREFIX in celestia.pro. I tried the following:

astro@saturn:~/Dev/celestia/src$qmake -set PREFIX /opt
astro@saturn:~/Dev/celestia/src$qmake -query PREFIX
/opt
astro@saturn:~/Dev/celestia/src$cd ~/.config/Trolltech
astro@saturn:~/.config/Trolltech$ more QMake.conf
[2.01a]
PREFIX=/opt
astro@saturn:~/.config/Trolltech$ qmake -query
PREFIX:/opt
QT_INSTALL_PREFIX:/usr
QT_INSTALL_DATA:/usr/share/qt4
QT_INSTALL_DOCS:/usr/share/qt4/doc
QT_INSTALL_HEADERS:/usr/include/qt4
QT_INSTALL_LIBS:/usr/lib/x86_64-linux-gnu
QT_INSTALL_BINS:/usr/bin
QT_INSTALL_PLUGINS:/usr/lib/x86_64-linux-gnu/qt4/plugins
QT_INSTALL_IMPORTS:/usr/lib/qt4/imports
QT_INSTALL_TRANSLATIONS:/usr/share/qt4/translations
QT_INSTALL_CONFIGURATION:/etc/xdg
QT_INSTALL_EXAMPLES:/usr/lib/qt4/examples
QT_INSTALL_DEMOS:/usr/lib/qt4/demos
QMAKE_MKSPECS:/usr/share/qt4/mkspecs
QMAKE_VERSION:2.01a
QT_VERSION:4.7.4
astro@saturn:~/.config/Trolltech$

but when running qmake on celestia.pro it still sees PREFIX as empty
and sets it to /usr/local.
Also I can't even unset the variable PREFIX without manually deleting
the file ~/.config/Trolltech/Qmake.conf. How do you do that? Is there
nothing like qmake -unset?

Thank you,

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Celestia-developers mailing list
Celestia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/celestia-developers