summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--test/CMakeLists.txt11
2 files changed, 10 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 395767b..3fe62a0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,7 +3,7 @@ set_target_properties(kiro PROPERTIES
VERSION "${LIBKIRO_VERSION_MAJOR}.${LIBKIRO_VERSION_MINOR}"
SOVERSION ${LIBKIRO_VERSION_PATCH}
)
-target_link_libraries(kiro SDL m rdmacm ibverbs pthread)
+target_link_libraries(kiro m rdmacm ibverbs pthread)
install(FILES kiro-rdma.h kiro-trb.h kiro-client.h kiro-server.h DESTINATION ${HEADER_INSTALL_DIR})
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)