X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=CMakeLists.txt;h=ea4de25c48c35caba8901d78f494064749dfd16a;hb=4667085601b0483cb35fa8cc80e2b19d91831bb2;hp=e8c532ca5b166eca8e7b649f99f9d91b9c04070c;hpb=28c8149a34cf16d7ac7fb1e7b07914200034a8d5;p=umurmur.git diff --git a/CMakeLists.txt b/CMakeLists.txt index e8c532c..ea4de25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,15 +9,19 @@ include(CheckFunctionExists) include(CheckLibraryExists) include(CheckSymbolExists) -pkg_check_modules(LIBCONFIG libconfig) -pkg_check_modules(LIBPROTOBUF libprotobuf-c) - -if(DEFINED SSL) - pkg_check_modules(SSLIMP REQUIRED ${SSL}) +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) + +set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBCONFIG_LIDIR}) +set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${LIBPROTOBUF_LIDIR}) + check_function_exists(clock_gettime HAVE_CLOCK_GETTIME) if(NOT HAVE_CLOCK_GETTIME) @@ -33,12 +37,13 @@ if(NOT HAVE_CLOCK_GETTIME) endif() 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}) + + +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)