gtk examples added
This commit is contained in:
parent
0b091914f7
commit
4c740cf048
|
@ -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})
|
|
@ -0,0 +1,7 @@
|
|||
#include <gtk/gtk.h>
|
||||
|
||||
int main (char argc, char **argv)
|
||||
{
|
||||
g_print ("Hello world!\n");
|
||||
return 0;
|
||||
}
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue