aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-09-22 14:09:42 +0200
committerPřemysl Janouch <p@janouch.name>2018-09-23 06:38:03 +0200
commit942bda7db4b7b9e5bae6ad1ad81295b1f346a9f6 (patch)
tree2602530b371ee3449bfc9233709bb6fe9f82e5fa /CMakeLists.txt
parentb0d3b2dcb5c02fedb0f4d95e8337f7829015a7bd (diff)
downloadtdv-942bda7db4b7b9e5bae6ad1ad81295b1f346a9f6.tar.gz
tdv-942bda7db4b7b9e5bae6ad1ad81295b1f346a9f6.tar.xz
tdv-942bda7db4b7b9e5bae6ad1ad81295b1f346a9f6.zip
Use XCB and SelectSelectionInput instead of GTK+
As it happens, there is no real need to constantly poll for changes, since XFixes can inform us of updates as they happen. With GTK+ gone we've got dependencies and error handling under control. XCB is a truly awful thing to learn, though. Our method will never work on Wayland or Windows, so we don't miss out on anything by abandoning the huge toolkit.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 12 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4990a51..c13754f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,19 +74,18 @@ else (USE_SYSTEM_TERMO)
set (Termo_LIBRARIES termo-static)
endif (USE_SYSTEM_TERMO)
-# We actually don't care about the specific version
-pkg_search_module (gtk gtk+-3.0 gtk+-2.0)
-option (WITH_GTK "Compile with GTK+ support" ${gtk_FOUND})
-
-if (WITH_GTK)
- if (NOT gtk_FOUND)
- message (FATAL_ERROR "GTK+ library not found")
- endif (NOT gtk_FOUND)
-
- list (APPEND dependencies_INCLUDE_DIRS ${gtk_INCLUDE_DIRS})
- list (APPEND dependencies_LIBRARY_DIRS ${gtk_LIBRARY_DIRS})
- list (APPEND dependencies_LIBRARIES ${gtk_LIBRARIES})
-endif (WITH_GTK)
+pkg_check_modules (xcb xcb xcb-xfixes)
+option (WITH_X11 "Compile with X11 selection support using XCB" ${xcb_FOUND})
+
+if (WITH_X11)
+ if (NOT xcb_FOUND)
+ message (FATAL_ERROR "XCB not found")
+ endif (NOT xcb_FOUND)
+
+ list (APPEND dependencies_INCLUDE_DIRS ${xcb_INCLUDE_DIRS})
+ list (APPEND dependencies_LIBRARY_DIRS ${xcb_LIBRARY_DIRS})
+ list (APPEND dependencies_LIBRARIES ${xcb_LIBRARIES})
+endif (WITH_X11)
link_directories (${dependencies_LIBRARY_DIRS})
include_directories (${ZLIB_INCLUDE_DIRS} ${icu_INCLUDE_DIRS}