Commit c5d6205d authored by JanKusanagi's avatar JanKusanagi

Ability to pass NO_KF5 to qmake to disable KF5 features

parent 5273b5c4
......@@ -3,10 +3,10 @@ v1.4.3 (UNRELEASED)
- Added optional spell checking support, using KDE's Sonnet.
It will be enabled if Sonnet's development packages are installed when
building the program.
building the program (unless CONFIG+=NO_KF5 is used).
- Added optional character picker, using KDE's KCharSelect widget.
It will be enabled if the development packages for KWidgetsAddons are
installed when building the program.
installed when building the program (unless CONFIG+=NO_KF5 is used).
- Adapted AppStream-related file naming and IDs to current standards.
- Changed more dialogs to follow the environment's button order.
......
......@@ -207,35 +207,42 @@ a .prf feature file.")
}
# Enable Sonnet spellcheck support, if necessary modules are installed
qtHaveModule(SonnetCore) {
message("Spellchecking support: SonnetCore module found OK")
QT += SonnetCore
qtHaveModule(SonnetUi) {
message("Spellchecking support: SonnetUi module found OK")
QT += SonnetUi
DEFINES += HAVE_SONNET_SPELLCHECKER HAVE_KF5
message("Spellchecking support: ENABLED")
# Enable optional KF5-based features, if available,
# unless CONFIG+=NO_KF5 is passed to qmake
!NO_KF5 {
# Enable Sonnet spellcheck support, if necessary modules are installed
qtHaveModule(SonnetCore) {
message("Spellchecking support: SonnetCore module found OK")
QT += SonnetCore
qtHaveModule(SonnetUi) {
message("Spellchecking support: SonnetUi module found OK")
QT += SonnetUi
DEFINES += HAVE_SONNET_SPELLCHECKER HAVE_KF5
message("Spellchecking support: ENABLED")
} else {
message("Optional spellchecking support: DISABLED (SonnetUi module not found)")
}
} else {
message("Optional spellchecking support: DISABLED (SonnetUi module not found)")
message("Optional spellchecking support: DISABLED (SonnetCore module not found)")
}
} else {
message("Optional spellchecking support: DISABLED (SonnetCore module not found)")
}
# Enable KWidgetsAddons, if the necessary module is installed, for KCharSelect
qtHaveModule(KWidgetsAddons) {
message("Character picker support: KWidgetsAddons module found OK")
QT += KWidgetsAddons
SOURCES += src/characterpicker.cpp
HEADERS += src/characterpicker.h
DEFINES += HAVE_KCHARSELECT HAVE_KF5
message("Character picker (KCharSelect) support: ENABLED")
} else {
message("Optional character picker (KCharSelect) support: DISABLED")
message("(KWidgetsAddons module not found)")
# Enable KWidgetsAddons, if the necessary module is installed, for KCharSelect
qtHaveModule(KWidgetsAddons) {
message("Character picker support: KWidgetsAddons module found OK")
QT += KWidgetsAddons
SOURCES += src/characterpicker.cpp
HEADERS += src/characterpicker.h
DEFINES += HAVE_KCHARSELECT HAVE_KF5
message("Character picker (KCharSelect) support: ENABLED")
} else {
message("Optional character picker (KCharSelect) support: DISABLED")
message("(KWidgetsAddons module not found)")
}
}
else {
message("* Disabling all KDE Frameworks support.")
message("* Spellcheck support and character picker will not be available.")
}
......
......@@ -114,7 +114,9 @@ From Dianara's main directory, where Dianara.pro is located, execute:
qmake .. # Ask Qmake to generate a Makefile[*]
make # Run Make to compile the project
[*]you might need to use the command 'qmake-qt5' instead
[*]You might need to use the command 'qmake-qt5' instead
If you have KF5 modules installed but want to build Dianara without support
for those extra features, add CONFIG+=NO_KF5 to the qmake call.
That should do it!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment