lyx_mirror/development/autotests/xvkbd/CMakeLists.txt
Kornel Benko 57b04ac7f4 Cmake build: First try to use autotests.
Many test are not running, but if changed the '-dbg xxx' to '-dbg any'
then all of sudden they pass ...
(The buffered output of lyx is often disrupted too early with 'kill -9',
so the expected data are not available for the appropriate test)
2012-12-11 15:17:04 +01:00

34 lines
803 B
CMake

# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# Copyright (c) 2012 Kornel Benko kornel@lyx.org
#
project(xvkbd)
find_package(X11 REQUIRED)
find_package(PkgConfig)
add_definitions(-DUSE_XTEST -DUSE_I18N)
add_executable(xvkbd xvkbd.c findwidget.c)
set(XVFBDLIBS)
if(PKG_CONFIG_FOUND)
pkg_check_modules(XAWLIB REQUIRED xaw7)
list(APPEND XVFBDLIBS ${XAWLIB_LIBRARIES})
pkg_check_modules(XTEST REQUIRED xtst)
list(APPEND XVFBDLIBS ${XTEST_LIBRARIES})
else()
list(APPEND XVFBDLIBS -lXaw7)
foreach(_lb Xt XTest X11)
if(X11_${_lb}_LIB)
list(APPEND XVFBDLIBS ${X11_${_lb}_LIB})
else()
message(FATAL_ERROR "Library for ${_lb} not found")
endif()
endforeach()
endif()
target_link_libraries(xvkbd ${XVFBDLIBS})