Commit f6e9cb2a authored by jehan's avatar jehan

add option STATIC_ONLY to linphone-desktop

parent ed874842
......@@ -19,8 +19,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
if (ENABLE_STATIC_ONLY)
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_SHARED=NO" "-DENABLE_STATIC=YES")
else()
set(DEFAULT_VALUE_CMAKE_LINKING_TYPE "-DENABLE_SHARED=YES" "-DENABLE_STATIC=NO")
endif()
# Global configuration
if(APPLE)
......@@ -102,8 +105,19 @@ if(NOT WIN32)
set(EP_opencoreamr_EXTRA_LDFLAGS "${EP_opencoreamr_EXTRA_LDFLAGS} -fPIC")
endif()
# openh264
set(EP_openh264_LINKING_TYPE "-shared")
if (ENABLE_STATIC_ONLY)
# ffmpeg
set(EP_ffmpeg_LINKING_TYPE "--enable-static" "--disable-shared" "--enable-pic")
# mbedtls
set(EP_mbedtls_LINKING_TYPE "-DUSE_STATIC_MBEDTLS_LIBRARY=YES" "-DUSE_SHARED_MBEDTLS_LIBRARY=NO")
# polarssl
set(EP_polarssl_LINKING_TYPE "-DUSE_SHARED_POLARSSL_LIBRARY=0")
else()
# openh264
set(EP_openh264_LINKING_TYPE "-shared")
endif()
# voamrwbenc
if(NOT WIN32)
......
......@@ -37,6 +37,7 @@ set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI OFF)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_STATIC_ONLY FALSE)
message(STATUS "Buiding for Raspberry PI ${RASPBERRY_VERSION}")
......
......@@ -37,6 +37,7 @@ set(DEFAULT_VALUE_ENABLE_VIDEO ON)
set(DEFAULT_VALUE_ENABLE_VPX ON)
set(DEFAULT_VALUE_ENABLE_WASAPI ON)
set(DEFAULT_VALUE_ENABLE_ZRTP ON)
set(DEFAULT_VALUE_STATIC_ONLY FALSE)
include(configs/config-desktop-common.cmake)
......
......@@ -33,3 +33,5 @@ if(UNIX AND NOT IOS)
option(ENABLE_RELATIVE_PREFIX "liblinphone and mediastreamer will look for their respective ressources relatively to their location." OFF)
add_feature_info("Relative prefix" ENABLE_RELATIVE_PREFIX "liblinphone and mediastreamer will look for their respective ressources relatively to their location.")
endif()
option(ENABLE_STATIC_ONLY "Enable compilation of libraries in static mode" ${DEFAULT_VALUE_ENABLE_STATIC_ONLY})
add_feature_info("Static only" ENABLE_STATIC_ONLY "Enable compilation of libraries in static mode.")
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