summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2023-08-12 02:16:07 +0200
committerRobert Griebl <robert.griebl@qt.io>2023-09-01 17:07:40 +0200
commite5325d6f8bd4d3e78ce776623864f5c843dc3da3 (patch)
tree0b0b4f65deb5d2d7c4e512002560f304b2a6c99c /tests
parent2262d7b4c1475860d1d0985f74938450d1f8a469 (diff)
cmake: allow compilation of appman-packager when cross-compiling
cmake will not compile tools when cross-compiling anyway, but due to our custom check, you couldn't even force the build with -DQT_FORCE_BUILD_TOOLS=ON if you needed to. In addition, the documentation for the "tools-only" configure option was very outdated. Change-Id: Ib5e6a72414ba5bbe0c5dc98d8ec5d5e66790216e Pick-to: 6.5 6.6 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/data/CMakeLists.txt8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/data/CMakeLists.txt b/tests/data/CMakeLists.txt
index 6f8be60c..521749b9 100644
--- a/tests/data/CMakeLists.txt
+++ b/tests/data/CMakeLists.txt
@@ -28,6 +28,8 @@ endforeach()
qt_internal_collect_command_environment(env_path env_plugin_path)
+qt_am_internal_find_host_packager()
+
if (WIN32)
find_program(bash bash.exe
PATHS ENV PATH
@@ -44,18 +46,12 @@ if (WIN32)
# /mingw64/bin to $PATH, which in most cases has incompatible versions of the stdc++ and
# gcc libs, preventing the appman-packager from starting.
- if (NOT TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::appman-packager)
- find_package(Qt6 COMPONENTS AppManMainPrivateTools)
- endif()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/packages
COMMAND ${bash} -c 'export PATH="`cygpath -u -p \"${env_path}\"`:$$PATH" \; ${CMAKE_CURRENT_BINARY_DIR}/create-test-packages.sh $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::appman-packager>'
DEPENDS ${ALL_TEST_DATA_FILES}
)
endif()
else()
- if (NOT TARGET ${QT_CMAKE_EXPORT_NAMESPACE}::appman-packager)
- find_package(Qt6 COMPONENTS AppManMainPrivateTools)
- endif()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/packages
COMMAND "${CMAKE_COMMAND}" -E env "PATH=${env_path}${QT_PATH_SEPARATOR}$ENV{PATH}"
${CMAKE_CURRENT_BINARY_DIR}/create-test-packages.sh $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::appman-packager>