~neon/extra-cmake-modules/master

Viewing all changes in revision 974.

  • Committer: Kevin Funk
  • Date: 2020-02-07 11:03:22 UTC
  • Revision ID: git-v1:fafbc8cec665edf3b207162ceee87914d2beff0a
ECMGeneratePriFile: Fix static configurations

Summary:
Populate module_config with staticlib. This is needed for Qt 5.12, as
Makefiles contain the full path to the library instead of just the base
name. QMake needs to be aware of the build type. This issue was found in
KDStateMachineEditor's .pri files.

Before this patch the linker tried to link against .so files even for
static libraries.

Note: Probably not very relevenat to KDE Frameworks (since it's all
about shared libraries, but I'd like to keep the original
ECMGeneratePriFile version up-to-date)

Compare:

```
% cat kdsme-qmake-test.pro
QT += KDSMEDebugInterfaceSource

!qtHaveModule(KDSMEDebugInterfaceSource): warning("Library not found")

SOURCES += main.cpp

% qmake --version
QMake version 3.1
Using Qt version 5.9.8 in /home/kfunk/devel/build/qt5.9/qtbase/lib
% qmake .
% make
...
g++ -Wl,-rpath,/home/kfunk/devel/build/qt5.9/qtbase/lib ...  -L.../lib -lkdstatemachineeditor_debuginterfacesource ...

% make clean

% env-qt5.12
% qmake --version
QMake version 3.1
Using Qt version 5.12.5 in /home/kfunk/devel/build/qt5.12/qtbase/lib

% qmake .
% make
...
g++ -Wl,-rpath,/home/kfunk/devel/build/qt5.12/qtbase/lib ... .../lib/libkdstatemachineeditor_debuginterfacesource.a ...

Reviewers: dfaure, winterz, vkrause, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel, kde-buildsystem

Tags: #frameworks, #build_system

Differential Revision: https://phabricator.kde.org/D26394

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: