[SailfishDevel] Why does sailfishapplication.cpp contain conditional preprocessor statements for desktop?

Superpelican superpelican at zoho.com
Sun May 5 16:44:44 UTC 2013


I've now also modified sailfishapplication.pri: I removed 
sailfishapplication.cpp and sailfishapplication.h from the project and 
modified the sailfishapplication.pri so it doesn't include 
sailfishapplication.cpp and .h anymore. I've also removed 'desktop' from 
INSTALLS=+ too. The new sailfishapplication.pri looks like this:
<code>
QT += declarative

INCLUDEPATH += $$PWD

TARGETPATH = /opt/sdk/bin
target.path = $$TARGETPATH

DEPLOYMENT_PATH = /opt/sdk/share/$$TARGET
qml.path = $$DEPLOYMENT_PATH

INSTALLS += target qml

DEFINES += DEPLOYMENT_PATH=\"\\\"\"$${DEPLOYMENT_PATH}/\"\\\"\"

CONFIG += link_pkgconfig
packagesExist(qdeclarative-boostable) {
     message("Building with qdeclarative-boostable support")
     DEFINES += HAS_BOOSTER
     PKGCONFIG += qdeclarative-boostable
} else {
     warning("qdeclarative-boostable not available; startup times will 
be slower")
}
</code>

Feel free to notify me about possible improvements ;)

P.S.: It's based on the .pri from the example Sailfish project that you 
get when you create a new Sailfish application project in the Sailfish IDE



More information about the Devel mailing list