aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt48
1 files changed, 46 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b2209bb3..fc5dd99e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,9 +1,53 @@
-add_subdirectory(ui)
+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}/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_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_executable(demo main.cpp)
+add_subdirectory(ui)
+add_executable(demo main.cpp)
target_link_libraries(demo PRIVATE cru_ui)