]> git.lyx.org Git - lyx.git/blob - development/autotests/xvkbd/CMakeLists.txt
Cmake build: autotests
[lyx.git] / development / autotests / xvkbd / CMakeLists.txt
1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
3 #
4 # Copyright (c) 2012 Kornel Benko kornel@lyx.org
5 #
6 project(xvkbd)
7
8 find_package(PkgConfig)
9
10 add_definitions(-DUSE_XTEST -DUSE_I18N)
11
12 add_executable(xvkbd xvkbd.c findwidget.c)
13
14 set(XVFBDLIBS)
15
16 if(PKG_CONFIG_FOUND)
17   pkg_check_modules(XAWLIB REQUIRED xaw7)
18   list(APPEND XVFBDLIBS ${XAWLIB_LIBRARIES})
19   pkg_check_modules(XTEST REQUIRED xtst)
20   list(APPEND XVFBDLIBS ${XTEST_LIBRARIES})
21 else()
22   list(APPEND XVFBDLIBS -lXaw7)
23   foreach(_lb Xt XTest X11)
24     if(X11_${_lb}_LIB)
25       list(APPEND XVFBDLIBS ${X11_${_lb}_LIB})
26     else()
27       message(FATAL_ERROR "Library for ${_lb} not found")
28     endif()
29   endforeach()
30 endif()
31
32 target_link_libraries(xvkbd ${XVFBDLIBS})