include(CheckLibraryExists)
include(CheckSymbolExists)
-pkg_check_modules(BASELIBS libconfig)
+pkg_check_modules(LIBCONFIG libconfig)
+pkg_check_modules(LIBPROTOBUF libprotobuf-c)
+
+if(DEFINED SSL)
+ pkg_check_modules(SSLIMP REQUIRED ${SSL})
+else()
+ pkg_check_modules(SSLIMP REQUIRED polarssl)
+endif()
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
endif()
endif()
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
-
set(SOURCE "")
add_subdirectory(src)
include_directories(include)
+add_definitions(${LIBCONFIG_CFLAGS} ${LIBPROTOBUF_CFLAGS} ${SSLIMP_CFLAGS})
+#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCONFIG_CFLAGS} ${LIBPROTOBUF_CFLAGS}")
+
add_executable(umurmurd ${SOURCE})
-target_link_libraries(umurmurd pthread)
+target_link_libraries(umurmurd ${LIBCONFIG_LIBRARIES} ${LIBPROTOBUF_LIBRARIES} ${SSLIMP_LIBRARIES})