Commit a512f549 authored by Tobias C. Berner's avatar Tobias C. Berner

Hide the Linux specific parts behind check for headers

Summary:
Only build
  * `virtual_terminal.cpp` in the presence of `linux/vt.h`
  * `fbdev`-backend in the precense of `linux/fb.h`

Test Plan:

Reviewers: #kwin, #freebsd, graesslin, bcooksley

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D6847
parent a1af59e9
......@@ -325,6 +325,14 @@ add_feature_info("prctl/procctl tracing control"
configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
check_include_file("linux/vt.h" HAVE_LINUX_VT_H)
add_feature_info("linux/vt.h"
HAVE_LINUX_VT_H
"Required for virtual terminal support under wayland")
check_include_file("linux/fb.h" HAVE_LINUX_FB_H)
add_feature_info("linux/fb.h"
HAVE_LINUX_FB_H
"Required for the fbdev backend")
########### global ###############
set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
......@@ -480,8 +488,13 @@ if(HAVE_INPUT)
libinput/device.cpp
libinput/events.cpp
libinput/libinput_logging.cpp
virtual_terminal.cpp
)
if (HAVE_LINUX_VT_H)
set(kwin_KDEINIT_SRCS
${kwin_KDEINIT_SRCS}
virtual_terminal.cpp
)
endif()
endif()
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc)
......
......@@ -2,7 +2,9 @@ if(HAVE_INPUT)
if(HAVE_DRM)
add_subdirectory(drm)
endif()
add_subdirectory(fbdev)
if (HAVE_LINUX_FB_H)
add_subdirectory(fbdev)
endif()
if(HAVE_LIBHYBRIS)
add_subdirectory(hwcomposer)
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment