From 8bf50e5b8daa3ac21e6b4e3035511a75f8887a7c Mon Sep 17 00:00:00 2001 From: David Timber Date: Fri, 1 Nov 2024 02:44:07 +0100 Subject: Add lib checks, other changes ... - Add libX11 and libXrandr checks in cmake - Limit refresh rate to 60 - Call XFlush() before sleeping in main_loop() - Shorter XOpenDisplay() error message - print the troubleshoot suggestions in the script --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 425117f..c74d615 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,13 @@ add_library(libxbouncing include(FindX11) +IF (NOT X11_FOUND) + MESSAGE(FATAL_ERROR "X11 not found.") +ENDIF() +IF (NOT X11_Xrandr_FOUND) + MESSAGE(FATAL_ERROR "Xrandr not found.") +ENDIF() + add_executable(xbouncing src/xbouncing.c) add_executable(parse-xbm src/parse-xbm.c) target_link_libraries(parse-xbm libxbouncing) -- cgit