linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] linphonec built without readline support


From: Pavel Löbl
Subject: [Linphone-developers] linphonec built without readline support
Date: Wed, 12 Jul 2017 10:14:12 +0200

Hello,

if I build linphone project (current trunk) using cmake as README says
the resulting linphonec console client is compiled without readline
support. That makes console client quite harder to use.
To just quickly "fix" it I've changed console/CMakeLists.txt in the
following way.

diff --git a/console/CMakeLists.txt b/console/CMakeLists.txt
index a23ad6cba..500319f35 100644
--- a/console/CMakeLists.txt
+++ b/console/CMakeLists.txt
@@ -29,6 +29,10 @@ set(LINPHONECSH_SOURCE_FILES
        shell.c
 )

+add_definitions(-DHAVE_READLINE=1)
+add_definitions(-DHAVE_READLINE_READLINE_H=1)
+add_definitions(-DHAVE_READLINE_HISTORY_H=1)
+
 bc_apply_compile_flags(LINPHONEC_SOURCE_FILES STRICT_OPTIONS_CPP
STRICT_OPTIONS_C)
 if(MSVC)
        get_source_file_property(COMMANDS_C_COMPILE_FLAGS commands.c
COMPILE_FLAGS)
@@ -37,7 +41,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})
+target_link_libraries(linphonec ${LINPHONE_LIBS_FOR_TOOLS}
${BCTOOLBOX_CORE_LIBRARIES} ${ORTP_LIBRARIES}
${MEDIASTREAMER2_LIBRARIES} "readline")
 set_target_properties(linphonec PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")

 if(INTL_FOUND)

But I'm not sure whats a proper way of fixing this. Maybe there should
be some cmake tweaks added to generate HAVE_ defines for
build/config.h? In case building using autotools is still supported.

Pavel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]