${CMAKE_CURRENT_SOURCE_DIR}/pds.c
${CMAKE_CURRENT_SOURCE_DIR}/server.c
${CMAKE_CURRENT_SOURCE_DIR}/timer.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/util.c
${CMAKE_CURRENT_SOURCE_DIR}/voicetarget.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/memory.c
)
if(SSL MATCHES "openssl")
list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_openssl.c)
elseif(SSL MATCHES "polarssl")
list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_polarssl.c)
+elseif(SSL MATCHES "mbedtls")
+ list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_mbedtls.c)
elseif(SSL MATCHES "gnutls")
list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/ssli_gnutls.c)
endif(SSL MATCHES "openssl")
-set(SOURCE ${SOURCE} ${SOURCE_FILES} PARENT_SCOPE)
+if(USE_SHAREDMEMORY_API)
+ list(APPEND SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/sharedmemory.c)
+endif(USE_SHAREDMEMORY_API)
+configure_file(config.h.in ${CMAKE_SOURCE_DIR}/src/config.h)
+
+include_directories(${LIBCONFIG_INCLUDE_DIR}
+ ${PROTOBUFC_INCLUDE_DIR}
+ ${SSLIMP_INCLUDE_DIR})
+
+link_directories(${LIBCONFIG_LIB_DIR}
+ ${PROTOBUFC_LIB_DIR}
+ ${SSLIMP_LIB_DIR})
+
+add_executable(${PROJECT_NAME} ${SOURCE_FILES})
+
+target_link_libraries(${PROJECT_NAME}
+ ${LIBCONFIG_LIBRARIES}
+ ${PROTOBUFC_LIBRARIES}
+ ${SSLIMP_LIBRARIES}
+ ${LIBRT}
+ ${CRYPTO_LIBRARIES})
+
+install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION "bin")