summaryrefslogtreecommitdiffstats
path: root/Tests/FindGTK2/glib
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-08-06 09:33:59 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 14:47:06 (GMT)
commit7efef02df29399d37b692e01fb69de63e558585b (patch)
tree5faedaafc63060018e252aa8c5f876a3ad9fca7b /Tests/FindGTK2/glib
parent95fc47aa49515d45afcfb609262bd85025fb4a3d (diff)
downloadCMake-7efef02df29399d37b692e01fb69de63e558585b.zip
CMake-7efef02df29399d37b692e01fb69de63e558585b.tar.gz
CMake-7efef02df29399d37b692e01fb69de63e558585b.tar.bz2
FindGTK2: Add tests for components and targets in gtk and gtkmm modules
Diffstat (limited to 'Tests/FindGTK2/glib')
-rw-r--r--Tests/FindGTK2/glib/CMakeLists.txt10
-rw-r--r--Tests/FindGTK2/glib/main.c11
2 files changed, 21 insertions, 0 deletions
diff --git a/Tests/FindGTK2/glib/CMakeLists.txt b/Tests/FindGTK2/glib/CMakeLists.txt
new file mode 100644
index 0000000..1aa73ff
--- /dev/null
+++ b/Tests/FindGTK2/glib/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 2.8)
+
+project(glib C)
+
+find_package(GTK2 COMPONENTS gtk REQUIRED)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+add_executable(glib WIN32 main.c)
+target_link_libraries(glib GTK2::glib)
diff --git a/Tests/FindGTK2/glib/main.c b/Tests/FindGTK2/glib/main.c
new file mode 100644
index 0000000..80d0554
--- /dev/null
+++ b/Tests/FindGTK2/glib/main.c
@@ -0,0 +1,11 @@
+#include <glib.h>
+
+int main(int argc, char *argv[])
+{
+ if (!g_file_test("file", G_FILE_TEST_EXISTS)) {
+ g_print("File not found. \n");
+ } else {
+ g_print("File found. \n");
+ }
+ return 0;
+}