2025-09-10 19:51:34 -04:00
|
|
|
option(ENABLE_LIB_xcbXorg "Enable XCB/Xorg Connection Manager backend lib" ON)
|
2025-07-22 02:46:16 -04:00
|
|
|
|
2025-07-22 04:45:23 -04:00
|
|
|
if(ENABLE_LIB_xcbXorg)
|
|
|
|
|
pkg_check_modules(XCB REQUIRED xcb)
|
|
|
|
|
if(NOT XCB_FOUND)
|
|
|
|
|
message(FATAL_ERROR "XCB library not found. XCB/Xorg requires the XCB dev headers and shlib.")
|
|
|
|
|
endif()
|
2025-07-22 02:46:16 -04:00
|
|
|
|
2025-07-22 04:45:23 -04:00
|
|
|
add_library(xcbXorg SHARED
|
|
|
|
|
xcbXorg.cpp
|
|
|
|
|
)
|
2025-07-22 02:46:16 -04:00
|
|
|
|
2026-03-06 01:12:46 -04:00
|
|
|
set_target_properties(xcbXorg PROPERTIES
|
|
|
|
|
VERSION ${PROJECT_VERSION}
|
|
|
|
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
|
|
|
|
)
|
|
|
|
|
|
2025-07-22 04:45:23 -04:00
|
|
|
# Set config define for header generation
|
|
|
|
|
add_compile_definitions(CONFIG_LIB_XCBXORG_ENABLED)
|
|
|
|
|
target_include_directories(xcbXorg PUBLIC ${XCB_INCLUDE_DIRS})
|
2026-06-09 19:51:51 -04:00
|
|
|
target_link_libraries(xcbXorg ${XCB_LIBRARIES})
|
2025-07-22 04:45:23 -04:00
|
|
|
|
|
|
|
|
# Install rules
|
2026-03-06 01:12:46 -04:00
|
|
|
install(TARGETS xcbXorg
|
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} NAMELINK_SKIP
|
|
|
|
|
)
|
2025-07-22 04:45:23 -04:00
|
|
|
endif()
|