forked from mirrors/linphone-iphone
Add CMakeLists.txt to compile using cmake.
This commit is contained in:
parent
e022b0d3ff
commit
452b004655
4 changed files with 177 additions and 0 deletions
57
CMakeLists.txt
Normal file
57
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
project(LINPHONE C)
|
||||
|
||||
if(NOT ORTP_ROOT_DIR)
|
||||
set(ORTP_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/oRTP)
|
||||
endif()
|
||||
if(NOT ORTP_INCLUDE_DIR)
|
||||
set(ORTP_INCLUDE_DIR ${ORTP_ROOT_DIR}/include)
|
||||
endif()
|
||||
if(NOT MS2_ROOT_DIR)
|
||||
set(MS2_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mediastreamer2)
|
||||
endif()
|
||||
if(NOT MS2_INCLUDE_DIR)
|
||||
set(MS2_INCLUDE_DIR ${MS2_ROOT_DIR}/include)
|
||||
endif()
|
||||
if(NOT LIBXML2_ROOT_DIR)
|
||||
set(LIBXML2_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libxml2)
|
||||
endif()
|
||||
if(NOT LIBXML2_INCLUDE_DIR)
|
||||
set(LIBXML2_INCLUDE_DIR ${LIBXML2_ROOT_DIR}/include)
|
||||
endif()
|
||||
if(NOT BELLESIP_ROOT_DIR)
|
||||
set(BELLESIP_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../belle-sip)
|
||||
endif()
|
||||
if(NOT BELLESIP_INCLUDE_DIR)
|
||||
set(BELLESIP_INCLUDE_DIR ${BELLESIP_ROOT_DIR}/include)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
include/
|
||||
coreapi/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../cmake/libxml2/
|
||||
)
|
||||
|
||||
if(USE_INSTALLED_COMPONENTS)
|
||||
include_directories(
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${CMAKE_INSTALL_PREFIX}/include/libxml2
|
||||
)
|
||||
else()
|
||||
include_directories(
|
||||
${ORTP_INCLUDE_DIR}
|
||||
${MS2_INCLUDE_DIR}
|
||||
${LIBXML2_INCLUDE_DIR}
|
||||
${BELLESIP_INCLUDE_DIR}
|
||||
)
|
||||
if(WIN32)
|
||||
include_directories(${ORTP_ROOT_DIR}/build/vsx/oRTP/oRTP/)
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
||||
add_subdirectory(coreapi)
|
||||
add_subdirectory(share)
|
||||
|
||||
if(INSTALL_COMPONENT_IN_POSTBUILD)
|
||||
add_install_target(INSTALL_liblinphone COMP_liblinphone liblinphone)
|
||||
endif()
|
||||
99
coreapi/CMakeLists.txt
Normal file
99
coreapi/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
set(SOURCE_FILES
|
||||
address.c
|
||||
authentication.c
|
||||
bellesip_sal/sal_address_impl.c
|
||||
bellesip_sal/sal_impl.c
|
||||
bellesip_sal/sal_op_call.c
|
||||
bellesip_sal/sal_op_call_transfer.c
|
||||
bellesip_sal/sal_op_events.c
|
||||
bellesip_sal/sal_op_impl.c
|
||||
bellesip_sal/sal_op_info.c
|
||||
bellesip_sal/sal_op_message.c
|
||||
bellesip_sal/sal_op_presence.c
|
||||
bellesip_sal/sal_op_publish.c
|
||||
bellesip_sal/sal_op_registration.c
|
||||
bellesip_sal/sal_sdp.c
|
||||
callbacks.c
|
||||
chat.c
|
||||
conference.c
|
||||
ec-calibrator.c
|
||||
enum.c
|
||||
event.c
|
||||
friend.c
|
||||
info.c
|
||||
linphonecall.c
|
||||
linphonecore.c
|
||||
#linphone_tunnel.cc
|
||||
linphone_tunnel_stubs.c
|
||||
linphone_tunnel_config.c
|
||||
lpconfig.c
|
||||
lsd.c
|
||||
message_storage.c
|
||||
misc.c
|
||||
offeranswer.c
|
||||
presence.c
|
||||
proxy.c
|
||||
sal.c
|
||||
siplogin.c
|
||||
sipsetup.c
|
||||
#TunnelManager.cc
|
||||
bellesip_sal/sal_impl.h
|
||||
enum.h
|
||||
event.h
|
||||
linphonecore.h
|
||||
linphonecore_utils.h
|
||||
linphonefriend.h
|
||||
linphone_tunnel.h
|
||||
lpconfig.h
|
||||
offeranswer.h
|
||||
private.h
|
||||
sipsetup.h
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-D_TRUE_TIME
|
||||
-DIN_LINPHONE
|
||||
-DUSE_BELLESIP
|
||||
#-DTUNNEL_ENABLED
|
||||
#-DVIDEO_ENABLED
|
||||
-DLINPHONE_PACKAGE_NAME="linphone"
|
||||
-DLINPHONE_VERSION="Devel"
|
||||
-DLIBLINPHONE_EXPORTS
|
||||
-DLINPHONE_PLUGINS_DIR=""
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(
|
||||
-DWINDOW_NATIVE
|
||||
)
|
||||
|
||||
set(LIBS ws2_32)
|
||||
endif(WIN32)
|
||||
set(LIBS ${LIBS} libortp libmediastreamer_base libmediastreamer_voip libbellesip libxml2)
|
||||
|
||||
add_library(liblinphone SHARED ${SOURCE_FILES})
|
||||
set_target_properties(liblinphone PROPERTIES VERSION 3.6.99 SOVERSION 5)
|
||||
|
||||
target_link_libraries(liblinphone ${LIBS})
|
||||
|
||||
install(TARGETS liblinphone
|
||||
COMPONENT COMP_liblinphone
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
if(USE_INSTALLED_COMPONENTS)
|
||||
add_dependencies(liblinphone
|
||||
INSTALL_libortp
|
||||
INSTALL_libmediastreamer2
|
||||
INSTALL_libbellesip
|
||||
INSTALL_libxml2)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
file(GLOB HEADER_FILES "*.h")
|
||||
|
||||
install(FILES ${HEADER_FILES}
|
||||
COMPONENT COMP_liblinphone
|
||||
DESTINATION include/linphone
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
17
share/CMakeLists.txt
Normal file
17
share/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
install(FILES archived-rootca.pem
|
||||
RENAME rootca.pem
|
||||
COMPONENT COMP_liblinphone
|
||||
DESTINATION share/linphone
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
|
||||
install(FILES ringback.wav
|
||||
COMPONENT COMP_liblinphone
|
||||
DESTINATION share/sounds/linphone
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
|
||||
add_subdirectory(rings)
|
||||
|
||||
install(FILES ../mediastreamer2/src/voip/nowebcamCIF.jpg
|
||||
COMPONENT COMP_liblinphone
|
||||
DESTINATION share/images
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
4
share/rings/CMakeLists.txt
Normal file
4
share/rings/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
install(FILES oldphone.wav toy-mono.wav
|
||||
COMPONENT COMP_liblinphone
|
||||
DESTINATION share/sounds/linphone/rings
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||
Loading…
Add table
Reference in a new issue