Commit e39eb031 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Handle build of the Python module with the openh264 mediastreamer plugin.

parent fa359973
......@@ -22,7 +22,7 @@
set(EP_linphone_GIT_REPOSITORY "git://git.linphone.org/linphone.git")
set(EP_linphone_GIT_TAG_LATEST "master")
set(EP_linphone_GIT_TAG "86b74cc52117ee2ca13fc3a871915def10c7a921")
set(EP_linphone_GIT_TAG "75bfeeba882afcac510c43ecca88fb9aa8f115fb")
set(EP_linphone_CMAKE_OPTIONS )
set(EP_linphone_LINKING_TYPE "-DENABLE_STATIC=NO")
......
......@@ -22,7 +22,7 @@
set(EP_msopenh264_GIT_REPOSITORY "git://git.linphone.org/msopenh264.git")
set(EP_msopenh264_GIT_TAG_LATEST "master")
set(EP_msopenh264_GIT_TAG "e58cda7e1dc4bd9001d3cd4cd57b4cdc5dce6178")
set(EP_msopenh264_GIT_TAG "9b14c29cdc54e8a9434b345d3b0c3d099cbba3f2")
set(EP_msopenh264_CMAKE_OPTIONS )
if(APPLE)
......
......@@ -108,6 +108,19 @@ if(UNIX AND NOT APPLE)
list(APPEND EP_ms2_CMAKE_OPTIONS "-DENABLE_ALSA=YES" "-DENABLE_PULSEAUDIO=NO" "-DENABLE_OSS=NO" "-DENABLE_GLX=NO" "-DENABLE_X11=YES" "-DENABLE_XV=YES")
endif()
# msopenh264
set(EP_msopenh264_LINKING_TYPE "-DENABLE_STATIC=YES")
# openh264
set(EP_openh264_LINKING_TYPE "-static")
if (APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86_64\"")
else()
set(EP_openh264_ADDITIONAL_OPTIONS "ARCH=\"x86\"")
endif()
endif()
# opus
if(NOT MSVC)
# TODO: Also build statically on windows
......@@ -150,5 +163,5 @@ ExternalProject_Add(TARGET_pylinphone
DOWNLOAD_COMMAND ""
PATCH_COMMAND "${CMAKE_COMMAND}" "-E" "copy_directory" "${CMAKE_CURRENT_LIST_DIR}/python" "<SOURCE_DIR>"
CMAKE_GENERATOR ${CMAKE_GENERATOR}
CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS}
CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DENABLE_OPENH264:BOOL=${ENABLE_OPENH264}
)
......@@ -21,7 +21,7 @@
############################################################################
cmake_minimum_required(VERSION 2.8.12)
project(PYLINPHONE C) # Dummy project
project(PYLINPHONE C CXX) # Dummy project
if(APPLE)
set(PLATFORM_ARCH_NAME "${CMAKE_OSX_ARCHITECTURES}")
......@@ -116,8 +116,15 @@ if(UNIX)
endif()
add_library(pylinphone MODULE "${SOURCE_FILENAME}")
if(ENABLE_OPENH264)
find_library(MSOPENH264_LIBRARY msopenh264 HINTS "${CMAKE_INSTALL_PREFIX}/lib/mediastreamer/plugins")
find_library(OPENH264_LIBRARY openh264)
target_compile_definitions(pylinphone PRIVATE "ENABLE_OPENH264=1")
target_link_libraries(pylinphone ${MSOPENH264_LIBRARY} ${OPENH264_LIBRARY})
endif()
target_compile_options(pylinphone PUBLIC ${LINPHONE_CPPFLAGS})
target_include_directories(pylinphone PUBLIC ${LINPHONE_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS} PRIVATE "${LINPHONE_SOURCE_DIR}/coreapi" "${LINPHONE_SOURCE_DIR}/include")
set_target_properties(pylinphone PROPERTIES LINKER_LANGUAGE CXX)
set(PYLINPHONE_LINK_LIBRARIES ${LINPHONE_LIBRARIES})
if(WIN32)
find_library(GCC_LIBRARIES gcc)
......
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