Commit b1efcd8c authored by Ghislain MARY's avatar Ghislain MARY

Fix build with tunnel support when compiling with CMake.

parent 2479a567
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment