Added nettle implementation
[umurmur.git] / CMakeLists.txt
index 712535374c9e29ac95d5f4118d0a0a40c57a02bc..d96c4e264f61045c7a05389dfb7cf98714041c02 100644 (file)
@@ -43,6 +43,7 @@ elseif("${SSL}" STREQUAL "polarssl")
 elseif("${SSL}" STREQUAL "gnutls")
   find_package(GnuTLS REQUIRED)
   if(GNUTLS_FOUND)
+    set(USE_GNUTLS ON)
     set(SSLIMP_LIBRARIES ${GNUTLS_LIBRARIES})
     set(SSLIMP_INCLUDE_DIR ${GNUTLS_INCLUDE_DIR})
     set(SSLIMP_LIBRARY_DIR ${GNUTLS_LIB_DIR})
@@ -80,4 +81,10 @@ if(NOT OLD_CONFIG_FILE)
 endif(NOT OLD_CONFIG_FILE)
 
 add_definitions(${SSLIMP_CFLAGS})
-target_link_libraries(umurmurd ${LIBCONFIG_LIBRARIES} ${PROTOBUFC_LIBRARIES} ${SSLIMP_LIBRARIES} ${LIBRT})
+
+if(USE_GNUTLS)
+# FIXME: port AES128-OCB
+  target_link_libraries(umurmurd ${LIBCONFIG_LIBRARIES} ${PROTOBUFC_LIBRARIES} ${SSLIMP_LIBRARIES} ${LIBRT} crypto)
+else()
+  target_link_libraries(umurmurd ${LIBCONFIG_LIBRARIES} ${PROTOBUFC_LIBRARIES} ${SSLIMP_LIBRARIES} ${LIBRT})
+endif(USE_GNUTLS)