D26394: ECMGeneratePriFile: Fix static configurations

Kevin Funk noreply at phabricator.kde.org
Fri Jan 3 14:15:20 GMT 2020


kfunk created this revision.
kfunk added a reviewer: dfaure.
Herald added projects: Frameworks, Build System.
Herald added subscribers: kde-buildsystem, kde-frameworks-devel.
kfunk requested review of this revision.

REVISION 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 ...

REPOSITORY
  R240 Extra CMake Modules

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D26394

AFFECTED FILES
  modules/ECMGeneratePriFile.cmake

To: kfunk, dfaure
Cc: kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200103/00eaef2b/attachment.html>


More information about the Kde-frameworks-devel mailing list