[LyX/master] Cmake build: Add defines for HAVE_XCB_XCB_H and HAVE_LIBXCB
Kornel Benko
kornel at lyx.org
Thu Aug 29 12:01:15 UTC 2024
commit f1fddd86efa22ac9342de723f5ca724f252f8cbe
Author: Kornel Benko <kornel at lyx.org>
Date: Thu Aug 29 14:08:39 2024 +0200
Cmake build: Add defines for HAVE_XCB_XCB_H and HAVE_LIBXCB
---
development/cmake/ConfigureChecks.cmake | 2 +-
development/cmake/config.h.cmake | 5 ++++-
src/CMakeLists.txt | 1 -
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake
index 9062372c38..ed9328fdcd 100644
--- a/development/cmake/ConfigureChecks.cmake
+++ b/development/cmake/ConfigureChecks.cmake
@@ -28,7 +28,7 @@ test_big_endian(WORDS_BIGENDIAN)
set(Include_Defines)
foreach(_h_file aspell.h aspell/aspell.h limits.h locale.h
stdlib.h sys/stat.h sys/time.h sys/types.h sys/utime.h
- sys/socket.h unistd.h inttypes.h utime.h string.h argz.h)
+ sys/socket.h unistd.h inttypes.h utime.h string.h argz.h xcb/xcb.h)
string(REGEX REPLACE "[/\\.]" "_" _hf ${_h_file})
string(TOUPPER ${_hf} _HF)
check_include_files(${_h_file} HAVE_${_HF})
diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake
index 15bceaac46..856f9a8acc 100644
--- a/development/cmake/config.h.cmake
+++ b/development/cmake/config.h.cmake
@@ -91,10 +91,13 @@ ${Include_used_spellchecker}
// Define to 1 if enchant is version 2.x at least
#cmakedefine HAVE_ENCHANT2 1
-#endif // config.h guard
+// Define to 1 if have xcb library
+#cmakedefine HAVE_LIBXCB ${HAVE_LIBXCB}
#define MYTHES_H_LOCATION <${MYTHES_DIR}/mythes.hxx>
+#endif // config.h guard
+
// Unguarded cleanup of global namespace:
#ifdef ColorMode
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4debde6c16..b89ecee2f6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -148,7 +148,6 @@ if(QT_USES_X11)
find_package(X11 REQUIRED)
target_link_libraries(${_lyx} ${X11_X11_LIB}) # we need it because we use XSendEvent
if(HAVE_QT5_X11_EXTRAS)
- find_library(XCB_LIBRARY NAMES xcb)
if (XCB_LIBRARY MATCHES "NOTFOUND")
message(FATAL_ERROR "Need xcb library to use with QT5_X11_EXTRAS")
endif()
More information about the lyx-cvs
mailing list