d89ef83551
Properties can now have values of different types, and they are registered with their name, either to a layout class or globally. Layout classes are also registered with their name.
38 lines
807 B
CMake
38 lines
807 B
CMake
cmake_minimum_required(VERSION 3.24)
|
|
project(clay C)
|
|
|
|
set(CMAKE_C_STANDARD 17)
|
|
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
cairo
|
|
GIT_REPOSITORY https://gitlab.freedesktop.org/cairo/cairo.git
|
|
GIT_TAG c3b672634f0635af1ad0ffa8c15b34fc7c1035cf # 1.17.8
|
|
)
|
|
|
|
#FetchContent_MakeAvailable(cairo)
|
|
|
|
|
|
add_library(clay
|
|
src/color.c
|
|
src/context.c
|
|
src/debug.c
|
|
src/document.c
|
|
src/flex.c
|
|
src/layout.c
|
|
src/property.c
|
|
src/render.c
|
|
src/text.c
|
|
)
|
|
|
|
target_include_directories(clay PUBLIC include)
|
|
|
|
target_link_libraries(clay PRIVATE cairo)
|
|
|
|
target_compile_options(clay PRIVATE -Wall -Werror)
|
|
|
|
if (PROJECT_IS_TOP_LEVEL)
|
|
add_executable(clay-demo src/demo.c)
|
|
target_link_libraries(clay-demo PRIVATE clay)
|
|
endif () |