aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2022-03-14 10:53:41 +0000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-16 14:31:44 +0000
commit4d7469651e26d0aa42fbe1a196bcac65762610d2 (patch)
tree439a81a05967303e348885b09522c55f15ff51a4
parentfd37fd69918efd93d81be68fe274437e07b7e189 (diff)
sdk: support cmake builds on Windows
CMake and Ninja combination does not support changing RPATH on Windows hosts, even when cross-compiling. Add CMake configuration to workaround this. Change-Id: I5d82c0a7f91cf81a0b3ed7c0f14aeccc36464f91 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io> (cherry picked from commit 554b947ba4e5b5bbdf6b7ca39ce8a7e44b009c8a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--classes/populate_sdk_qt6_base.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/populate_sdk_qt6_base.bbclass b/classes/populate_sdk_qt6_base.bbclass
index 4263afb..1871081 100644
--- a/classes/populate_sdk_qt6_base.bbclass
+++ b/classes/populate_sdk_qt6_base.bbclass
@@ -120,6 +120,10 @@ function(cmake_initialize_per_config_variable _PREFIX _DOCSTRING)
_cmake_initialize_per_config_variable(\${ARGV})
endfunction()
+if(CMAKE_HOST_WIN32)
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+endif()
+
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
endif()