initial commit: wip

This commit is contained in:
Daniel Eklöf 2018-11-17 11:30:33 +01:00
commit 8bf8a398b9
30 changed files with 2921 additions and 0 deletions

55
CMakeLists.txt Normal file
View file

@ -0,0 +1,55 @@
cmake_minimum_required(VERSION 3.9)
project(foobar C)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
find_package(Threads REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB REQUIRED xcb xcb-randr xcb-render)
pkg_check_modules(CAIRO REQUIRED cairo cairo-xcb)
pkg_check_modules(YAML REQUIRED yaml-0.1)
add_executable(foobar
bar.c bar.h
config.c config.h
font.c font.h
main.c
module.c module.h
particle.c particle.h
tag.c tag.h
xcb.c xcb.h
yml.c yml.h
particles/string.c particles/string.h
particles/list.c particles/list.h
modules/label.c modules/label.h
modules/clock.c modules/clock.h
modules/xwindow.c modules/xwindow.h
)
target_compile_definitions(foobar PRIVATE _GNU_SOURCE)
target_compile_options(foobar PRIVATE
${XCB_CFLAGS_OTHER}
${CAIRO_CFLAGS_OTHER}
${YAML_CFLAGS_OTHER}
)
target_include_directories(foobar PRIVATE
${XCB_INCLUDE_DIRS}
${CAIRO_INCLUDE_DIRS}
${YAML_INCLUDE_DIRS}
)
target_link_libraries(foobar
${CMAKE_THREAD_LIBS_INIT}
${XCB_LIBRARIES}
${CAIRO_LIBRARIES}
${YAML_LIBRARIES}
)