Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
6d00594b
Commit
6d00594b
authored
Apr 17, 2017
by
johan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ENABLE_ZRTP option to cmake
+ turn HAVE_BZRTP into HAVE_ZRTP to be in sync with mediastreamer2 define
parent
e6bc7276
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
15 deletions
+31
-15
CMakeLists.txt
CMakeLists.txt
+25
-9
configure.ac
configure.ac
+1
-1
coreapi/linphonecore.c
coreapi/linphonecore.c
+5
-5
No files found.
CMakeLists.txt
View file @
6d00594b
...
...
@@ -45,8 +45,9 @@ option(ENABLE_DOC "Enable documentation generation with Doxygen." YES)
option
(
ENABLE_JAVADOC
"Add a target to generate documentation for Java API"
NO
)
option
(
ENABLE_GTK_UI
"Turn on or off compilation of gtk interface."
YES
)
option
(
ENABLE_LDAP
"Enable LDAP support."
NO
)
option
(
ENABLE_LIME
"Enable Instant Messaging Encryption."
YES
)
option
(
ENABLE_SQLITE_STORAGE
"Turn on compilation sqlite storage, for messages, contacts, history"
YES
)
option
(
ENABLE_ZRTP
"Buid linphone with ZRTP support"
YES
)
cmake_dependent_option
(
ENABLE_LIME
"Enable Instant Messaging Encryption."
YES
"ENABLE_ZRTP;ENABLE_SQLITE_STORAGE"
NO
)
cmake_dependent_option
(
ENABLE_NOTIFY
"Enable libnotify support."
YES
"ENABLE_GTK_UI;NOT APPLE"
NO
)
option
(
ENABLE_RELATIVE_PREFIX
"Find resources relatively to the installation directory."
NO
)
option
(
ENABLE_STRICT
"Build with strict compile options."
YES
)
...
...
@@ -171,14 +172,27 @@ if(ENABLE_NLS)
find_package
(
Gettext REQUIRED
)
find_package
(
Intl REQUIRED
)
endif
()
if
(
ENABLE_ZRTP
)
if
(
LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS
)
include
(
"
${
EP_bzrtp_CONFIG_DIR
}
/BZRTPConfig.cmake"
)
else
()
find_package
(
BZRTP
)
endif
()
if
(
NOT BZRTP_FOUND
)
message
(
WARNING
"Could not find bzrtp library, linphone will be compiled without ZRTP support."
)
set
(
ENABLE_ZRTP OFF CACHE BOOL
"Build linphone with ZRTP support."
FORCE
)
endif
()
endif
()
if
(
ENABLE_LIME
)
if
(
LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS
)
include
(
"
${
EP_bzrtp_CONFIG_DIR
}
/BZRTPConfig.cmake"
)
else
()
find_package
(
BZRTP
)
endif
()
set
(
HAVE_LIME 1
)
set
(
HAVE_BZRTP 1
)
if
(
BZRTP_FOUND
)
set
(
HAVE_LIME 1
)
else
()
message
(
WARNING
"LIME enabled but could not find bzrtp library, linphone will be compiled without LIME support."
)
set
(
ENABLE_LIME OFF CACHE BOOL
"Enable Instant Messaging Encryption."
FORCE
)
endif
()
endif
()
if
(
BZRTP_FOUND
)
set
(
HAVE_ZRTP 1
)
endif
()
if
(
ENABLE_CXX_WRAPPER
)
find_package
(
PythonInterp REQUIRED
)
...
...
@@ -205,9 +219,11 @@ include_directories(
set
(
LINPHONE_INCLUDE_DIRS
${
BELLESIP_INCLUDE_DIRS
}
${
MEDIASTREAMER2_INCLUDE_DIRS
}
${
BZRTP_INCLUDE_DIRS
}
${
BCTOOLBOX_CORE_INCLUDE_DIRS
}
)
if
(
BZRTP_FOUND
)
list
(
APPEND LINPHONE_INCLUDE_DIRS
${
BZRTP_INCLUDE_DIRS
}
)
endif
()
if
(
ANDROID
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
/java
)
endif
()
...
...
configure.ac
View file @
6d00594b
...
...
@@ -648,7 +648,7 @@ if test "$zrtp" != "false" ; then
fi
if test "$found_zrtp" = "true" ; then
zrtp=true
AC_DEFINE(HAVE_
B
ZRTP, 1, [Defined if bzrtp is available])
AC_DEFINE(HAVE_ZRTP, 1, [Defined if bzrtp is available])
else
zrtp=false
fi
...
...
coreapi/linphonecore.c
View file @
6d00594b
...
...
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifdef SQLITE_STORAGE_ENABLED
#include "sqlite3_bctbx_vfs.h"
# ifdef HAVE_
B
ZRTP
# ifdef HAVE_ZRTP
# include "bzrtp/bzrtp.h"
# endif
#endif
...
...
@@ -6208,7 +6208,7 @@ void linphone_core_remove_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook
}
#ifdef HAVE_
B
ZRTP
#ifdef HAVE_ZRTP
void
linphone_core_set_zrtp_secrets_file
(
LinphoneCore
*
lc
,
const
char
*
file
){
/* shall we perform cache migration ? */
if
(
!
lp_config_get_int
(
lc
->
config
,
"sip"
,
"zrtp_cache_migration_done"
,
FALSE
))
{
...
...
@@ -6255,11 +6255,11 @@ void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file){
linphone_core_zrtp_cache_db_init
(
lc
,
file
);
}
}
#else
#else
/* HAVE_ZRTP */
void
linphone_core_set_zrtp_secrets_file
(
LinphoneCore
*
lc
,
const
char
*
file
){
ms_error
(
"linphone_core_set_zrtp_secrets_file(): no zrtp support in this build."
);
}
#endif
#endif
/* HAVE_ZRTP */
void
*
linphone_core_get_zrtp_cache_db
(
LinphoneCore
*
lc
){
#ifdef SQLITE_STORAGE_ENABLED
...
...
@@ -6278,7 +6278,7 @@ static void linphone_core_zrtp_cache_close(LinphoneCore *lc) {
#endif
/* SQLITE_STORAGE_ENABLED */
}
#if defined(SQLITE_STORAGE_ENABLED) && defined (HAVE_
B
ZRTP)
#if defined(SQLITE_STORAGE_ENABLED) && defined (HAVE_ZRTP)
void
linphone_core_zrtp_cache_db_init
(
LinphoneCore
*
lc
,
const
char
*
fileName
)
{
int
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment