summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTimo Dritschler <timo.dritschler@kit.edu>2014-08-15 12:53:42 +0200
committerTimo Dritschler <timo.dritschler@kit.edu>2014-08-15 18:28:46 +0200
commit318c12699514f8187ab212a4db8492984f05348b (patch)
tree82953d9a365e7f071576b504eaed138b42862d2c /test
parentf161b80fb93af73713516267787b1ef41fca68f4 (diff)
downloadkiro-318c12699514f8187ab212a4db8492984f05348b.tar.gz
kiro-318c12699514f8187ab212a4db8492984f05348b.tar.bz2
kiro-318c12699514f8187ab212a4db8492984f05348b.tar.xz
kiro-318c12699514f8187ab212a4db8492984f05348b.zip
Changed CMake build to exclude test binaries if SDL library is not installed
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 849d0b3..aee6c45 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,8 +1,15 @@
include_directories(${KIRO_SOURCE_DIR}/src)
link_directories(${KIRO_BINARY_DIR}/src)
-add_executable(client test-client.c)
-target_link_libraries(client kiro SDL m gobject-2.0 glib-2.0)
+find_package(PkgConfig)
+pkg_check_modules(SDL sdl>=1.2.15)
+
+if (SDL_FOUND)
+ add_executable(client test-client.c)
+ target_link_libraries(client kiro SDL m gobject-2.0 glib-2.0)
+else ()
+ message("SDL not found: Won't build KIRO test-client binary.")
+endif ()
add_executable(server test-server.c)
target_link_libraries(server kiro gobject-2.0 glib-2.0)