aboutsummaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-10-26 16:32:13 +0800
committercrupest <crupest@outlook.com>2021-10-26 16:32:13 +0800
commit9dec93315173999c4fb9ab5a0e57909eb5e7fd8b (patch)
tree042fff007fc3d0959146f131f425b9626448718e /demos
parent397843cda9e4161d3e92d8797f8012f478ce64f0 (diff)
downloadcru-9dec93315173999c4fb9ab5a0e57909eb5e7fd8b.tar.gz
cru-9dec93315173999c4fb9ab5a0e57909eb5e7fd8b.tar.bz2
cru-9dec93315173999c4fb9ab5a0e57909eb5e7fd8b.zip
...
Diffstat (limited to 'demos')
-rw-r--r--demos/CMakeLists.txt3
-rw-r--r--demos/input_method/CMakeLists.txt4
-rw-r--r--demos/main/CMakeLists.txt12
-rw-r--r--demos/main/main.cpp6
-rw-r--r--demos/scroll_view/CMakeLists.txt12
-rw-r--r--demos/scroll_view/main.cpp2
6 files changed, 29 insertions, 10 deletions
diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
index 1a86c69f..3edabd0a 100644
--- a/demos/CMakeLists.txt
+++ b/demos/CMakeLists.txt
@@ -8,6 +8,9 @@ if(WIN32) # Currently only enable tests on Windows.
add_subdirectory(input_method)
elseif(APPLE)
+ add_subdirectory(main)
+ add_subdirectory(scroll_view)
+
add_subdirectory(input_method)
elseif(UNIX)
add_subdirectory(xcb)
diff --git a/demos/input_method/CMakeLists.txt b/demos/input_method/CMakeLists.txt
index 4c94bcbd..7f8be37a 100644
--- a/demos/input_method/CMakeLists.txt
+++ b/demos/input_method/CMakeLists.txt
@@ -5,8 +5,8 @@ else()
add_executable(demo_input_method MACOSX_BUNDLE main.cpp)
set_target_properties(demo_input_method PROPERTIES
BUNDLE TRUE
- MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.cru.demo_input_method
- MACOSX_BUNDLE_BUNDLE_NAME demo_input_method
+ MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.cru.demo-input-method
+ MACOSX_BUNDLE_BUNDLE_NAME demo-input-method
)
endif()
diff --git a/demos/main/CMakeLists.txt b/demos/main/CMakeLists.txt
index 9974671d..2f8ef9cb 100644
--- a/demos/main/CMakeLists.txt
+++ b/demos/main/CMakeLists.txt
@@ -1,2 +1,12 @@
-add_executable(demo_main main.cpp)
+if(NOT APPLE)
+ add_executable(demo_main main.cpp)
+else()
+ add_executable(demo_main MACOSX_BUNDLE main.cpp)
+ set_target_properties(demo_main PROPERTIES
+ BUNDLE TRUE
+ MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.cru.demo-main
+ MACOSX_BUNDLE_BUNDLE_NAME demo-main
+ )
+endif()
+
target_link_libraries(demo_main PRIVATE cru_demo_base cru_ui)
diff --git a/demos/main/main.cpp b/demos/main/main.cpp
index af2625a9..9a28ade8 100644
--- a/demos/main/main.cpp
+++ b/demos/main/main.cpp
@@ -18,11 +18,7 @@ using cru::ui::controls::TextBox;
using cru::ui::controls::Window;
int main() {
-#ifdef CRU_DEBUG
- cru::platform::SetupHeapDebug();
-#endif
-
- IUiApplication* application = cru::platform::boostrap::CreateUiApplication();
+ IUiApplication* application = cru::platform::bootstrap::CreateUiApplication();
const auto window = Window::Create();
diff --git a/demos/scroll_view/CMakeLists.txt b/demos/scroll_view/CMakeLists.txt
index e9efe7d2..b84bcea2 100644
--- a/demos/scroll_view/CMakeLists.txt
+++ b/demos/scroll_view/CMakeLists.txt
@@ -1,2 +1,12 @@
-add_executable(demo_scroll_view main.cpp)
+if(NOT APPLE)
+ add_executable(demo_scroll_view main.cpp)
+else()
+ add_executable(demo_scroll_view MACOSX_BUNDLE main.cpp)
+ set_target_properties(demo_scroll_view PROPERTIES
+ BUNDLE TRUE
+ MACOSX_BUNDLE_GUI_IDENTIFIER life.crupest.cru.demo-scroll-view
+ MACOSX_BUNDLE_BUNDLE_NAME demo-scroll-view
+ )
+endif()
+
target_link_libraries(demo_scroll_view PRIVATE cru_demo_base cru_ui)
diff --git a/demos/scroll_view/main.cpp b/demos/scroll_view/main.cpp
index 2d65f68f..be8bd228 100644
--- a/demos/scroll_view/main.cpp
+++ b/demos/scroll_view/main.cpp
@@ -10,7 +10,7 @@ using cru::ui::controls::TextBlock;
using cru::ui::controls::Window;
int main() {
- IUiApplication* application = cru::platform::boostrap::CreateUiApplication();
+ IUiApplication* application = cru::platform::bootstrap::CreateUiApplication();
auto window = Window::Create();