From 61eee61c517b57fb2c0e81e007d6a3565e1dedf5 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Wed, 8 Jun 2016 18:20:16 +0200 Subject: [PATCH] Added the test program to CMake. --- CMakeLists.txt | 1 + libkonaclient-test/CMakeLists.txt | 13 +++++++++++++ libkonaclient-test/main.c | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 libkonaclient-test/CMakeLists.txt create mode 100644 libkonaclient-test/main.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dcc3c5..a2f41e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,4 +11,5 @@ LINK_DIRECTORIES (${GLIB2_LIBRARY_DIRS} ${GOBJECT2_LIBRARY_DIRS}) add_definitions(${GLIB2_CFLAGS_OTHER} ${GOBJECT2_CFLAGS_OTHER}) add_subdirectory(libkonaclient) +add_subdirectory(libkonaclient-test) add_subdirectory(konaclient-gtk) diff --git a/libkonaclient-test/CMakeLists.txt b/libkonaclient-test/CMakeLists.txt new file mode 100644 index 0000000..193e332 --- /dev/null +++ b/libkonaclient-test/CMakeLists.txt @@ -0,0 +1,13 @@ +aux_source_directory(. SRC_LIST) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(PC_LIBSOUP REQUIRED libsoup-2.4) + +include_directories(${PC_LIBSOUP_INCLUDE_DIRS} ../libkonaclient) +link_directories(${GTK3_LIBRARY_DIRS} ${PC_LIBSOUP_LIBRARY_DIRS} libkonaclient) +add_definitions(${GTK3_CFLAGS_OTHER}) + +add_executable(libkonaclient-test ${SRC_LIST}) + +# Link the target to the GTK+ libraries +target_link_libraries(libkonaclient-test ${PC_LIBSOUP_LIBRARIES} konaclient) diff --git a/libkonaclient-test/main.c b/libkonaclient-test/main.c new file mode 100644 index 0000000..e5ce2d2 --- /dev/null +++ b/libkonaclient-test/main.c @@ -0,0 +1,7 @@ +#include + +int main(int argc, char *argv[]) +{ + printf("Hello world!\n"); + return 0; +}