- if(X11_FOUND AND PCREGREP_EXE AND WMCTRL_EXE)
- #message(STATUS "PCREGREP_EXE and WMCTRL_EXE found")
- project(autotests)
+ if(NOT X11_FOUND)
+ list(APPEND Missing "X11")
+ endif()
+ find_package(PkgConfig)
+ if(PKG_CONFIG_FOUND)
+ foreach(_lb "xaw7" "xmu" "xtst")
+ pkg_check_modules(${_lb}LIB ${_lb})
+ if(${_lb}LIB_LIBRARIES)
+ list(APPEND XVFBDLIBS ${${_lb}LIB_LIBRARIES})
+ else()
+ list(APPEND Missing ${_lb})
+ endif()
+ endforeach()
+ else()
+ foreach(_lb "Xaw7" "Xmu")
+ find_library(${_lb}LIB ${_lb})
+ if(${_lb}LIB)
+ list(APPEND XVFBDLIBS ${${_lb}LIB})
+ else()
+ list(APPEND Missing ${_lb})
+ endif()
+ endforeach()
+ foreach(_lb Xt XTest X11)
+ if(X11_${_lb}_LIB)
+ list(APPEND XVFBDLIBS ${X11_${_lb}_LIB})
+ else()
+ list(APPEND Missing ${_lb})
+ endif()
+ endforeach()
+ endif()
+ if (XVFBDLIBS)
+ list(REMOVE_DUPLICATES XVFBDLIBS)
+ endif()