aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--CMakeLists.txt4
-rw-r--r--demo/CMakeLists.txt7
-rw-r--r--demo/src/main.cpp18
4 files changed, 30 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 42afabf..fb370db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-/build \ No newline at end of file
+/build
+/leaks.log \ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c0aaec..0d7246c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@ target_include_directories("adwaitamm" PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
)
-target_include_directories("adwaitamm" PUBLIC SYSTEM
+target_include_directories("adwaitamm" SYSTEM PUBLIC
"$<INSTALL_INTERFACE:include>"
)
@@ -67,3 +67,5 @@ install(TARGETS "adwaitamm"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
+
+add_subdirectory("demo") \ No newline at end of file
diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt
new file mode 100644
index 0000000..ce0f2d6
--- /dev/null
+++ b/demo/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_executable("demo"
+ "src/main.cpp"
+)
+
+target_link_libraries("demo" PRIVATE
+ "adwaitamm::adwaitamm"
+) \ No newline at end of file
diff --git a/demo/src/main.cpp b/demo/src/main.cpp
new file mode 100644
index 0000000..bb8a991
--- /dev/null
+++ b/demo/src/main.cpp
@@ -0,0 +1,18 @@
+#include <gtkmm/application.h>
+
+#include <adwaitamm/application.hpp>
+#include <adwaitamm/applicationwindow.hpp>
+
+auto main(int argc, char ** argv) -> int
+{
+ auto app = Adwaita::Application::create("ch.arknet.libadwaitamm.demo", Gtk::Application::Flags::NON_UNIQUE);
+
+ app->signal_startup().connect([app] {
+ auto window = new Adwaita::ApplicationWindow{*app};
+ window->present();
+
+ app->signal_shutdown().connect([window] { delete window; });
+ });
+
+ return app->run(argc, argv);
+} \ No newline at end of file