Skip to content

Commit bc045df

Browse files
authored
Merge pull request #1 from phunkyfish/enable-platforms
Support Android and Linux
2 parents 72a12ac + b1c891b commit bc045df

File tree

88 files changed

+1153
-1233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1153
-1233
lines changed

.travis.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
language: cpp
2+
3+
#
4+
# Define the build matrix
5+
#
6+
# Travis defaults to building on Ubuntu Trusty when building on
7+
# Linux. We need Xenial in order to get up to date versions of
8+
# cmake and g++.
9+
#
10+
env:
11+
global:
12+
- app_id=inputstream.ffmpegdirect
13+
14+
matrix:
15+
include:
16+
- os: linux
17+
dist: xenial
18+
sudo: required
19+
compiler: gcc
20+
- os: linux
21+
dist: xenial
22+
sudo: required
23+
compiler: clang
24+
- os: osx
25+
osx_image: xcode10.2
26+
27+
before_install:
28+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
29+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y yasm; fi
30+
#
31+
# The addon source is automatically checked out in $TRAVIS_BUILD_DIR,
32+
# we'll put the Kodi source on the same level
33+
#
34+
before_script:
35+
- cd $TRAVIS_BUILD_DIR/..
36+
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
37+
- cd ${app_id} && mkdir build && cd build
38+
- mkdir -p definition/${app_id}
39+
- echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt
40+
- cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DADDONS_DEFINITION_DIR=$TRAVIS_BUILD_DIR/build/definition -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons
41+
42+
script: make

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ add_definitions(-DCATCHUP_VERSION=${CATCHUP_VERSION})
9494

9595
build_addon(inputstream.ffmpegdirect CATCHUP DEPLIBS)
9696

97+
set_target_properties(inputstream.ffmpegdirect PROPERTIES LINK_FLAGS "${FFMPEG_LDFLAGS}")
98+
9799
if(CORE_SYSTEM_NAME STREQUAL windowsstore)
98100
# fix linking
99101
set_target_properties(inputstream.ffmpegdirect PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/LTCG /defaultlib:vccorlib.lib /defaultlib:msvcrt.lib")

FindFFMPEG.cmake

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,25 @@ if(NOT ENABLE_INTERNAL_FFMPEG OR KODI_DEPENDSBUILD)
179179
if(FFMPEG_FOUND)
180180
set(FFMPEG_LDFLAGS ${PC_FFMPEG_LDFLAGS} CACHE STRING "ffmpeg linker flags")
181181

182+
set(FFMPEG_LIBRARIES ${FFMPEG_LIBAVCODEC} ${FFMPEG_LIBAVFILTER}
183+
${FFMPEG_LIBAVFORMAT} ${FFMPEG_LIBAVUTIL}
184+
${FFMPEG_LIBSWSCALE} ${FFMPEG_LIBSWRESAMPLE}
185+
${FFMPEG_LIBPOSTPROC} ${FFMPEG_LDFLAGS})
186+
list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VERSION}\")
187+
182188
# check if ffmpeg libs are statically linked
183189
set(FFMPEG_LIB_TYPE SHARED)
184190
foreach(_fflib IN LISTS FFMPEG_LIBRARIES)
185191
if(${_fflib} MATCHES ".+\.a$" AND PC_FFMPEG_STATIC_LDFLAGS)
186192
set(FFMPEG_LDFLAGS ${PC_FFMPEG_STATIC_LDFLAGS} CACHE STRING "ffmpeg linker flags" FORCE)
187193
set(FFMPEG_LIB_TYPE STATIC)
194+
if(NOT APPLE AND NOT WIN32)
195+
set(FFMPEG_LDFLAGS "-Wl,-Bsymbolic ${FFMPEG_LDFLAGS}")
196+
endif()
188197
break()
189198
endif()
190199
endforeach()
191200
192-
set(FFMPEG_LIBRARIES ${FFMPEG_LIBAVCODEC} ${FFMPEG_LIBAVFILTER}
193-
${FFMPEG_LIBAVFORMAT} ${FFMPEG_LIBAVUTIL}
194-
${FFMPEG_LIBSWSCALE} ${FFMPEG_LIBSWRESAMPLE}
195-
${FFMPEG_LIBPOSTPROC} ${FFMPEG_LDFLAGS})
196-
list(APPEND FFMPEG_DEFINITIONS -DFFMPEG_VER_SHA=\"${FFMPEG_VERSION}\")
197-
198201
if(NOT TARGET ffmpeg)
199202
add_library(ffmpeg ${FFMPEG_LIB_TYPE} IMPORTED)
200203
set_target_properties(ffmpeg PROPERTIES

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
buildPlugin(version: "Matrix", deploy: ['osx-x86_64'])
1+
buildPlugin(version: "Matrix", deploy: ['android-aarch64', 'android-arm7', 'ios-aarch64', 'ios-arm7', 'osx-x86_64', 'ubuntu-ppa'])

depends/android/gmp/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
project(gmp)
2+
3+
cmake_minimum_required(VERSION 3.5)
4+
5+
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
6+
7+
include(ExternalProject)
8+
externalproject_add(gmp
9+
SOURCE_DIR ${CMAKE_SOURCE_DIR}
10+
CONFIGURE_COMMAND <SOURCE_DIR>/configure
11+
${COMPILER_WITH_LIBTOOL_SYSROOT_APPLE}
12+
--prefix=${CMAKE_INSTALL_PREFIX}
13+
--disable-shared
14+
--with-pic
15+
${gmp_conf})
16+
17+
install(CODE "Message(Done)")

depends/android/gmp/deps.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
iconv

depends/android/gmp/gmp.sha256

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2

depends/android/gmp/gmp.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gmp http://mirrors.kodi.tv/build-deps/sources/gmp-6.1.2.tar.bz2
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
project(iconv)
3+
4+
include(ExternalProject)
5+
externalproject_add(iconv
6+
SOURCE_DIR ${CMAKE_SOURCE_DIR}
7+
CONFIGURE_COMMAND ./configure --disable-shared --prefix=${OUTPUT_DIR} --enable-extra-encodings --with-pic
8+
BUILD_COMMAND make
9+
INSTALL_COMMAND ""
10+
BUILD_IN_SOURCE 1)
11+
12+
install(CODE "execute_process(COMMAND make install WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})")

depends/android/iconv/iconv.sha256

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04

0 commit comments

Comments
 (0)