diff options
author | crupest <crupest@outlook.com> | 2021-09-18 16:13:40 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-09-18 16:13:40 +0800 |
commit | 9a42f6fd709feaa9e9e3cc4530c67e2a237d5bee (patch) | |
tree | b063fadfa6197947b975195f967898ee9b926f2d /src | |
parent | e5b3502b03bdbdbecbd2e8b328e0f874499b452b (diff) | |
download | cru-9a42f6fd709feaa9e9e3cc4530c67e2a237d5bee.tar.gz cru-9a42f6fd709feaa9e9e3cc4530c67e2a237d5bee.tar.bz2 cru-9a42f6fd709feaa9e9e3cc4530c67e2a237d5bee.zip |
...
Diffstat (limited to 'src')
-rw-r--r-- | src/osx/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/osx/graphics/quartz/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/osx/gui/CMakeLists.txt | 15 | ||||
-rw-r--r-- | src/osx/gui/Resource.cpp | 6 | ||||
-rw-r--r-- | src/osx/gui/UiApplication.cpp | 0 | ||||
-rw-r--r-- | src/osx/gui/Window.cpp | 0 |
6 files changed, 27 insertions, 2 deletions
diff --git a/src/osx/CMakeLists.txt b/src/osx/CMakeLists.txt index 0957050a..cb6c2b1a 100644 --- a/src/osx/CMakeLists.txt +++ b/src/osx/CMakeLists.txt @@ -13,3 +13,4 @@ target_sources(cru_osx_base PUBLIC target_link_libraries(cru_osx_base PUBLIC cru_platform_base) add_subdirectory(graphics) +add_subdirectory(gui) diff --git a/src/osx/graphics/quartz/CMakeLists.txt b/src/osx/graphics/quartz/CMakeLists.txt index 868a3ee2..bd75f30b 100644 --- a/src/osx/graphics/quartz/CMakeLists.txt +++ b/src/osx/graphics/quartz/CMakeLists.txt @@ -20,6 +20,9 @@ target_sources(cru_osx_graphics_quartz PUBLIC ${CRU_OSX_GRAPHICS_NATIVE_INCLUDE_DIR}/Resource.hpp ${CRU_OSX_GRAPHICS_NATIVE_INCLUDE_DIR}/TextLayout.hpp ) -target_link_libraries(cru_osx_graphics_quartz PUBLIC quartz) -target_link_libraries(cru_osx_graphics_quartz PUBLIC cru_osx_base cru_platform_graphics) +find_library(CORE_GRAPHICS CoreGraphics REQUIRED) +find_library(CORE_TEXT CoreText REQUIRED) + +target_link_libraries(cru_osx_graphics_quartz PUBLIC ${CORE_GRAPHICS} ${CORE_TEXT}) +target_link_libraries(cru_osx_graphics_quartz PUBLIC cru_osx_base cru_platform_graphics) diff --git a/src/osx/gui/CMakeLists.txt b/src/osx/gui/CMakeLists.txt new file mode 100644 index 00000000..26191655 --- /dev/null +++ b/src/osx/gui/CMakeLists.txt @@ -0,0 +1,15 @@ +set(CRU_OSX_GUI_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/osx/gui) + +add_library(cru_osx_gui SHARED + Resource.cpp + UiApplication.cpp + Window.cpp +) + +target_sources(cru_osx_gui PUBLIC + ${CRU_OSX_GUI_INCLUDE_DIR}/Resource.hpp + ${CRU_OSX_GUI_INCLUDE_DIR}/UiApplication.hpp + ${CRU_OSX_GUI_INCLUDE_DIR}/Window.hpp +) + +target_link_libraries(cru_osx_gui PUBLIC cru_platform_gui cru_osx_graphics_quartz) diff --git a/src/osx/gui/Resource.cpp b/src/osx/gui/Resource.cpp new file mode 100644 index 00000000..3e9782e2 --- /dev/null +++ b/src/osx/gui/Resource.cpp @@ -0,0 +1,6 @@ +#include "cru/osx/gui/Resource.hpp" + +namespace cru::platform::gui::osx { +OsxGuiResource::OsxGuiResource(IUiApplication* ui_application) + : ui_application_(ui_application) {} +} // namespace cru::platform::gui::osx diff --git a/src/osx/gui/UiApplication.cpp b/src/osx/gui/UiApplication.cpp new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src/osx/gui/UiApplication.cpp diff --git a/src/osx/gui/Window.cpp b/src/osx/gui/Window.cpp new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src/osx/gui/Window.cpp |