summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-08-05 11:16:19 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-05 16:18:04 +0000
commit9d5b0a77da36b9bae2331304eed4d6690dd993a2 (patch)
tree2b62d5e3a9c50805e52f4e5e0d53ce6006de60d4
parentb61de3163a14af058685ae80b17791b2edb4455e (diff)
CMake: Fix mockplugins test not to fail in a non-prefix build
Explicitly running the install step would fail in a non-prefix build. Do it conditionally on the no_prefix feature. Change-Id: I78cd63f51c499a0df451b08290c6dfc84e52666c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 6423a657c7179e7e0f00c14dccc94b237b3160b8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/cmake/CMakeLists.txt15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 54ce69f0be..163ade3f59 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -253,11 +253,16 @@ elseif(QT6_INSTALL_BINS)
endif()
# Test building and installing a few dummy Qt modules and plugins.
-_qt_internal_test_expect_pass(mockplugins
- BINARY "${CMAKE_COMMAND}"
- BINARY_ARGS
- "-DQT_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}/mockplugins"
- -P "${qt_install_prefix}/${qt_install_bin_dir}/qt-cmake-private-install.cmake")
+set(mockplugins_test_args "")
+if(NOT QT_FEATURE_no_prefix)
+ list(APPEND mockplugins_test_args
+ BINARY "${CMAKE_COMMAND}"
+ BINARY_ARGS
+ "-DQT_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}/mockplugins"
+ -P "${qt_install_prefix}/${qt_install_bin_dir}/qt-cmake-private-install.cmake"
+ )
+endif()
+_qt_internal_test_expect_pass(mockplugins ${mockplugins_test_args})
set_tests_properties(mockplugins PROPERTIES FIXTURES_SETUP build_mockplugins)
# Test importing the plugins built in the project above.