mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Fix build with tunnel support when compiling with CMake.
This commit is contained in:
parent
2479a567a5
commit
b1efcd8cfc
2 changed files with 15 additions and 1 deletions
|
|
@ -61,6 +61,13 @@ endif()
|
|||
find_package(BelleSIP REQUIRED)
|
||||
find_package(MS2 REQUIRED)
|
||||
find_package(XML2 REQUIRED)
|
||||
if(ENABLE_TUNNEL)
|
||||
find_package(Tunnel)
|
||||
if(NOT TUNNEL_FOUND)
|
||||
message(WARNING "Could not find the tunnel library!")
|
||||
set(ENABLE_TUNNEL OFF CACHE BOOL "Enable tunnel support" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
include_directories(
|
||||
|
|
@ -72,6 +79,9 @@ include_directories(
|
|||
${MS2_INCLUDE_DIRS}
|
||||
${XML2_INCLUDE_DIRS}
|
||||
)
|
||||
if(ENABLE_TUNNEL)
|
||||
include_directories(${TUNNEL_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
include_directories(${CMAKE_PREFIX_PATH}/include/MSVC)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ set(SOURCE_FILES
|
|||
info.c
|
||||
linphonecall.c
|
||||
linphonecore.c
|
||||
linphone_tunnel_stubs.c
|
||||
linphone_tunnel_config.c
|
||||
lpconfig.c
|
||||
lsd.c
|
||||
|
|
@ -89,6 +88,8 @@ if(ENABLE_TUNNEL)
|
|||
TunnelManager.cc
|
||||
)
|
||||
add_definitions(-DTUNNEL_ENABLED)
|
||||
else()
|
||||
list(APPEND SOURCE_FILES linphone_tunnel_stubs.c)
|
||||
endif()
|
||||
|
||||
set(GENERATED_SOURCE_FILES
|
||||
|
|
@ -116,6 +117,9 @@ set(LIBS
|
|||
${MS2_LIBRARIES}
|
||||
${XML2_LIBRARIES}
|
||||
)
|
||||
if(ENABLE_TUNNEL)
|
||||
list(APPEND LIBS ${TUNNEL_LIBRARIES})
|
||||
endif()
|
||||
if(WIN32)
|
||||
list(APPEND LIBS shlwapi)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue