diff --git a/CMakeLists.txt b/CMakeLists.txt index b71ad3f..fbb5c8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ PROJECT ( example ) cmake_minimum_required( VERSION 3.16 ) FIND_PACKAGE ( PkgConfig REQUIRED ) -PKG_CHECK_MODULES( GTK REQUIRED gtkmm-4.0) +PKG_CHECK_MODULES( GTK REQUIRED gtkmm-3.0) INCLUDE_DIRECTORIES ( ${GTK_INCLUDE_DIRS} ) diff --git a/install.sh b/install.sh index fe5e33b..d5bb961 100644 --- a/install.sh +++ b/install.sh @@ -34,6 +34,7 @@ if [ ! -d cairomm ]; then git clone https://github.com/freedesktop/cairomm.git fi cd cairomm +cp README.md README ./autogen.sh --prefix=/usr make -j`nproc --ignore=2` sudo make install diff --git a/main.cpp b/main.cpp index 13b5c1d..12c36f9 100644 --- a/main.cpp +++ b/main.cpp @@ -1,16 +1,10 @@ #include -class GTKExample : public Gtk::Window { -public: - GTKExample(); -}; +using namespace Glib; +using namespace Gtk; -GTKExample::GTKExample(){ - set_title("GTK Example"); - set_default_size(800, 450); -} - -int main(int argc, char ** argv){ - auto app = Gtk::Application::create("com.example.gtk"); - return app->make_window_and_run(argc, argv); +int main(int argc, char* argv[]) { + auto application = Application::create(argc, argv); + Window window; + return application->run(window); } \ No newline at end of file