Commit 86b74cc5 authored by Ghislain MARY's avatar Ghislain MARY

Handle compilation of account assistant when building with CMake.

parent 507ca786
......@@ -101,6 +101,15 @@ if(ENABLE_NOTIFY)
set(ENABLE_NOTIFY OFF CACHE BOOL "Enable libnotify support." FORCE)
endif()
endif()
if(ENABLE_ASSISTANT)
find_package(Soup)
if(SOUP_FOUND)
set(BUILD_WIZARD 1)
else()
message(WARNING "Could not find the soup library!")
set(ENABLE_ASSISTANT OFF CACHE BOOL "Turn on assistant compiling." FORCE)
endif()
endif()
find_package(Gettext)
......@@ -120,6 +129,9 @@ endif()
if(ENABLE_TUNNEL)
include_directories(${TUNNEL_INCLUDE_DIRS})
endif()
if(ENABLE_ASSISTANT)
include_directories(${SOUP_INCLUDE_DIRS})
endif()
if(MSVC)
include_directories(${CMAKE_PREFIX_PATH}/include/MSVC)
......
......@@ -22,9 +22,9 @@
#
# - Find the notify include file and library
#
# NOTIFY_FOUND - system has linphone
# NOTIFY_INCLUDE_DIRS - the linphone include directory
# NOTIFY_LIBRARIES - The libraries needed to use linphone
# NOTIFY_FOUND - system has libnotify
# NOTIFY_INCLUDE_DIRS - the libnotify include directory
# NOTIFY_LIBRARIES - The libraries needed to use libnotify
set(_NOTIFY_ROOT_PATHS
${WITH_NOTIFY}
......
############################################################################
# FindSoup.cmake
# Copyright (C) 2014 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
#
# - Find the soup include file and library
#
# SOUP_FOUND - system has libsoup
# SOUP_INCLUDE_DIRS - the libsoup include directory
# SOUP_LIBRARIES - The libraries needed to use libsoup
find_package(GTK2 2.18 REQUIRED gtk)
set(_SOUP_ROOT_PATHS
${WITH_SOUP}
${CMAKE_INSTALL_PREFIX}
)
find_path(SOUP_INCLUDE_DIRS
NAMES libsoup/soup.h
HINTS _SOUP_ROOT_PATHS
PATH_SUFFIXES include/libsoup-2.4
)
if(SOUP_INCLUDE_DIRS)
set(HAVE_LIBSOUP_SOUP_H 1)
list(APPEND SOUP_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS})
endif()
find_library(SOUP_LIBRARIES
NAMES soup-2.4
HINTS ${_SOUP_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
if(SOUP_LIBRARIES)
list(APPEND SOUP_LIBRARIES ${GTK2_LIBRARIES})
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Soup
DEFAULT_MSG
SOUP_INCLUDE_DIRS SOUP_LIBRARIES HAVE_LIBSOUP_SOUP_H
)
mark_as_advanced(SOUP_INCLUDE_DIRS SOUP_LIBRARIES HAVE_LIBSOUP_SOUP_H)
......@@ -36,6 +36,7 @@
#define PACKAGE_DATA_DIR "${PACKAGE_DATA_DIR}"
#define PACKAGE_SOUND_DIR "${PACKAGE_SOUND_DIR}"
#cmakedefine BUILD_WIZARD
#cmakedefine HAVE_NOTIFY4
#cmakedefine HAVE_CU_GET_SUITE 1
#cmakedefine HAVE_CU_CURSES 1
\ No newline at end of file
......@@ -97,6 +97,9 @@ if(ENABLE_TUNNEL)
else()
list(APPEND SOURCE_FILES linphone_tunnel_stubs.c)
endif()
if(ENABLE_ASSISTANT)
list(APPEND SOURCE_FILES sipwizard.c)
endif()
set(GENERATED_SOURCE_FILES
${CMAKE_CURRENT_BINARY_DIR}/liblinphone_gitversion.h
......@@ -124,6 +127,9 @@ endif()
if(ENABLE_TUNNEL)
list(APPEND LIBS ${TUNNEL_LIBRARIES})
endif()
if(ENABLE_ASSISTANT)
list(APPEND LIBS ${SOUP_LIBRARIES})
endif()
if(WIN32)
list(APPEND LIBS shlwapi)
endif()
......
......@@ -65,6 +65,10 @@ set(SOURCE_FILES
videowindow.c
)
if(ENABLE_ASSISTANT)
list(APPEND SOURCE_FILES setupwizard.c)
endif()
if(GETTEXT_FOUND)
add_definitions("-DENABLE_NLS")
endif()
......@@ -77,6 +81,9 @@ if(ENABLE_NOTIFY)
target_include_directories(linphone-gtk PUBLIC ${NOTIFY_INCLUDE_DIRS})
target_link_libraries(linphone-gtk ${NOTIFY_LIBRARIES})
endif()
if(ENABLE_ASSISTANT)
target_link_libraries(linphone-gtk ${SOUP_LIBRARIES})
endif()
install(TARGETS linphone-gtk
RUNTIME DESTINATION bin
......
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