projects
/
umurmur.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed cmake again...
[umurmur.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index e8c532ca5b166eca8e7b649f99f9d91b9c04070c..4886e40d93d2fa0100b0394f35d454d6a59e6613 100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-9,15
+9,16
@@
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckSymbolExists)
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)
else()
pkg_check_modules(SSLIMP REQUIRED polarssl)
+ set(USE_POLARSSL ON)
endif()
endif()
+pkg_check_modules(LIBCONFIG libconfig)
+pkg_check_modules(LIBPROTOBUF libprotobuf-c)
+
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
if(NOT HAVE_CLOCK_GETTIME)
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
if(NOT HAVE_CLOCK_GETTIME)
@@
-33,12
+34,13
@@
if(NOT HAVE_CLOCK_GETTIME)
endif()
set(SOURCE "")
endif()
set(SOURCE "")
-
add_subdirectory(src)
include_directories(include)
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_executable(umurmurd ${SOURCE})
+
+
+add_definitions(${LIBCONFIG_CFLAGS} ${LIBPROTOBUF_CFLAGS} ${SSLIMP_CFLAGS})
target_link_libraries(umurmurd ${LIBCONFIG_LIBRARIES} ${LIBPROTOBUF_LIBRARIES} ${SSLIMP_LIBRARIES})
target_link_libraries(umurmurd ${LIBCONFIG_LIBRARIES} ${LIBPROTOBUF_LIBRARIES} ${SSLIMP_LIBRARIES})
+
+configure_file(src/config.h.in ${CMAKE_SOURCE_DIR}/src/config.h)