From 73f13dd60f51ff05e31a64fba89fe31ab3ab185d Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 15 Sep 2019 00:03:11 +0800 Subject: ... --- src/platform/CMakeLists.txt | 14 ++++++++++++++ src/platform/graph/CMakeLists.txt | 12 ++++++++++++ src/platform/native/CMakeLists.txt | 12 ++++++++++++ src/platform/native/cursor.cpp | 10 ++++++++++ 4 files changed, 48 insertions(+) create mode 100644 src/platform/CMakeLists.txt create mode 100644 src/platform/graph/CMakeLists.txt create mode 100644 src/platform/native/CMakeLists.txt create mode 100644 src/platform/native/cursor.cpp (limited to 'src/platform') diff --git a/src/platform/CMakeLists.txt b/src/platform/CMakeLists.txt new file mode 100644 index 00000000..c9eef482 --- /dev/null +++ b/src/platform/CMakeLists.txt @@ -0,0 +1,14 @@ +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}/exception.hpp + ${CRU_PLATFORM_BASE_INCLUDE_DIR}/graphic_base.hpp + ${CRU_PLATFORM_BASE_INCLUDE_DIR}/heap_debug.hpp + ${CRU_PLATFORM_BASE_INCLUDE_DIR}/matrix.hpp + ${CRU_PLATFORM_BASE_INCLUDE_DIR}/native_resource.hpp + ${CRU_PLATFORM_BASE_INCLUDE_DIR}/string_util.hpp +) +target_link_libraries(cru_platform_base INTERFACE cru_base) + +add_subdirectory(graph) +add_subdirectory(native) diff --git a/src/platform/graph/CMakeLists.txt b/src/platform/graph/CMakeLists.txt new file mode 100644 index 00000000..da76d296 --- /dev/null +++ b/src/platform/graph/CMakeLists.txt @@ -0,0 +1,12 @@ +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) diff --git a/src/platform/native/CMakeLists.txt b/src/platform/native/CMakeLists.txt new file mode 100644 index 00000000..0e44fd55 --- /dev/null +++ b/src/platform/native/CMakeLists.txt @@ -0,0 +1,12 @@ +set(CRU_PLATFORM_NATIVE_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform/native) +add_library(cru_platform_native STATIC + cursor.cpp +) +target_sources(cru_platform_native PUBLIC + ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/basic_types.hpp + ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/cursor.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 PUBLIC cru_platform_graph) diff --git a/src/platform/native/cursor.cpp b/src/platform/native/cursor.cpp new file mode 100644 index 00000000..b12aec40 --- /dev/null +++ b/src/platform/native/cursor.cpp @@ -0,0 +1,10 @@ +#include "cru/platform/native/cursor.hpp" + +#include "cru/platform/native/ui_application.hpp" + +namespace cru::platform::native { +std::shared_ptr GetSystemCursor(SystemCursor type) { + return UiApplication::GetInstance()->GetCursorManager()->GetSystemCursor( + type); +} +} // namespace cru::platform::native -- cgit v1.2.3