Compare commits

...

2 Commits

Author SHA1 Message Date
Kornel Benko
3bc4554e57 Amend f1fddd86
Add defines for HAVE_XCB_XCB_H and HAVE_LIBXCB to cmake build
2024-08-29 14:13:12 +02:00
Kornel Benko
f1fddd86ef Cmake build: Add defines for HAVE_XCB_XCB_H and HAVE_LIBXCB 2024-08-29 14:08:39 +02:00
4 changed files with 11 additions and 3 deletions

View File

@ -1186,6 +1186,12 @@ get_data_destination(dest_data)
list(APPEND tmp_vi " LyX files dir: ${CMAKE_INSTALL_PREFIX}/${dest_data}") list(APPEND tmp_vi " LyX files dir: ${CMAKE_INSTALL_PREFIX}/${dest_data}")
string(REPLACE ";" "\\n" VERSION_INFO "${tmp_vi}") string(REPLACE ";" "\\n" VERSION_INFO "${tmp_vi}")
find_library(XCB_LIBRARY NAMES xcb)
if (XCB_LIBRARY)
set(HAVE_LIBXCB 1 CACHE BOOL "" FORCE)
else()
set(HAVE_LIBXCB 0 CACHE BOOL "" FORCE)
endif()
configure_file(${LYX_CMAKE_DIR}/config.h.cmake ${TOP_BINARY_DIR}/config.h) configure_file(${LYX_CMAKE_DIR}/config.h.cmake ${TOP_BINARY_DIR}/config.h)
unset(opts) unset(opts)
unset(tmp_vi) unset(tmp_vi)

View File

@ -28,7 +28,7 @@ test_big_endian(WORDS_BIGENDIAN)
set(Include_Defines) set(Include_Defines)
foreach(_h_file aspell.h aspell/aspell.h limits.h locale.h 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 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(REGEX REPLACE "[/\\.]" "_" _hf ${_h_file})
string(TOUPPER ${_hf} _HF) string(TOUPPER ${_hf} _HF)
check_include_files(${_h_file} HAVE_${_HF}) check_include_files(${_h_file} HAVE_${_HF})

View File

@ -91,10 +91,13 @@ ${Include_used_spellchecker}
// Define to 1 if enchant is version 2.x at least // Define to 1 if enchant is version 2.x at least
#cmakedefine HAVE_ENCHANT2 1 #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> #define MYTHES_H_LOCATION <${MYTHES_DIR}/mythes.hxx>
#endif // config.h guard
// Unguarded cleanup of global namespace: // Unguarded cleanup of global namespace:
#ifdef ColorMode #ifdef ColorMode

View File

@ -148,7 +148,6 @@ if(QT_USES_X11)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
target_link_libraries(${_lyx} ${X11_X11_LIB}) # we need it because we use XSendEvent target_link_libraries(${_lyx} ${X11_X11_LIB}) # we need it because we use XSendEvent
if(HAVE_QT5_X11_EXTRAS) if(HAVE_QT5_X11_EXTRAS)
find_library(XCB_LIBRARY NAMES xcb)
if (XCB_LIBRARY MATCHES "NOTFOUND") if (XCB_LIBRARY MATCHES "NOTFOUND")
message(FATAL_ERROR "Need xcb library to use with QT5_X11_EXTRAS") message(FATAL_ERROR "Need xcb library to use with QT5_X11_EXTRAS")
endif() endif()