For my application Sailfin, I’ve decided to split the C++ core into a separate library, from the Sailfish OS Sailfish-specific code. This way, I can make the last one depend on Sailfish-specific libraries, like libsailfishapp and in the future sailfishsecrets for storing login tokens.
I’ve followed the “Installing and using private shared libraries” section in the Sailfish SDK user manual and structured my project as follows:
harbour-sailfin
| harbour-sailfin.pro
|
+---sailfish
| | sailfish.pro
| |
| +---icons
| | | ...
| |
| +---qml
| | | harbour-sailfin.qml
| | | ...
| |
| +---src
| | harbour-sailfin.cpp
|
+---core
| | core.pro
| +--- include
| | | jellyfin.h
| | | ...
| |
| +--- src
| | | jellyfin.cpp
| | | ...
|
+---rpm
| harbour-sailfin.spec
The problem I have right now is that the library inside the folder “core” is not being stripped. Both the file size and sfdk check
confirm this. I have tried looking for documentation on how to enable it for the core subproject, but I couldn’t find anything useful on how to do this. Or should I adjust something in my Spectacle file?
The source code as I have it as writing this post, can be found here:
Slightly offtopic rant incoming: If Sailfish OS’s qtcreator supported cmake better, like being able to show the QML files, I would switch away from qmake in a heartbeat. I really dislike qmake, I can’t find good documentation about it, Qt is going to stop supporting it and first of all, why was it ever created? Why was it needed? It’s fun for your hello-world program, but anything more complex than that it becomes nothing but a headache. Cmake has always been fine in my opinion.