-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (38 loc) · 1.07 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required (VERSION 3.5)
project (sian VERSION 1.0.0 LANGUAGES CXX)
find_package(PkgConfig REQUIRED)
pkg_check_modules(CAIRO_PKG REQUIRED IMPORTED_TARGET cairo)
set(files
src/animation/animated_value.cc
src/animation/payload_type.cc
src/animator.cc
src/color.cc
src/config.cc
src/logger.cc
src/objects/circle.cc
src/objects/horizontal_layout.cc
src/objects/line.cc
src/objects/object.cc
src/objects/rectangle.cc
src/objects/rectangle_container.cc
src/objects/shape.cc
src/offset.cc
src/pace_value.cc
src/scene.cc)
add_library(sian STATIC
${files})
target_include_directories(sian
PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_link_libraries(sian PUBLIC
PkgConfig::CAIRO_PKG)
add_executable(sample
src/main.cc)
target_link_libraries(sample PUBLIC sian)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
endif()