2024-12-25 10:58:58 +00:00
|
|
|
cmake_minimum_required(VERSION 3.21)
|
2024-12-07 09:13:17 +00:00
|
|
|
|
|
|
|
project(aswm)
|
|
|
|
|
2024-12-25 10:58:58 +00:00
|
|
|
set(CMAKE_C_STANDARD 23)
|
|
|
|
|
2024-12-07 09:13:17 +00:00
|
|
|
find_package(X11 REQUIRED)
|
|
|
|
|
2024-12-29 12:51:11 +00:00
|
|
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -pg")
|
2024-12-15 13:45:02 +00:00
|
|
|
|
2025-01-18 09:20:49 +00:00
|
|
|
add_library(libaswm
|
2024-12-15 14:24:29 +00:00
|
|
|
src/aswm/aswm.c
|
2024-12-25 10:58:58 +00:00
|
|
|
src/aswm/mapper/mapper.c
|
2024-12-15 14:09:18 +00:00
|
|
|
src/aswm/event_handlers/create.c
|
|
|
|
src/aswm/event_handlers/configure.c
|
|
|
|
src/aswm/event_handlers/reparent.c
|
|
|
|
src/aswm/event_handlers/destroy.c
|
2024-12-28 10:11:16 +00:00
|
|
|
src/aswm/event_handlers/map.c
|
2024-12-29 12:51:11 +00:00
|
|
|
src/aswm/event_handlers/unmap.c
|
2025-01-01 17:20:38 +00:00
|
|
|
src/aswm/event_handlers/property.c
|
2025-01-13 18:01:41 +00:00
|
|
|
src/aswm/event_handlers/message.c
|
2024-12-29 12:51:11 +00:00
|
|
|
src/aswm/log/log.c
|
|
|
|
)
|
2025-01-18 09:20:49 +00:00
|
|
|
target_include_directories(libaswm PUBLIC ${X11_INCLUDE_DIR} src)
|
|
|
|
target_link_libraries(libaswm ${X11_LIBRARIES})
|
|
|
|
|
|
|
|
add_executable(aswm src/aswm/main.c)
|
|
|
|
target_link_libraries(aswm libaswm)
|
|
|
|
|
|
|
|
include(FetchContent)
|
|
|
|
|
|
|
|
FetchContent_Declare(
|
|
|
|
unity
|
|
|
|
GIT_REPOSITORY https://github.com/ThrowTheSwitch/Unity.git
|
|
|
|
GIT_TAG v2.6.1
|
|
|
|
)
|
|
|
|
|
|
|
|
FetchContent_MakeAvailable(unity)
|
|
|
|
|
|
|
|
add_executable(test_aswm test/test_aswm.c)
|
|
|
|
target_include_directories(test_aswm PUBLIC unity)
|
|
|
|
target_link_libraries(test_aswm libaswm unity)
|
|
|
|
|
|
|
|
enable_testing()
|
|
|
|
add_test(aswm test_aswm)
|