Commit 5bb14d0c authored by jehan's avatar jehan

add bc hiredis compilation

parent 74b7ce68
......@@ -82,6 +82,13 @@ endif()
list(APPEND EP_flexisip_CMAKE_OPTIONS "-DENABLE_REDIS=${ENABLE_REDIS}")
if(ENABLE_REDIS)
list(APPEND EP_flexisip_CONFIGURE_OPTIONS "--enable-redis")
if (ENABLE_BC_REDIS)
message(STATUS "Flexisip to be built with BC HIREDIS")
list(APPEND EP_flexisip_DEPENDENCIES EP_hiredis)
else()
message(STATUS "Flexisip to be built with system HIREDIS")
endif()
else()
list(APPEND EP_flexisip_CONFIGURE_OPTIONS "--disable-redis")
endif()
......
......@@ -59,7 +59,6 @@ ENDFOREACH()
set(FLEXISIP_LIBDEPS ssl mysqlclient_r mysqlclient)
if(PLATFORM STREQUAL "Debian")
list(APPEND FLEXISIP_LIBDEPS hiredis)
set(DEFAULT_VALUE_ENABLE_SOCI_BUILD ON)
endif()
......@@ -76,7 +75,7 @@ set(DEFAULT_VALUE_ENABLE_REDIS ON)
set(DEFAULT_VALUE_ENABLE_SOCI ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS OFF)
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_STATIC=NO")
set(DEFAULT_VALUE_ENABLE_BC_HIREDIS ON)
# Global configuration
set(LINPHONE_BUILDER_HOST "")
......@@ -172,6 +171,11 @@ set(LINPHONE_BUILDER_RPMBUILD_PACKAGE_PREFIX "bc-")
set(RPMBUILD_OPTIONS "--define '_mandir %{_prefix}'")
# bc-redis will be installed in the prefix, but we have to pass it through a special flag to the RPM build, since there
# is no pkgconfig
list(APPEND EP_flexisip_CONFIGURE_OPTIONS "--with-redis=${CMAKE_INSTALL_PREFIX}")
set(EP_flexisip_RPMBUILD_OPTIONS "${EP_flexisip_RPMBUILD_OPTIONS} --define 'hiredisdir ${RPM_INSTALL_PREFIX}'")
if(PLATFORM STREQUAL "Debian")
# dependencies cannot be checked by rpmbuild in debian
set(RPMBUILD_OPTIONS "${RPMBUILD_OPTIONS} --nodeps")
......@@ -185,12 +189,6 @@ if(PLATFORM STREQUAL "Debian")
# some debians are using dash as shell, which doesn't support "export -n", so we override and use bash
set(RPMBUILD_OPTIONS "${RPMBUILD_OPTIONS} --define '_buildshell /bin/bash'")
# redis for debian 7 will be installed in the prefix, but we have to pass it through a special flag to the RPM build, since there
# is no pkgconfig
list(APPEND EP_flexisip_DEPENDENCIES EP_hiredis)
list(APPEND EP_flexisip_CONFIGURE_OPTIONS "--with-redis=${CMAKE_INSTALL_PREFIX}")
set(EP_flexisip_RPMBUILD_OPTIONS "${EP_flexisip_RPMBUILD_OPTIONS} --define 'hiredisdir ${RPM_INSTALL_PREFIX}'")
CHECK_PROGRAM(alien)
CHECK_PROGRAM(fakeroot)
endif()
......
......@@ -23,6 +23,7 @@
# Define default values for the flexisip builder options
set(DEFAULT_VALUE_DISABLE_BC_ANTLR OFF)
set(DEFAULT_VALUE_ENABLE_BC_ODBC OFF)
set(DEFAULT_VALUE_ENABLE_BC_HIREDIS OFF)
set(DEFAULT_VALUE_ENABLE_ODB OFF)
set(DEFAULT_VALUE_ENABLE_ODBC OFF)
set(DEFAULT_VALUE_ENABLE_PUSHNOTIFICATION ON)
......
......@@ -26,6 +26,7 @@ lcb_add_option("ODB" "Enable odb support." "${DEFAULT_VALUE_ENABLE_ODB}")
lcb_add_option("ODBC" "Enable odbc support." "${DEFAULT_VALUE_ENABLE_ODBC}")
lcb_add_dependent_option("BC ODBC" "Enable odbc support from Belledonne Communications." "${DEFAULT_VALUE_ENABLE_BC_ODBC}" "ENABLE_ODBC" OFF)
lcb_add_option("REDIS" "Enable hiredis support." "${DEFAULT_VALUE_ENABLE_REDIS}")
lcb_add_dependent_option("BC REDIS" "Enable hiredis support from Belledonne Communications." "${DEFAULT_VALUE_ENABLE_BC_HIREDIS}" "ENABLE_REDIS" OFF)
lcb_add_option("PushNotification" "Enable push notification support." "${DEFAULT_VALUE_ENABLE_PUSHNOTIFICATION}")
lcb_add_option("Presence" "Enable presence server support." "${DEFAULT_VALUE_ENABLE_PRESENCE}")
lcb_add_option("SNMP" "Enable SNMP support." "${DEFAULT_ENABLE_SNMP}")
......
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