From fe4b0145deefb2e729cdbcaed41db9b452ef440d Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 24 Jan 2024 11:10:58 +0100 Subject: Set all HAVE_ macros on the top level This keep everything consistent. --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index f1bfd618..ba6b3203 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,6 +115,18 @@ endif() # X11 stuff. It's in a if() so that we can say REQUIRED if(UNIX AND NOT APPLE) find_package(X11 REQUIRED) + if(X11_Xdamage_LIB) + add_definitions(-DHAVE_XDAMAGE) + endif() + if(X11_Xfixes_LIB) + add_definitions(-DHAVE_XFIXES) + endif() + if(X11_Xrandr_LIB) + add_definitions(-DHAVE_XRANDR) + endif() + if(X11_XTest_LIB) + add_definitions(-DHAVE_XTEST) + endif() endif() # Check for zlib @@ -306,6 +318,9 @@ if(UNIX AND NOT APPLE) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(LIBSYSTEMD libsystemd) + if (LIBSYSTEMD_FOUND) + add_definitions(-DHAVE_LIBSYSTEMD) + endif() endif() endif() -- cgit v1.2.3