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>
This commit is contained in:
parent
b61de3163a
commit
9d5b0a77da
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user