Commit 6804a61c authored by jehan's avatar jehan Committed by jehan

Add option ENABLE_EMBEDDED_OPENH264 from Android build to desktop

parent 5df438bd
......@@ -24,8 +24,8 @@ if(EXISTS ${INSTALL_PREFIX}/bin/openh264.dll AND NOT EXISTS ${INSTALL_PREFIX}/li
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${SOURCE_DIR}/cmake/importlib.py" "${INSTALL_PREFIX}/bin/openh264.dll" "${INSTALL_PREFIX}/lib/openh264.lib")
endif()
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.1.dylib)
execute_process(COMMAND install_name_tool -id @rpath/libopenh264.1.dylib ${INSTALL_PREFIX}/lib/libopenh264.1.dylib)
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.4.dylib)
execute_process(COMMAND install_name_tool -id @rpath/libopenh264.4.dylib ${INSTALL_PREFIX}/lib/libopenh264.4.dylib)
endif()
file(GLOB OPENH264_LIBS "${INSTALL_PREFIX}/lib/libopenh264.*.dylib")
......@@ -38,6 +38,14 @@ foreach(OPENH264_LIB IN LISTS ${OPENH264_LIBS})
execute_process(COMMAND install_name_tool -id ${OPENH264_LIB_ID} ${OPENH264_LIB})
endforeach()
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.a AND TOOLCHAIN_RANLIB)
execute_process(COMMAND "${TOOLCHAIN_RANLIB}" "${INSTALL_PREFIX}/lib/libopenh264.a")
if(EXISTS ${INSTALL_PREFIX}/lib/libopenh264.a)
if (TOOLCHAIN_RANLIB)
execute_process(COMMAND "${TOOLCHAIN_RANLIB}" "${INSTALL_PREFIX}/lib/libopenh264.a")
message (STATUS "ranlib done with TOOLCHAIN_RANLIB = ${TOOLCHAIN_RANLIB} on ${INSTALL_PREFIX}/lib/libopenh264.a")
elseif (CMAKE_RANLIB)
execute_process(COMMAND "${CMAKE_RANLIB}" "${INSTALL_PREFIX}/lib/libopenh264.a")
message (STATUS "ranlib done with CMAKE_RANLIB = ${CMAKE_RANLIB} on ${INSTALL_PREFIX}/lib/libopenh264.a")
else()
message(FATAL_ERROR "No ranlib tool defined, cannot postinstall ${INSTALL_PREFIX}/lib/libopenh264.a")
endif()
endif()
......@@ -862,7 +862,7 @@ macro(linphone_builder_add_external_project PROJNAME)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/postinstall.cmake)
ExternalProject_Add_Step(EP_${PROJNAME} postinstall
COMMAND ${CMAKE_COMMAND} -DTOOLCHAIN_RANLIB=${TOOLCHAIN_RANLIB} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DINSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/postinstall.cmake
COMMAND ${CMAKE_COMMAND} -DTOOLCHAIN_RANLIB=${TOOLCHAIN_RANLIB} -DCMAKE_RANLIB=${CMAKE_RANLIB} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DINSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_SOURCE_DIR}/builders/${PROJNAME}/postinstall.cmake
COMMENT "Performing post-installation for 'EP_${PROJNAME}'"
DEPENDEES install
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
......
......@@ -125,7 +125,8 @@ if(ENABLE_STATIC_ONLY)
# polarssl
lcb_builder_linking_type(polarssl "-DUSE_SHARED_POLARSSL_LIBRARY=0")
else()
endif()
if(NOT ENABLE_STATIC_ONLY AND NOT ENABLE_EMBEDDED_OPENH264)
# openh264
lcb_builder_linking_type(openh264 "-shared")
endif()
......
......@@ -19,6 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
lcb_add_dependent_option("Embedded OpenH264" "Embed the openh264 library instead of downloading it from Cisco." "${DEFAULT_VALUE_ENABLE_EMBEDDED_OPENH264}" "ENABLE_OPENH264" OFF)
# Define default values for the linphone builder options
set(DEFAULT_VALUE_ENABLE_ADVANCED_IM ON)
......
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