Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to CMake #14

Merged
merged 1 commit into from May 17, 2021
Merged

Port to CMake #14

merged 1 commit into from May 17, 2021

Conversation

PureTryOut
Copy link
Contributor

Qt is slowly deprecating QMake. They have stopped building Qt itself
with QMake and moved Qt6 to CMake instead. Although QMake is still
around, it's clear the focus has shifted and it would be good for
applications to switch over to an alternative build system as well

So hereby, switch the build system to CMake

@jrtberlin
Copy link
Member

Thank you for your PR.
We discussed it and think that we have to switch to cmake at some point anyway because of the mentioned Qt6 change.
Your PR is a good start for that change.

@PureTryOut
Copy link
Contributor Author

PureTryOut commented Apr 23, 2021

Update: added CMake config files so other CMake projects can find and link to this library with find_package(AsteroidApp) and target_link_libraries(<target> AsteroidApp).

@PureTryOut
Copy link
Contributor Author

Last change from my side, I promise 😜

I just found out about https://api.kde.org/ecm/module/ECMGeneratePkgConfigFile.html and since we already use ECM anyway, I switched the pkgconfig file to use that rather than using configure_file. Saves us a file and some lines of CMake code.

@@ -0,0 +1,40 @@
# Try to find qdeclarative5-boostable
# Once done this will define
# QDECLARATIVE_FOUND - System has qdeclarative
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QDECLARATIVE is also a bit misleading, it evokes QtDeclarative which is basically QML but what you are actually searching for is mdeclarativecache5 which is part of mapplauncherd-qt5.

MAPPLAUNCHERD_QT5_FOUND would be a better name

@@ -0,0 +1,40 @@
# Try to find mpris
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is a bit misleading. Strictly speaking, MPRIS is a DBus API for controlling music players https://specifications.freedesktop.org/mpris-spec/latest/ but what you are searching for here is a Qt5 wrapper around that API called QtMpris.

QTMPRIS_FOUND would be a better name

Qt is slowly deprecating QMake. They have stopped building Qt itself
with QMake and moved Qt6 to CMake instead. Although QMake is still
around, it's clear the focus has shifted and it would be good for
applications to switch over to an alternative build system as well

So hereby, switch the build system to CMake

This also makes qml-asteroid available for other CMake packages as
"AsteroidApp", and provides several CMake modules used to find various
Mer/SailfishOS components
@MagneFire MagneFire merged commit 8945fa4 into AsteroidOS:master May 17, 2021
@PureTryOut PureTryOut deleted the cmake branch May 17, 2021 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants