feat: Initial usage of xkb.

This commit is contained in:
2026-06-13 10:22:08 +02:00
parent 32ff1b18c0
commit ca89ada4b1
5 changed files with 121 additions and 8 deletions
+14
View File
@@ -5,6 +5,9 @@ project(wlgol
DESCRIPTION "Wayland Game Of Life"
LANGUAGES C)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XKBCOMMON REQUIRED xkbcommon)
# Download xdg-shell.xml
# file(DOWNLOAD "https://cgit.freedesktop.org/wayland/wayland-protocols/plain/stable/xdg-shell/xdg-shell.xml" "${CMAKE_CURRENT_BINARY_DIR}/xdg-shell.xml")
@@ -37,11 +40,17 @@ add_executable(wlgol wlgol.c ${SOURCES} ${GENHEADERS})
target_include_directories(wlgol
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
PUBLIC ${XKBCOMMON_INCLUDE_DIRS}
)
target_link_libraries(wlgol
wayland-client
wayland-cursor
${XKBCOMMON_LIBRARIES}
)
target_compile_options(wlgol PRIVATE
${XKBCOMMON_CFLAGS_OTHER}
)
@@ -52,10 +61,15 @@ add_executable(test_hashtable tests/test_hashtable.c
target_link_libraries(test_hashtable
wayland-client
wayland-cursor
${XKBCOMMON_LIBRARIES}
)
target_include_directories(test_hashtable
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
PUBLIC ${XKBCOMMON_INCLUDE_DIRS}
)
target_compile_options(test_hashtable PRIVATE
${XKBCOMMON_CFLAGS_OTHER}
)
enable_testing()