Commit 7c50bf51 authored by Ghislain MARY's avatar Ghislain MARY

Add option to enable/disable GTK UI.

parent f5f3487b
......@@ -40,6 +40,7 @@ if(MSVC)
endif()
set(EP_linphone_CMAKE_OPTIONS
"-DENABLE_GTK_UI=${ENABLE_GTK_UI}"
"-DENABLE_VIDEO=${ENABLE_VIDEO}"
"-DENABLE_DEBUG_LOGS=${ENABLE_DEBUG_LOGS}"
"-DENABLE_DOC=${ENABLE_DOC}"
......
......@@ -81,7 +81,6 @@ set(EP_ffmpeg_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......
......@@ -59,7 +59,6 @@ linphone_builder_add_cmake_option(bzrtp "-DENABLE_TESTS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......
############################################################################
# config-desktop.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.
#
############################################################################
# Global configuration
if(APPLE)
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET) #is it still useful?
#without instruction chose to target lower version between current machine and current used SDK
execute_process(COMMAND sw_vers -productVersion COMMAND awk -F \\. "{printf \"%i.%i\",$1,$2}" RESULT_VARIABLE sw_vers_version OUTPUT_VARIABLE CURRENT_OSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcrun --sdk macosx --show-sdk-version RESULT_VARIABLE xcrun_sdk_version OUTPUT_VARIABLE CURRENT_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${CURRENT_OSX_VERSION} VERSION_LESS ${CURRENT_SDK_VERSION})
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CURRENT_OSX_VERSION})
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CURRENT_SDK_VERSION})
endif()
endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.8")
# Resolve conflict between c++ libraries when building C++11 libraries on Mac OS X 10.7
set(LINPHONE_BUILDER_CXXFLAGS "-stdlib=libc++")
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(LINPHONE_BUILDER_HOST "x86_64-apple-darwin")
else()
set(CMAKE_OSX_ARCHITECTURES "i386")
set(LINPHONE_BUILDER_HOST "i686-apple-darwin")
endif()
set(CMAKE_MACOSX_RPATH 1)
endif()
if(WIN32)
set(LINPHONE_BUILDER_CPPFLAGS "-D_WIN32_WINNT=0x0600 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS")
if(MSVC AND MSVC_VERSION GREATER 1600) # Visual Studio 2010 defines this macro itself
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -D_ALLOW_KEYWORD_MACROS")
endif()
endif()
# Adjust PKG_CONFIG_PATH to include install directory
if(NOT LINPHONE_BUILDER_PKG_CONFIG_PATH)
if(UNIX)
set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/:$ENV{PKG_CONFIG_PATH}:/usr/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/:/usr/share/pkgconfig/:/usr/local/lib/pkgconfig/:/opt/local/lib/pkgconfig/")
else() # Windows
set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/")
endif()
endif()
include(GNUInstallDirs)
if(NOT CMAKE_INSTALL_RPATH)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" _IS_SYSTEM_DIR)
if(_IS_SYSTEM_DIR STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
if(NOT CMAKE_INSTALL_LIBDIR STREQUAL "lib")
list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
endif()
endif()
# Include builders
include(builders/CMakeLists.txt)
# linphone
if(WIN32)
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
else()
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
endif()
# ms2
if(WIN32)
linphone_builder_add_cmake_option(ms2 "-DENABLE_RELATIVE_PREFIX=YES")
else()
linphone_builder_add_cmake_option(ms2 "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
endif()
# opencoreamr
if(NOT WIN32)
set(EP_opencoreamr_EXTRA_CFLAGS "${EP_opencoreamr_EXTRA_CFLAGS} -fPIC")
set(EP_opencoreamr_EXTRA_CXXFLAGS "${EP_opencoreamr_EXTRA_CXXFLAGS} -fPIC")
set(EP_opencoreamr_EXTRA_LDFLAGS "${EP_opencoreamr_EXTRA_LDFLAGS} -fPIC")
endif()
# openh264
set(EP_openh264_LINKING_TYPE "-shared")
# voamrwbenc
if(NOT WIN32)
set(EP_voamrwbenc_EXTRA_CFLAGS "${EP_voamrwbenc_EXTRA_CFLAGS} -fPIC")
set(EP_voamrwbenc_EXTRA_CXXFLAGS "${EP_voamrwbenc_EXTRA_CXXFLAGS} -fPIC")
set(EP_voamrwbenc_EXTRA_LDFLAGS "${EP_voamrwbenc_EXTRA_LDFLAGS} -fPIC")
endif()
# vpx
if(WIN32)
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
endif()
......@@ -20,15 +20,31 @@
#
############################################################################
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_BV16 ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG ON)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_GTK_UI OFF)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
set(DEFAULT_VALUE_ENABLE_SPEEX ON)
set(DEFAULT_VALUE_ENABLE_SRTP ON)
set(DEFAULT_VALUE_ENABLE_UNIT_TESTS ON)
set(DEFAULT_VALUE_ENABLE_VCARD ON)
set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI OFF)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
get_filename_component(COMPILER_NAME ${CMAKE_C_COMPILER} NAME)
string(REGEX REPLACE "-gcc$" "" LINPHONE_BUILDER_HOST ${COMPILER_NAME})
unset(COMPILER_NAME)
set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/:${SYSROOT_PATH}/usr/lib/pkgconfig")
include("configs/config-desktop.cmake")
set(DEFAULT_VALUE_ENABLE_WASAPI OFF)
include("configs/config-desktop-common.cmake")
# ffmpeg
set(EP_ffmpeg_CROSS_COMPILATION_OPTIONS
......@@ -39,9 +55,6 @@ set(EP_ffmpeg_CROSS_COMPILATION_OPTIONS
"--target-os=linux"
)
# linphone
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
# opus
linphone_builder_add_cmake_option(opus "-DENABLE_FIXED_POINT=YES")
......
......@@ -25,6 +25,7 @@ set(DEFAULT_VALUE_ENABLE_BV16 ON)
set(DEFAULT_VALUE_ENABLE_FFMPEG ON)
set(DEFAULT_VALUE_ENABLE_GPL_THIRD_PARTIES ON)
set(DEFAULT_VALUE_ENABLE_GSM ON)
set(DEFAULT_VALUE_ENABLE_GTK_UI ON)
set(DEFAULT_VALUE_ENABLE_MBEDTLS ON)
set(DEFAULT_VALUE_ENABLE_MKV ON)
set(DEFAULT_VALUE_ENABLE_OPUS ON)
......@@ -37,99 +38,8 @@ set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_STATIC=NO")
# Global configuration
if(APPLE)
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET) #is it still useful?
#without instruction chose to target lower version between current machine and current used SDK
execute_process(COMMAND sw_vers -productVersion COMMAND awk -F \\. "{printf \"%i.%i\",$1,$2}" RESULT_VARIABLE sw_vers_version OUTPUT_VARIABLE CURRENT_OSX_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND xcrun --sdk macosx --show-sdk-version RESULT_VARIABLE xcrun_sdk_version OUTPUT_VARIABLE CURRENT_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${CURRENT_OSX_VERSION} VERSION_LESS ${CURRENT_SDK_VERSION})
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CURRENT_OSX_VERSION})
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET ${CURRENT_SDK_VERSION})
endif()
endif()
if(CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.8")
# Resolve conflict between c++ libraries when building C++11 libraries on Mac OS X 10.7
set(LINPHONE_BUILDER_CXXFLAGS "-stdlib=libc++")
endif()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(LINPHONE_BUILDER_HOST "x86_64-apple-darwin")
else()
set(CMAKE_OSX_ARCHITECTURES "i386")
set(LINPHONE_BUILDER_HOST "i686-apple-darwin")
endif()
set(CMAKE_MACOSX_RPATH 1)
endif()
if(WIN32)
set(LINPHONE_BUILDER_CPPFLAGS "-D_WIN32_WINNT=0x0600 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS")
if(MSVC AND MSVC_VERSION GREATER 1600) # Visual Studio 2010 defines this macro itself
set(LINPHONE_BUILDER_CPPFLAGS "${LINPHONE_BUILDER_CPPFLAGS} -D_ALLOW_KEYWORD_MACROS")
endif()
endif()
# Adjust PKG_CONFIG_PATH to include install directory
if(NOT LINPHONE_BUILDER_PKG_CONFIG_PATH)
if(UNIX)
set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/:$ENV{PKG_CONFIG_PATH}:/usr/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/:/usr/share/pkgconfig/:/usr/local/lib/pkgconfig/:/opt/local/lib/pkgconfig/")
else() # Windows
set(LINPHONE_BUILDER_PKG_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/")
endif()
endif()
include(GNUInstallDirs)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" _IS_SYSTEM_DIR)
if(_IS_SYSTEM_DIR STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
if(NOT CMAKE_INSTALL_LIBDIR STREQUAL "lib")
list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
endif()
# Include builders
include(builders/CMakeLists.txt)
# linphone
if(WIN32)
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
else()
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
endif()
# ms2
if(WIN32)
linphone_builder_add_cmake_option(ms2 "-DENABLE_RELATIVE_PREFIX=YES")
else()
linphone_builder_add_cmake_option(ms2 "-DENABLE_RELATIVE_PREFIX=${ENABLE_RELATIVE_PREFIX}")
endif()
# opencoreamr
if(NOT WIN32)
set(EP_opencoreamr_EXTRA_CFLAGS "${EP_opencoreamr_EXTRA_CFLAGS} -fPIC")
set(EP_opencoreamr_EXTRA_CXXFLAGS "${EP_opencoreamr_EXTRA_CXXFLAGS} -fPIC")
set(EP_opencoreamr_EXTRA_LDFLAGS "${EP_opencoreamr_EXTRA_LDFLAGS} -fPIC")
endif()
# openh264
set(EP_openh264_LINKING_TYPE "-shared")
# voamrwbenc
if(NOT WIN32)
set(EP_voamrwbenc_EXTRA_CFLAGS "${EP_voamrwbenc_EXTRA_CFLAGS} -fPIC")
set(EP_voamrwbenc_EXTRA_CXXFLAGS "${EP_voamrwbenc_EXTRA_CXXFLAGS} -fPIC")
set(EP_voamrwbenc_EXTRA_LDFLAGS "${EP_voamrwbenc_EXTRA_LDFLAGS} -fPIC")
endif()
# vpx
if(WIN32)
set(EP_vpx_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
endif()
include(configs/config-desktop-common.cmake)
# Install GTK and intltool for build with Visual Studio
......
......@@ -72,7 +72,6 @@ set(EP_ffmpeg_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_UPNP=NO")
......
......@@ -83,7 +83,6 @@ set(EP_ffmpeg_LINKING_TYPE "--disable-static" "--enable-shared")
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......
......@@ -72,7 +72,6 @@ set(EP_gsm_LINKING_TYPE "-DENABLE_STATIC=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......
......@@ -55,7 +55,6 @@ include(builders/CMakeLists.txt)
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......
......@@ -44,7 +44,6 @@ include(builders/CMakeLists.txt)
linphone_builder_add_cmake_option(linphone "-DENABLE_RELATIVE_PREFIX=YES")
linphone_builder_add_cmake_option(linphone "-DENABLE_CONSOLE_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_DAEMON=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_GTK_UI=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_NOTIFY=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TOOLS=NO")
linphone_builder_add_cmake_option(linphone "-DENABLE_TUTORIALS=NO")
......
......@@ -22,6 +22,8 @@
# Linphone build options
option(ENABLE_GTK_UI "Enable the GTK user interface of Linphone." ${DEFAULT_VALUE_ENABLE_GTK_UI})
add_feature_info("GTK" ENABLE_GTK_UI "Enable the GTK user interface of Linphone.")
option(ENABLE_NLS "Enable internationalization of Linphone and Liblinphone." ON)
add_feature_info("NLS" ENABLE_NLS "Enable internationalization of Linphone and Liblinphone. (Only for the desktop target)")
option(ENABLE_VCARD "Enable vCard 4 support in Linphone and Liblinphone." ${DEFAULT_VALUE_ENABLE_VCARD})
......
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