瀏覽代碼

support/misc/toolchainfile.cmake.in: add definitions needed by Qt6

When compiling Qt6 applications for the target, CMake needs to have
two variables defined to find the host installation of Qt. These two
variables are unconditionally defined, regardless of whether Qt6 is
enabled in the configuration or not, as they do no harm when Qt6 is
not present/used.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Thomas Petazzoni 3 年之前
父節點
當前提交
b4cb2d3ebc
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      support/misc/toolchainfile.cmake.in

+ 9 - 0
support/misc/toolchainfile.cmake.in

@@ -125,3 +125,12 @@ if(@@TOOLCHAIN_HAS_FORTRAN@@)
     set(CMAKE_Fortran_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_FC@@")
   endif()
 endif()
+
+# For Qt6
+if(NOT DEFINED QT_HOST_PATH)
+  set(QT_HOST_PATH "${RELOCATED_HOST_DIR}")
+endif()
+
+if(NOT DEFINED QT_HOST_PATH_CMAKE_DIR)
+  set(QT_HOST_PATH_CMAKE_DIR "${RELOCATED_HOST_DIR}/lib/cmake")
+endif()