Comment 4 for bug 1088064

Revision history for this message
Eric Heintzmann (heintzmann-eric) wrote :

Sorry

Alexander, I've looked at your patch. You should not harcode .config path in your code.
Instead you should read $XDG_CONFIG_HOME environment variable, and use it if defined and not empty.
If $XDG_CONFIG_HOME is not defined or it is empty, then you can default to $HOME/.config.

For CMAKE, the code should looks like to:

IF $ENV{XDG_CONFIG_HOME} is defined
    IF $ENV{XDG_CONFIG_HOME} is not empty
        SET(CMAKE_INSTALL_PREFIX $ENV{XDG_CONFIG_HOME}/stellarium)
    ELSE
        SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/.config/stellarium)
    ENDIF
 ELSE
    SET(CMAKE_INSTALL_PREFIX $ENV{HOME}/.config/stellarium)
ENDIF