mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
f02f671dd0
Removed if no X11. Because X11 is needed for xvkbd but not available on some platforms (even if UNIX)
33 lines
776 B
CMake
33 lines
776 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(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})
|