summaryrefslogtreecommitdiffstats
path: root/cmake/qt.toolchain.cmake.in
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-06-21 14:58:52 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-06-24 14:23:11 +0000
commit2895f3ffaa632f129232f70564a16f202ead0bda (patch)
tree4871a82cf1aa6f90542171bd4fec648fb714d9fb /cmake/qt.toolchain.cmake.in
parenta581f917e2043828b032269dd6c8d60f338f3dba (diff)
Generate a toolchain and convenience cmake wrapper
This gets us a step into the direction of convenience that qmake offered: * QtBase is configured with a long command line (especially when cross-compiling) * Afterwards application developers (or other module builds) can just use qmake && make By generating a toolchain file we can capture vcpkg and toolchain chain-loading and a shell script can take care of providing the prefix path. Change-Id: Ided81f5432cab862306f2bea86cfe8e56adf71b0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/qt.toolchain.cmake.in')
-rw-r--r--cmake/qt.toolchain.cmake.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in
new file mode 100644
index 0000000000..d816e1dcc9
--- /dev/null
+++ b/cmake/qt.toolchain.cmake.in
@@ -0,0 +1,18 @@
+list(APPEND CMAKE_PREFIX_PATH "@CMAKE_INSTALL_PREFIX@")
+list(APPEND CMAKE_FIND_ROOT_PATH "@CMAKE_INSTALL_PREFIX@")
+
+@init_qt_host_path@
+
+@init_original_toolchain_file@
+
+@init_vcpkg@
+
+if(qt_chainload_toolchain_file)
+ include("${qt_chainload_toolchain_file}")
+ unset(qt_chainload_toolchain_file)
+endif()
+
+if(QT_HOST_PATH)
+ list(APPEND CMAKE_PREFIX_PATH "${QT_HOST_PATH}")
+ list(APPEND CMAKE_FIND_ROOT_PATH "${QT_HOST_PATH}")
+endif()