🔊 zlog set up
This commit is contained in:
parent
0e7a1f5623
commit
fc736642b2
21 changed files with 302 additions and 157 deletions
|
|
@ -8,6 +8,28 @@ find_package(X11 REQUIRED)
|
|||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fsanitize=address -pg")
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
unity
|
||||
GIT_REPOSITORY https://github.com/ThrowTheSwitch/Unity.git
|
||||
GIT_TAG v2.6.1
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
zlog
|
||||
GIT_REPOSITORY https://github.com/HardySimpson/zlog.git
|
||||
GIT_TAG 1.2.18
|
||||
)
|
||||
|
||||
FetchContent_Declare(
|
||||
argparse
|
||||
GIT_REPOSITORY https://github.com/cofyc/argparse.git
|
||||
GIT_TAG 682d4520b4bc2b646cdfcf078b2fed00b3d2da30
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(unity zlog argparse)
|
||||
|
||||
add_library(libaswm
|
||||
src/aswm/aswm.c
|
||||
src/aswm/mapper/mapper.c
|
||||
|
|
@ -21,27 +43,20 @@ add_library(libaswm
|
|||
src/aswm/event_handlers/message.c
|
||||
src/aswm/log/log.c
|
||||
)
|
||||
target_include_directories(libaswm PUBLIC ${X11_INCLUDE_DIR} src)
|
||||
target_link_libraries(libaswm ${X11_LIBRARIES})
|
||||
target_include_directories(libaswm PUBLIC ${X11_INCLUDE_DIR} src
|
||||
${zlog_SOURCE_DIR}/src)
|
||||
target_link_libraries(libaswm ${X11_LIBRARIES} zlog)
|
||||
|
||||
add_executable(aswm src/aswm/main.c)
|
||||
add_executable(aswm src/aswm/main.c ${argparse_SOURCE_DIR}/argparse.c)
|
||||
target_include_directories(aswm PUBLIC ${argparse_SOURCE_DIR})
|
||||
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_compile_definitions(ASWM_TEST_DIR="${CMAKE_CURRENT_SOURCE_DIR}/test/")
|
||||
add_executable(test_aswm
|
||||
test/test_set_up.c
|
||||
test/aswm/test_aswm.c
|
||||
)
|
||||
target_include_directories(test_aswm PUBLIC unity)
|
||||
target_include_directories(test_aswm PUBLIC ${unity_SOURCE_DIR}/src)
|
||||
target_link_libraries(test_aswm libaswm unity)
|
||||
|
||||
enable_testing()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue