aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: 16e0c10ff6a6d04a9a21de713b2e96fe8484d023 (plain)
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
46
47
48
49
50
51
52
53
54
55
set(CRU_BASE_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/common)
add_library(cru_base INTERFACE)
target_sources(cru_base INTERFACE
	${CRU_BASE_INCLUDE_DIR}/auto_delete.hpp
	${CRU_BASE_INCLUDE_DIR}/base.hpp
	${CRU_BASE_INCLUDE_DIR}/endable.hpp
	${CRU_BASE_INCLUDE_DIR}/event.hpp
	${CRU_BASE_INCLUDE_DIR}/format.hpp
	${CRU_BASE_INCLUDE_DIR}/pre_config.hpp
	${CRU_BASE_INCLUDE_DIR}/self_resolvable.hpp
	${CRU_BASE_INCLUDE_DIR}/ui_base.hpp
)
target_include_directories(cru_base INTERFACE ${CRU_INCLUDE_DIR})

set(CRU_PLATFORM_BASE_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform)
add_library(cru_platform_base INTERFACE)
target_sources(cru_platform_base INTERFACE
	${CRU_PLATFORM_BASE_INCLUDE_DIR}/debug.hpp
	${CRU_PLATFORM_BASE_INCLUDE_DIR}/exception.hpp
	${CRU_PLATFORM_BASE_INCLUDE_DIR}/matrix.hpp
	${CRU_PLATFORM_BASE_INCLUDE_DIR}/string_util.hpp
)
target_link_libraries(cru_platform_base INTERFACE cru_base)

set(CRU_PLATFORM_GRAPH_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform/graph)
add_library(cru_platform_graph INTERFACE)
target_sources(cru_platform_graph INTERFACE
	${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/brush.hpp
	${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/font.hpp
	${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/geometry.hpp
	${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/graph_factory.hpp
	${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/painter.hpp
	${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/text_layout.hpp
	${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/util/painter_util.hpp
)
target_link_libraries(cru_platform_graph INTERFACE cru_platform_base)

set(CRU_PLATFORM_NATIVE_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform/native)
add_library(cru_platform_native INTERFACE)
target_sources(cru_platform_native INTERFACE
	${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/basic_types.hpp
	${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/native_event.hpp
	${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/native_window.hpp
	${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/ui_application.hpp
)
target_link_libraries(cru_platform_native INTERFACE cru_platform_graph)

if(WIN32)
add_subdirectory(win)
endif()

add_subdirectory(ui)

add_executable(demo main.cpp)
target_link_libraries(demo PRIVATE cru_ui)