diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index d16d61c939d..949d0d979c3 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -2295,6 +2295,9 @@ function(add_qt_test name) # assumptions about the location of helper processes, and those paths would be different # if a test is built as a bundle. set_property(TARGET "${name}" PROPERTY MACOSX_BUNDLE FALSE) + # The same goes for WIN32_EXECUTABLE, but because it will detach from the console window + # and not print anything. + set_property(TARGET "${name}" PROPERTY WIN32_EXECUTABLE FALSE) # QMLTest specifics @@ -2331,7 +2334,10 @@ function(add_qt_test name) add_test(NAME "${name}" COMMAND ${test_executable} ${extra_test_args} -o ${name}.xml,xml -o -,txt WORKING_DIRECTORY "${test_working_dir}") set_tests_properties("${name}" PROPERTIES RUN_SERIAL "${arg_RUN_SERIAL}" LABELS "${label}") - set_property(TEST "${name}" APPEND PROPERTY ENVIRONMENT "PATH=${path}${QT_PATH_SEPARATOR}${CMAKE_CURRENT_BINARY_DIR}${QT_PATH_SEPARATOR}$ENV{PATH}") + + # Get path to qtbase/bin, then prepend this path containing the shared libraries to PATH + set(INSTALL_PREFIX_BIN "${CMAKE_INSTALL_PREFIX}/bin") + set_property(TEST "${name}" APPEND PROPERTY ENVIRONMENT "PATH=${CMAKE_CURRENT_BINARY_DIR}${QT_PATH_SEPARATOR}${INSTALL_PREFIX_BIN}${QT_PATH_SEPARATOR}$ENV{PATH}") # Add the install prefix to list of plugin paths when doing a prefix build if(NOT QT_INSTALL_DIR) diff --git a/tests/auto/tools/CMakeLists.txt b/tests/auto/tools/CMakeLists.txt index c546da967f1..aa455879934 100644 --- a/tests/auto/tools/CMakeLists.txt +++ b/tests/auto/tools/CMakeLists.txt @@ -1,7 +1,11 @@ # Generated from tools.pro. add_subdirectory(qmakelib) -add_subdirectory(qmake) +# special case begin +if(NOT WIN32) # @todo: this is broken, see QTBUG-78449 + add_subdirectory(qmake) +endif() +# special case end #add_subdirectory(moc) #add_subdirectory(rcc) if(TARGET Qt::Widgets)