X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=CMakeLists.txt;h=4886e40d93d2fa0100b0394f35d454d6a59e6613;hb=59d006faba0b4f526010c66e9d4b8d3768450a6b;hp=9b2b5baf1cdae3e9c09371517b46d01d907f3ea6;hpb=c671f10c07f59b7e2dfda332c99a3182c32cb689;p=umurmur.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b2b5ba..4886e40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,15 @@ include(CheckFunctionExists) include(CheckLibraryExists) include(CheckSymbolExists) -pkg_check_modules(BASELIBS libconfig) +if(SSL MATCHES "openssl") + pkg_check_modules(SSLIMP REQUIRED openssl) +else() + pkg_check_modules(SSLIMP REQUIRED polarssl) + set(USE_POLARSSL ON) +endif() + +pkg_check_modules(LIBCONFIG libconfig) +pkg_check_modules(LIBPROTOBUF libprotobuf-c) check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) @@ -25,13 +33,14 @@ if(NOT 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_executable(umurmurd ${SOURCE}) -target_link_libraries(umurmurd pthread) + + +add_definitions(${LIBCONFIG_CFLAGS} ${LIBPROTOBUF_CFLAGS} ${SSLIMP_CFLAGS}) +target_link_libraries(umurmurd ${LIBCONFIG_LIBRARIES} ${LIBPROTOBUF_LIBRARIES} ${SSLIMP_LIBRARIES}) + +configure_file(src/config.h.in ${CMAKE_SOURCE_DIR}/src/config.h)