...
 
Commits (82)
This diff is collapsed.
......@@ -20,8 +20,8 @@
#
############################################################################
cmake_minimum_required(VERSION 3.0)
project(linphone VERSION 3.12.0 LANGUAGES C CXX)
cmake_minimum_required(VERSION 3.1)
project(linphone VERSION 4.3.0 LANGUAGES C CXX)
set(LINPHONE_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
......@@ -40,9 +40,11 @@ include(cmake/Tools.cmake)
option(ENABLE_SHARED "Build shared library." YES)
option(ENABLE_STATIC "Build static library." YES)
option(ENABLE_ADVANCED_IM "Enable advanced instant messaging such as group chat." YES)
option(ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." YES)
option(ENABLE_CSHARP_WRAPPER "Build the C# wrapper for Liblinphone." OFF)
option(ENABLE_CXX_WRAPPER "Build the C++ wrapper for Liblinphone." YES)
option(ENABLE_DB_STORAGE "Enable database storage." YES)
option(ENABLE_SWIFT_WRAPPER "Build the swift wrapper for Liblinphone." OFF)
option(ENABLE_JAZZY_DOC "Build the jazzy doc for swift module of Liblinphone." OFF)
option(ENABLE_DAEMON "Enable the linphone daemon interface." YES)
......@@ -63,6 +65,7 @@ option(ENABLE_UNIT_TESTS "Enable compilation of unit tests." YES)
option(ENABLE_UPDATE_CHECK "Enable update check." NO)
option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES)
option(ENABLE_VIDEO "Build with video support." YES)
option(ENABLE_ASSETS "Package sound assets." YES)
cmake_dependent_option(ENABLE_NOTIFY "Enable libnotify support." YES "ENABLE_GTK_UI;NOT APPLE" NO)
cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENABLE_GTK_UI" NO)
......@@ -105,13 +108,8 @@ endif()
# find_package should be invoked here to check for libraries - however do NOT
# call include_directories here (see below)
if (ENABLE_VCARD)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_belcard_CONFIG_DIR}/BelcardConfig.cmake")
else()
find_package(Belcard)
endif()
find_package(belcard CONFIG)
if(NOT BELCARD_FOUND)
message(WARNING "Could not find the belcard library!")
set(ENABLE_VCARD OFF CACHE BOOL "Enable vcard support." FORCE)
......@@ -120,30 +118,28 @@ if (ENABLE_VCARD)
endif()
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_bellesip_CONFIG_DIR}/BelleSIPConfig.cmake")
include("${EP_ms2_CONFIG_DIR}/Mediastreamer2Config.cmake")
include("${EP_ortp_CONFIG_DIR}/ORTPConfig.cmake")
set(BcToolbox_FIND_COMPONENTS tester)
include("${EP_bctoolbox_CONFIG_DIR}/BcToolboxConfig.cmake")
include("${EP_belr_CONFIG_DIR}/BelrConfig.cmake")
else()
find_package(BelleSIP REQUIRED)
find_package(Mediastreamer2 REQUIRED)
find_package(ORTP REQUIRED)
find_package(BcToolbox 0.0.3 REQUIRED OPTIONAL_COMPONENTS tester)
find_package(Belr REQUIRED)
find_package(BelleSIP CONFIG REQUIRED)
find_package(Mediastreamer2 CONFIG REQUIRED)
find_package(ortp CONFIG REQUIRED)
find_package(bctoolbox 0.0.3 CONFIG REQUIRED OPTIONAL_COMPONENTS tester)
find_package(belr CONFIG REQUIRED)
if(ENABLE_ADVANCED_IM)
find_package(LibXsd REQUIRED)
set(HAVE_ADVANCED_IM 1)
endif()
find_package(LibXsd REQUIRED)
find_package(Sqlite3 REQUIRED)
find_package(XML2 REQUIRED)
#APPLE platform does not use dlopen for soci backend
if (APPLE)
find_package(Soci REQUIRED COMPONENTS sqlite3)
else()
find_package(Soci REQUIRED)
if (ENABLE_DB_STORAGE)
#APPLE platform does not use dlopen for soci backend
if (APPLE)
find_package(Soci REQUIRED COMPONENTS sqlite3)
else()
find_package(Soci REQUIRED)
endif()
set(HAVE_DB_STORAGE 1)
endif()
find_package(ZLIB)
......@@ -172,20 +168,15 @@ if(ENABLE_ASSISTANT)
set(BUILD_WIZARD 1)
endif()
if(ENABLE_LIME AND ENABLE_LIME_X3DH)
message(WARNING "Lime V1 and V2 cannot be used simultaneously! Using Lime V2 only instead.")
set(ENABLE_LIME FALSE)
message(WARNING "Lime V1 and V2 cannot be used simultaneously!")
endif()
if(ENABLE_LIME_X3DH)
find_package(Lime REQUIRED)
find_package(lime REQUIRED CONFIG)
set(HAVE_LIME_X3DH TRUE)
endif()
if(ENABLE_LIME)
#bzrtp is only required for LIME
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_bzrtp_CONFIG_DIR}/BZRTPConfig.cmake")
else()
find_package(BZRTP REQUIRED)
endif()
find_package(bzrtp REQUIRED CONFIG)
set(HAVE_LIME 1)
endif()
if(ENABLE_CXX_WRAPPER OR ENABLE_CSHARP_WRAPPER OR ENABLE_JAVA_WRAPPER OR ENABLE_SWIFT_WRAPPER OR ENABLE_DOC)
......@@ -215,7 +206,9 @@ if(NOT WIN32)
endif()
if(ANDROID)
find_package(CpuFeatures REQUIRED)
find_package(Support)
if(CMAKE_ANDROID_NDK_VERSION VERSION_LESS 19)
find_library(ANDROID_SUPPORT_LIBRARY NAMES support)
endif()
endif()
set(LINPHONE_LDFLAGS "${BELLESIP_LDFLAGS} ${MEDIASTREAMER2_LDFLAGS}")
......@@ -223,30 +216,25 @@ set(LINPHONE_LDFLAGS "${BELLESIP_LDFLAGS} ${MEDIASTREAMER2_LDFLAGS}")
# include_directories must be called only UNDER THIS LINE in order to use our
# projects submodules first (we do NOT want to have system headers in first position)
include_directories(
coreapi
include
src
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/coreapi/
coreapi/
include/
src/
)
set(LINPHONE_INCLUDE_DIRS
${BELLESIP_INCLUDE_DIRS}
${MEDIASTREAMER2_INCLUDE_DIRS}
${BCTOOLBOX_CORE_INCLUDE_DIRS}
${BELR_INCLUDE_DIRS}
${BELLESIP_INCLUDE_DIRS}
${MEDIASTREAMER2_INCLUDE_DIRS}
${BCTOOLBOX_CORE_INCLUDE_DIRS}
${BELR_INCLUDE_DIRS}
)
if (BZRTP_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${BZRTP_INCLUDE_DIRS})
endif()
if(ANDROID)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/java)
endif()
if(ENABLE_TUNNEL)
list(APPEND LINPHONE_INCLUDE_DIRS ${TUNNEL_INCLUDE_DIRS})
endif()
if (ENABLE_VCARD)
list(APPEND LINPHONE_INCLUDE_DIRS ${BELCARD_INCLUDE_DIRS})
endif()
list(APPEND LINPHONE_INCLUDE_DIRS ${XML2_INCLUDE_DIRS})
list(APPEND LINPHONE_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS})
......@@ -345,15 +333,18 @@ else()
set(LINPHONE_DATA_DIR "${CMAKE_INSTALL_PREFIX}")
endif()
set(LINPHONE_PLUGINS_DIR "${LINPHONE_DATA_DIR}/${CMAKE_INSTALL_LIBDIR}/liblinphone/plugins")
if(WIN32)
set(LINPHONE_CONFIG_DIR "Linphone")
endif()
set(PACKAGE_LOCALE_DIR "${LINPHONE_DATA_DIR}/${CMAKE_INSTALL_DATADIR}/locale")
set(PACKAGE_DATA_DIR "${LINPHONE_DATA_DIR}/${CMAKE_INSTALL_DATADIR}")
set(PACKAGE_GRAMMAR_DIR "${LINPHONE_DATA_DIR}/${CMAKE_INSTALL_DATADIR}/belr/grammars")
set(PACKAGE_SOUND_DIR "${LINPHONE_DATA_DIR}/${CMAKE_INSTALL_DATADIR}/sounds/linphone")
set(PACKAGE_RING_DIR "${PACKAGE_SOUND_DIR}/rings")
set(PACKAGE_FREEDESKTOP_DIR "${PACKAGE_DATA_DIR}/applications")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/config.h PROPERTIES GENERATED ON)
add_definitions(-DHAVE_CONFIG_H)
......@@ -363,7 +354,6 @@ if(ENABLE_VIDEO)
add_definitions(-DVIDEO_ENABLED)
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
......@@ -387,7 +377,7 @@ endif()
if(ENABLE_TOOLS)
add_subdirectory(tools)
endif()
if(ENABLE_UNIT_TESTS AND BCTOOLBOX_TESTER_FOUND)
if(ENABLE_UNIT_TESTS)
add_subdirectory(tester)
endif()
if(ENABLE_CXX_WRAPPER)
......@@ -401,6 +391,8 @@ if(ENABLE_SWIFT_WRAPPER)
endif()
include(CMakePackageConfigHelpers)
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/Linphone/cmake")
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfigVersion.cmake"
VERSION ${LINPHONE_VERSION}
......@@ -409,12 +401,12 @@ write_basic_package_version_file(
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/LinphoneTargets.cmake"
)
configure_file(cmake/LinphoneConfig.cmake.in
configure_package_config_file(cmake/LinphoneConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfig.cmake"
@ONLY
INSTALL_DESTINATION ${CONFIG_PACKAGE_LOCATION}
NO_SET_AND_CHECK_MACRO
)
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/Linphone/cmake")
install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE LinphoneTargets.cmake
DESTINATION ${CONFIG_PACKAGE_LOCATION}
......
This diff is collapsed.
......@@ -9,10 +9,17 @@ Group changes to describe their impact on the project, as follows:
Removed for deprecated features removed in this release.
Fixed for any bug fixes.
Security to invite users to upgrade in case of vulnerabilities.
# Preamble
## [Incomming]
- Implementation of bodyless subscription
- Parsing of Display name in presence NOTIFY
This changelog file was started on October 2019. Previous changes were more or less tracked in the *NEWS* file.
## [4.3.0] - 2019-10-14
### Added
- Avoid some SIP DNS lookups by keeping SRV target names
- New cmake options to make "small" builds of liblinphone, by excluding adavanced IM and DB storage.
### Changed
- Optimisations in chatrooms loading from Sqlite DB, improving startup time.
- License changed to GNU GPLv3.
This diff is collapsed.
This diff is collapsed.
[![pipeline status](https://gitlab.linphone.org/BC/public/linphone/badges/master/pipeline.svg)](https://gitlab.linphone.org/BC/public/linphone/commits/master)
liblinphone
Liblinphone
===========
This is liblinphone, a free (GPL) video voip library based on the SIP protocol.
This library is used by Linphone. It's source code is available at *linphone-desktop[1]*.
Liblinphone is a high-level SIP library integrating all calling and instant messaging features into an unified easy-to-use API.
It is the cross-platform VoIP library on which the *Linphone[1]* application is based on, and that anyone can use to add audio and video calls
or instant messaging capabilities to an application.
# License
Copyright © Belledonne Communications, all rights reserved.
Liblinphone is dual licensed:
- under a GNU GPLv3 license for free (see LICENSE.txt file for details)
- under a proprietary license, for closed source projects. Contact sales@belledonne-communications.com for costs and other service information.
# Documentation
- Supported features and RFCs : https://www.linphone.org/technical-corner/liblinphone/features
- Multi-language API documentation : https://www.linphone.org/snapshots/docs/liblinphone/multilang/
- Liblinphone developer guide on Linphone public wiki: https://wiki.linphone.org/xwiki/wiki/public/view/Lib/
# Building liblinphone
The *linphone-sdk[7]* git project is the **recommended** way to build liblinphone, as it bundles all required an optional dependencies to build liblinphone
as git submodules. It has a top-level CMake build script that makes life easier.
## Required dependencies
Here the main dependencies listed:
* **BcToolbox[2]:** portability layer
* **BelleSIP[3]:** SIP stack
* **Mediastreamer2[4]:** multimedia engine
* **Belcard[5]:** VCard4 support
* **Belr** generic parsing engine for ABNF defined languages.
* **libxml2**
* **zlib**
* **libsqlite3:** user data storage (can be disabled)
* **gettext** and **libintl**: internationalization support (can be disabled)
* **python interpreter** and **pystache**, **six** python module (needed for C++/C#/Java wrappers and API documentation)
* **doxygen** and **dot** (needed for C++ wrapper and API documentation)
## Optional dependencies
* **Bzrtp[6]**: zrtp stack used to secure calls and for LIME (Linphone Instant Messaging Encryption).
* **Bzrtp[6]:** zrtp stack used to secure calls
* For API documentation generation: **sphinx**, **javasphinx**, **sphinx_csharp** python modules are needed.
## Build instructions
## Build instructions (when used standalone, outside of linphone-sdk)
cmake . -DCMAKE_INSTALL_PREFIX=<prefix> -DCMAKE_PREFIX_PATH=<search_prefixes>
......@@ -38,7 +51,7 @@ This library is used by Linphone. It's source code is available at *linphone-des
make install
## Supported build opitons
## Supported build options
* **`CMAKE_INSTALL_PREFIX=<string>`** : install prefix
* **`CMAKE_PREFIX_PATH=<string>`** : column-separated list of prefixes where to search for dependencies
......@@ -58,13 +71,14 @@ To ensure that the installed binaries are striped of any rpath, use `-DCMAKE_SKI
while you invoke cmake.
Rpm packaging
liblinphone can be generated with cmake3 using the following command:
liblinphone can be generated with cmake3 using the following commands:
```
mkdir WORK
cd WORK
cmake3 ../
make package_source
rpmbuild -ta --clean --rmsource --rmspec liblinphone-<version>-<release>.tar.gz
```
# Credits
......@@ -72,15 +86,16 @@ Belledonne Communications SARL, all rights reserved.
# License
This software is distributed under GNU GPLv2. Please read COPYING file for full license text.
This software is distributed under GNU GPLv3. Please read COPYING file for full license text.
------------------------------
- [1] linphone-desktop: https://gitlab.linphone.org/BC/public/linphone-desktop
- [1] Linphone: https://linphone.org/technical-corner/linphone
- [2] bctoolbox: https://gitlab.linphone.org/BC/public/bctoolbox *or* <https://www.linphone.org/releases/sources/bctoolbox>
- [3] belle-sip: https://gitlab.linphone.org/BC/public/belle-sip *or* <https://www.linphone.org/releases/sources/belle-sip>
- [4] mediastreamer2: https://gitlab.linphone.org/BC/public/mediastreamer2 *or* <https://www.linphone.org/releases/sources/mediastreamer>
- [5] belcard: https://gitlab.linphone.org/BC/public/belcard *or* <https://www.linphone.org/releases/sources/belcard>
- [6] bzrtp: https://gitlab.linphone.org/BC/public/bzrtp *or* <https://www.linphone.org/releases/sources/bzrtp>
- [7] linphone-sdk https://gitlab.linphone.org/BC/public/linphone-sdk
#!/bin/sh
##
## Copyright (c) 2010-2019 Belledonne Communications SARL.
##
## This file is part of Liblinphone.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
......
......@@ -24,7 +24,7 @@ if(NOT CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_NAME "liblinphone")
ENDIF()
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../COPYING")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/../LICENSE.txt")
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
......
##
## Copyright (c) 2010-2019 Belledonne Communications SARL.
##
## This file is part of Liblinphone.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
#export EXTRA_ARGS="--workdir $bundle_res"
export LINPHONE_WORKDIR="$bundle_res"
export GIO_EXTRA_MODULES="$bundle_lib/gio/modules"
......
......@@ -101,9 +101,11 @@ rm -rf $RPM_BUILD_ROOT
#%{_mandir}/*
%{_datadir}/linphone
%{_datadir}/sounds/linphone
%{_datadir}/belr/grammars/*
/etc/sysconfig/lp-autoanswer
/lib/systemd/system/lp-autoanswer.service
%files devel
%defattr(-,root,root)
%{_includedir}/linphone
......@@ -122,7 +124,6 @@ rm -rf $RPM_BUILD_ROOT
%endif
%{_datadir}/Linphone/cmake/*.cmake
%{_datadir}/LinphoneCxx/cmake/*.cmake
%{_datadir}/belr/grammars/cpim_grammar
%changelog
......
......@@ -29,19 +29,13 @@
# LINPHONE_CPPFLAGS - The compilation flags needed to use linphone
# LINPHONE_LDFLAGS - The linking flags needed to use linphone
if(NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${CMAKE_CURRENT_LIST_DIR}/LinphoneTargets.cmake")
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${EP_ms2_CONFIG_DIR}/Mediastreamer2Config.cmake")
include("${EP_bellesip_CONFIG_DIR}/BelleSIPConfig.cmake")
else()
find_package(Mediastreamer2 REQUIRED)
find_package(BelleSIP REQUIRED)
endif()
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/LinphoneTargets.cmake")
set(LINPHONE_TARGETNAME linphone)
if(@ENABLE_SHARED@)
set(LINPHONE_TARGETNAME linphone)
set(LINPHONE_LIBRARIES ${LINPHONE_TARGETNAME})
else()
set(LINPHONE_TARGETNAME linphone-static)
......@@ -58,12 +52,8 @@ else()
endif()
endif()
get_target_property(LINPHONE_INCLUDE_DIRS ${LINPHONE_TARGETNAME} INTERFACE_INCLUDE_DIRECTORIES)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
list(INSERT LINPHONE_INCLUDE_DIRS 0 "${EP_linphone_INCLUDE_DIR}")
else()
list(INSERT LINPHONE_INCLUDE_DIRS 0 "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
endif()
list(REMOVE_DUPLICATES LINPHONE_INCLUDE_DIRS)
set_target_properties(${LINPHONE_TARGETNAME} PROPERTIES INTERFACE_LINK_LIBRARIES "@INTERFACE_LIBS@")
set(LINPHONE_CPPFLAGS @LINPHONE_CPPFLAGS@)
set(LINPHONE_LDFLAGS "@LINPHONE_LDFLAGS@")
......
......@@ -47,4 +47,6 @@
#cmakedefine HAVE_LIBUDEV_H 0
#cmakedefine HAVE_LIME
#cmakedefine HAVE_LIME_X3DH
#cmakedefine HAVE_ADVANCED_IM
#cmakedefine HAVE_DB_STORAGE
#cmakedefine ENABLE_UPDATE_CHECK 1
......@@ -37,7 +37,7 @@ if(MSVC)
endif()
add_executable(linphonec ${LINPHONEC_SOURCE_FILES})
target_link_libraries(linphonec ${LINPHONE_LIBS_FOR_TOOLS} ${BCTOOLBOX_CORE_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${XSD_LIBRARIES})
target_link_libraries(linphonec ${LINPHONE_LIBS_FOR_TOOLS} bctoolbox ortp mediastreamer ${XSD_LIBRARIES})
set_target_properties(linphonec PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
set_target_properties(linphonec PROPERTIES LINKER_LANGUAGE CXX)
......@@ -47,14 +47,14 @@ endif()
if(WIN32)
add_executable(linphoned WIN32 ${LINPHONEC_SOURCE_FILES})
target_link_libraries(linphoned ${LINPHONE_LIBS_FOR_TOOLS} ${BCTOOLBOX_CORE_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${XSD_LIBRARIES})
target_link_libraries(linphoned ${LINPHONE_LIBS_FOR_TOOLS} bctoolbox ortp mediastreamer ${XSD_LIBRARIES})
if(INTL_FOUND)
target_link_libraries(linphoned ${INTL_LIBRARIES})
endif()
endif()