gtk examples added

This commit is contained in:
Kolan Sh 2012-05-28 12:22:50 +04:00
parent 0b091914f7
commit 4c740cf048
3 changed files with 24 additions and 2 deletions

11
c/gtk-test/CMakeLists.txt Normal file
View File

@ -0,0 +1,11 @@
project (gtk-test)
cmake_minimum_required (VERSION 2.4)
find_package (PkgConfig REQUIRED)
pkg_check_modules (GTK2 REQUIRED gtk+-2.0)
include_directories (${GTK2_INCLUDE_DIRS})
link_directories (${GTK2_LIBRARY_DIRS})
add_executable (gtk-test main.c)
add_definitions (${GTK2_CFLAGS_OTHER})
target_link_libraries (gtk-test ${GTK2_LIBRARIES})

7
c/gtk-test/main.c Normal file
View File

@ -0,0 +1,7 @@
#include <gtk/gtk.h>
int main (char argc, char **argv)
{
g_print ("Hello world!\n");
return 0;
}

View File

@ -2,9 +2,13 @@ project (gtkmm_Hello)
cmake_minimum_required (VERSION 2.6)
include (FindGTK2)
# include (FindGTK2) # doesn't work on WIN32 while
find_package (PkgConfig REQUIRED)
pkg_check_modules (GTK2 REQUIRED gtk+-2.0)
include_directories (${GTK2_INCLUDE_DIRS})
include_directories (${GTK2_INCLUDE_DIRS})
link_directories (${GTK2_LIBRARY_DIRS})
add_definitions (${GTK2_CFLAGS_OTHER})
# add the executable
add_executable (gtkmm_Hello gtkmm_Hello.c)