Made the use of xvfb-run with QtGui tests optional.

To enable it run CMake with the USE_XVFB set to 1. Default is 0.
This commit is contained in:
Marcelo Lira 2010-09-27 16:56:16 -03:00
commit 62234b4f86

View file

@ -11,12 +11,15 @@ find_package(GeneratorRunner 0.6 REQUIRED)
find_package(Shiboken 0.5 REQUIRED) find_package(Shiboken 0.5 REQUIRED)
find_package(Qt4 4.5.0 REQUIRED) find_package(Qt4 4.5.0 REQUIRED)
find_program(XVFB_RUN NAMES xvfb-run)
set(XVFB_EXEC "") set(XVFB_EXEC "")
option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtGui tests popping windows on the screen." FALSE)
if(USE_XVFB)
find_program(XVFB_RUN NAMES xvfb-run)
if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
set(XVFB_EXEC ${XVFB_RUN}) set(XVFB_EXEC ${XVFB_RUN})
message("Using xvfb-run to perform QtGui tests.") message("Using xvfb-run to perform QtGui tests.")
endif() endif()
endif()
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE) option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )