on xenial help sign in
Use CMAKE_LIBRARY_ARCHITECTURE instead of asking gcc
7ba8f77Michał Sawicz
cmake/modules/QmlTest.cmake+1−7
@@ -3,12 +3,6 @@
3
3
4# These functions respect the global STDOUT_LOGGER and ARTIFACTS_DIR variables.
4# These functions respect the global STDOUT_LOGGER and ARTIFACTS_DIR variables.
5
5
6−execute_process(
7− COMMAND gcc -dumpmachine
8− OUTPUT_VARIABLE ARCH_TRIPLET
9− OUTPUT_STRIP_TRAILING_WHITESPACE
10−)
11−
12# You can use those with cmake_parse_arguments
6# You can use those with cmake_parse_arguments
13# if you need to wrap and mangle arguments.
7# if you need to wrap and mangle arguments.
14set(QMLTEST_OPTIONS ADD_TEST CACHE INTERNAL "")
8set(QMLTEST_OPTIONS ADD_TEST CACHE INTERNAL "")
@@ -156,7 +150,7 @@ function(add_executable_test COMPONENT_NAME TARGET)
156 add_qmltest_target(xvfbtest${COMPONENT_NAME} ${TARGET}
150 add_qmltest_target(xvfbtest${COMPONENT_NAME} ${TARGET}
157 COMMAND $<TARGET_FILE:xvfb-run> --server-args "-screen 0 1024x768x24" --auto-servernum ${qmltest_command}
151 COMMAND $<TARGET_FILE:xvfb-run> --server-args "-screen 0 1024x768x24" --auto-servernum ${qmltest_command}
158 ${depends}
152 ${depends}
159− ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT} LD_PRELOAD=/usr/lib/${ARCH_TRIPLET}/mesa/libGL.so.1
153+ ENVIRONMENT QML2_IMPORT_PATH=${imports} ${QMLTEST_ENVIRONMENT} LD_PRELOAD=/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/mesa/libGL.so.1
160 TARGETS ${xvfb_targets}
154 TARGETS ${xvfb_targets}
161 )
155 )
162 endif()
156 endif()