Added hashtable

This commit is contained in:
2024-11-02 18:37:10 +01:00
parent ac136d4ffb
commit 2a436f1ea5
4 changed files with 303 additions and 110 deletions
+19 -3
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0 )
cmake_minimum_required(VERSION 3.10 )
set(CMAKE_C_STANDARD 11)
project(wlgol
VERSION 0.0.1
@@ -22,7 +22,6 @@ add_custom_command(
)
set(SOURCES
wlgol.c
tkeyboard.c
tpointer.c
hashtable.c
@@ -33,7 +32,7 @@ set(GENHEADERS
${CMAKE_CURRENT_BINARY_DIR}/include/xdg-shell.h
)
add_executable(wlgol ${SOURCES} ${GENHEADERS})
add_executable(wlgol wlgol.c ${SOURCES} ${GENHEADERS})
target_include_directories(wlgol
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include
@@ -44,3 +43,20 @@ target_link_libraries(wlgol
wayland-client
wayland-cursor
)
add_executable(test_hashtable tests/test_hashtable.c
${SOURCES}
)
target_link_libraries(test_hashtable
wayland-client
wayland-cursor
)
target_include_directories(test_hashtable
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
)
enable_testing()
add_test(NAME Hashtable COMMAND test_hashtable)