diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-04-30 17:00:13 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-05-01 19:11:29 +0200 |
commit | a876ff1283d997795a421f7e0a49e0ad3c2f2ad5 (patch) | |
tree | 0932dfb2faaecbf9f5085b36675c0d0f9f92a705 /cmake/QtBuildInternalsExtra.cmake.in | |
parent | 88f6087f01377e629814d2c7808e7c398268b6b6 (diff) |
CMake: Fix failing standalone tests on Windows
Due to the install prefix being changed for standalone tests,
the correct $qt_prefix/bin folder was not added to the PATH
environment variable when running tests.
Make sure to always include the the original qt install prefix,
even if a different install prefix is specified when configuring
standalone tests.
Amends 39090ea15c41eded8a233ec2633c0c657280297c
Change-Id: I22aab732bb2bb679074a811d28d8209e1d535df3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtBuildInternalsExtra.cmake.in')
-rw-r--r-- | cmake/QtBuildInternalsExtra.cmake.in | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in index 5278890337..ea945a913d 100644 --- a/cmake/QtBuildInternalsExtra.cmake.in +++ b/cmake/QtBuildInternalsExtra.cmake.in @@ -10,6 +10,14 @@ set(QT_BUILD_INTERNALS_PATH "${CMAKE_CURRENT_LIST_DIR}") set(CMAKE_INSTALL_PREFIX @CMAKE_INSTALL_PREFIX@ CACHE PATH "Install path prefix, prepended onto install directories." FORCE) +# Save the original install prefix in an additional variable. +# While CMAKE_INSTALL_PREFIX may be overridden in certain cases (like for standalone tests building +# or for singular qt-cmake-standalone-test usage), we still need the original qtbase install prefix +# to know where the shared libraries are located to inject them into PATH when running tests via +# ctest. +set(QT_BUILD_INTERNALS_ORIGINAL_INSTALL_PREFIX @CMAKE_INSTALL_PREFIX@ CACHE PATH + "Original install prefix specified when building qtbase." FORCE) + # Propagate developer builds to other modules via BuildInternals package. if(@FEATURE_developer_build@) set(FEATURE_developer_build ON CACHE BOOL "Developer build." FORCE) |