qt5base-lts/mkspecs
Kyle Edwards eda28621f6 Add support for linking against static builds in CMake
This change reinstates functionality that was removed in
commit 102e1822ff. However, it
differs from the original implementation in several ways:

* It uses the QMAKE_PRL_LIBS variable, replacing whitespace with
  semicolons, rather than using a dedicated QMAKE_PRL_LIBS_FOR_CMAKE
  variable.
* More importantly, it parses the -L and -l flags and uses CMake's
  find_library() command to look for the libraries in the specified
  search paths, and then converts them to absolute paths. This is the
  same approach that CMake's own FindPkgConfig module uses to find
  libraries specified in this form. Any other flags not of the form
  -L or -l (for instance, -s flags passed to Emscripten) are added to
  the new INTERFACE_LINK_OPTIONS target property if the CMake version
  is 3.13 or newer.

The original implementation of this functionality was removed because
of the lack of absolute library paths. At the time, it was believed
that qmake would have to be modified to do its own equivalent of
find_library() to get the absolute paths to the libraries. However,
the approach taken by FindPkgConfig has proven robust enough to be
used here, allowing CMake to find the absolute paths to the libraries
without having to modify qmake.

[ChangeLog][CMake] Added support for automatic linking of transitive
dependencies in static builds

Fixes: QTBUG-38913
Change-Id: I7d9cdb0d339c6ef697b04099d129481c770fc0fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-07 21:06:53 +00:00
..
aix-g++ Updated license headers 2016-01-15 12:25:24 +00:00
aix-g++-64 Updated license headers 2016-01-15 12:25:24 +00:00
android-clang Android: Prepare for the worst, when the NDK will remove all GNU tools 2018-11-19 11:45:20 +00:00
android-g++ Android: Prepare for the worst, when the NDK will remove all GNU tools 2018-11-19 11:45:20 +00:00
common Merge remote-tracking branch 'origin/5.12' into dev 2018-12-04 09:58:43 +01:00
cygwin-g++ Updated license headers 2016-01-15 12:25:24 +00:00
darwin-g++ Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
devices mkspecs: use cross compile tools with LTCG 2018-11-06 10:51:38 +00:00
dummy move all target spec handling to qmake-based configure system 2016-12-13 18:56:34 +00:00
features Add support for linking against static builds in CMake 2018-12-07 21:06:53 +00:00
freebsd-clang make mkspecs not mess up library and include search paths 2017-05-31 12:57:09 +00:00
freebsd-g++ make mkspecs not mess up library and include search paths 2017-05-31 12:57:09 +00:00
haiku-g++ Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
hpuxi-g++-64 Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
hurd-g++ Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
integrity-armv7 integrity: don't mess with QTPLUGIN.platforms 2018-11-21 23:08:10 +00:00
integrity-armv7-imx6 integrity: don't mess with QTPLUGIN.platforms 2018-11-21 23:08:10 +00:00
integrity-armv8-rcar integrity: don't mess with QTPLUGIN.platforms 2018-11-21 23:08:10 +00:00
integrity-x86 integrity: don't mess with QTPLUGIN.platforms 2018-11-21 23:08:10 +00:00
linux-aarch64-gnu-g++ Add new mkspec for cross-compiling Qt5 for AArch64 2017-03-31 00:34:48 +00:00
linux-arm-gnueabi-g++ Updated license headers 2016-01-15 12:25:24 +00:00
linux-clang Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
linux-clang-32 add mkspecs for linux clang 32 2018-08-31 05:34:46 +00:00
linux-clang-libc++ Updated license headers 2016-01-15 12:25:24 +00:00
linux-clang-libc++-32 add mkspecs for linux clang 32 2018-08-31 05:34:46 +00:00
linux-g++ Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
linux-g++-32 Updated license headers 2016-01-15 12:25:24 +00:00
linux-g++-64 Updated license headers 2016-01-15 12:25:24 +00:00
linux-icc centralize ICC flags for *nix-systems toolchains 2018-06-22 17:04:06 +00:00
linux-icc-32 Updated license headers 2016-01-15 12:25:24 +00:00
linux-icc-64 Updated license headers 2016-01-15 12:25:24 +00:00
linux-icc-k1om linux-icc-k1om build 2017-02-21 14:27:16 +00:00
linux-llvm Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
linux-lsb-g++ Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
lynxos-g++ Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
macx-clang macOS: Share deployment target and device arch config between makespecs 2018-08-23 13:09:46 +00:00
macx-g++ macOS: Share deployment target and device arch config between makespecs 2018-08-23 13:09:46 +00:00
macx-icc macOS: Share deployment target and device arch config between makespecs 2018-08-23 13:09:46 +00:00
macx-ios-clang iOS/tvOS/watchOS: Bump deployment targets 2018-08-24 11:38:16 +00:00
macx-tvos-clang iOS/tvOS/watchOS: Bump deployment targets 2018-08-24 11:38:16 +00:00
macx-watchos-clang iOS/tvOS/watchOS: Bump deployment targets 2018-08-24 11:38:16 +00:00
macx-xcode macOS: Disable main thread checker for Xcode test target 2018-11-12 07:16:26 +00:00
modules Adjust wiki links to the new redirect 2015-03-04 15:36:12 +00:00
netbsd-g++ make mkspecs not mess up library and include search paths 2017-05-31 12:57:09 +00:00
openbsd-g++ make mkspecs not mess up library and include search paths 2017-05-31 12:57:09 +00:00
qnx-aarch64le-qcc Enable stack-protector-strong for QNX 7.0.0 2017-06-13 14:01:24 +00:00
qnx-armle-v7-qcc Convert the old feature system 2016-09-15 08:24:10 +00:00
qnx-x86-64-qcc Enable stack-protector-strong for QNX 7.0.0 2017-06-13 14:01:24 +00:00
qnx-x86-qcc Convert the old feature system 2016-09-15 08:24:10 +00:00
solaris-cc Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
solaris-cc-64 Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
solaris-cc-64-stlport Updated license headers 2016-01-15 12:25:24 +00:00
solaris-cc-stlport Updated license headers 2016-01-15 12:25:24 +00:00
solaris-g++ Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
solaris-g++-64 Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
unsupported Stop including net/if.h from qplatformdefs.h 2017-10-08 06:41:24 +00:00
wasm-emscripten wasm: fix qpa plugin build system integration 2018-11-21 23:08:05 +00:00
win32-arm64-msvc2017 Add Windows Desktop arm64 target to Qtbase 2018-11-11 09:05:10 +00:00
win32-clang-g++ mkspecs: Factorize common parts of win32-g++ and win32-clang-g++ 2018-02-21 18:08:01 +00:00
win32-clang-msvc unify windows mkspecs: define c++ flags explicitly 2018-02-22 18:45:15 +00:00
win32-g++ Enable users to specify WindowsTargetPlatform[Min]Version in VS projects 2018-11-16 10:55:16 +00:00
win32-icc Fix qtbase build for clang-cl with MSVC 2017 15.8 2018-08-24 12:00:43 +00:00
win32-icc-k1om linux-icc-k1om build 2017-02-21 14:27:16 +00:00
win32-msvc unify windows mkspecs: define c++ flags explicitly 2018-02-22 18:45:15 +00:00
winrt-arm-msvc2015 Remove hard-coded MS compiler versions from the mkspecs 2016-12-23 13:45:26 +00:00
winrt-arm-msvc2017 winrt: Add arm mkspec for msvc 2017 2017-04-21 09:49:59 +00:00
winrt-x64-msvc2015 centralize QMAKE_COMPILER_DEFINES+=_WIN32 also for winrt specs 2016-12-30 10:25:11 +00:00
winrt-x64-msvc2017 winrt: Add support for Visual Studio 2017 2017-01-20 13:09:16 +00:00
winrt-x86-msvc2015 centralize QMAKE_COMPILER_DEFINES+=_WIN32 also for winrt specs 2016-12-30 10:25:11 +00:00
winrt-x86-msvc2017 winrt: Add support for Visual Studio 2017 2017-01-20 13:09:16 +00:00