Commit 337cca9e authored by Mickaël Turnel's avatar Mickaël Turnel

Add ENABLE_MDNS option to know when to build bellesip

parent c268f658
......@@ -51,6 +51,7 @@ option(ENABLE_SNMP "Build with SNMP support" NO)
option(ENABLE_SOCI "Build with SOCI support" YES)
option(ENABLE_STATIC "Build static library (default is shared library)." NO)
option(ENABLE_TRANSCODER "Build transcoder support" YES)
option(ENABLE_MDNS "Build multicast DNS support" NO)
cmake_dependent_option(ENABLE_SPECIFIC_FEATURES "Enable mediarelay specific features" OFF "ENABLE_TRANSCODER" OFF)
if(NOT CMAKE_INSTALL_RPATH AND CMAKE_INSTALL_PREFIX)
......@@ -213,7 +214,7 @@ if(ENABLE_PDFDOC)
FIND_PROGRAM_REQUIRED(PDFLATEX_PROG pdflatex)
endif()
if(ENABLE_PRESENCE)
if(ENABLE_PRESENCE OR ENABLE_MDNS)
# disable Presence on gcc < 4.7 because c++11 is not supported well before
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
message(WARNING "Disable Presence because GCC is too old")
......
......@@ -13,6 +13,7 @@
#cmakedefine ENABLE_XSD 1
#cmakedefine ENABLE_SOCI 1
#cmakedefine ENABLE_PUSHNOTIFICATION 1
#cmakedefine ENABLE_MDNS 1
#cmakedefine HAVE_DATEHANDLER 1
#cmakedefine HAVE_ARC4RANDOM 1
......
......@@ -176,15 +176,20 @@ if(ENABLE_PROTOBUF)
add_definitions(-DENABLE_PROTOBUF)
endif()
if(ENABLE_PRESENCE OR ENABLE_MDNS)
list(APPEND FLEXISIP_LIBS ${BELLESIP_LIBRARIES})
list(APPEND FLEXISIP_INCLUDES ${BELLESIP_INCLUDE_DIRS})
add_definitions(-DBELLE_SIP_USE_STL ${BELLE_SIP_CFLAGS})
endif()
if(ENABLE_PRESENCE)
if (NOT ENABLE_XSD)
message(FATAL_ERROR "Presence asked but XSD not enabled! Please enable it first.")
endif()
file(GLOB PRESENCE_SRCS presence/*.cc presence/*.hh)
list(APPEND FLEXISIP_SOURCES ${PRESENCE_SRCS})
list(APPEND FLEXISIP_LIBS ${BELLESIP_LIBRARIES} ${XERCES_LIBS})
list(APPEND FLEXISIP_INCLUDES ${BELLESIP_INCLUDE_DIRS} presence)
add_definitions(-DBELLE_SIP_USE_STL ${BELLE_SIP_CFLAGS})
list(APPEND FLEXISIP_LIBS ${XERCES_LIBS})
list(APPEND FLEXISIP_INCLUDES presence)
ADD_XSD_WRAPPERS(xml "Presence XSD - xml.xsd")
list(APPEND FLEXISIP_SOURCES xml/xml.xsd)
ADD_XSD_WRAPPERS(pidf+xml "Presence XSD - pidf+xml.xsd")
......
cmake-builder @ 5265602c
Subproject commit e5be87c436c27608e41237cb71814ff9149c4033
Subproject commit 5265602cab2ec15b7cce2d3a05882fb35ac93beb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment