Commit 24870818 authored by Ghislain MARY's avatar Ghislain MARY

Add Linphone SDK dependencies as submodules and handle build for Android and iOS.

parent 556ef226
build*
tunnel
[submodule "belle-sip"]
path = belle-sip
url = https://gitlab.linphone.org/BC/public/belle-sip.git
[submodule "cmake-builder"]
path = cmake-builder
url = https://gitlab.linphone.org/BC/public/linphone-cmake-builder.git
[submodule "linphone"]
path = linphone
url = https://gitlab.linphone.org/BC/public/linphone.git
[submodule "bcg729"]
path = bcg729
url = https://gitlab.linphone.org/BC/public/bcg729.git
[submodule "bzrtp"]
path = bzrtp
url = https://gitlab.linphone.org/BC/public/bzrtp.git
[submodule "msamr"]
path = msamr
url = https://gitlab.linphone.org/BC/public/msamr.git
[submodule "msopenh264"]
path = msopenh264
url = https://gitlab.linphone.org/BC/public/msopenh264.git
[submodule "mssilk"]
path = mssilk
url = https://gitlab.linphone.org/BC/public/mssilk.git
[submodule "mswebrtc"]
path = mswebrtc
url = https://gitlab.linphone.org/BC/public/mswebrtc.git
[submodule "belcard"]
path = belcard
url = https://gitlab.linphone.org/BC/public/belcard.git
[submodule "belr"]
path = belr
url = https://gitlab.linphone.org/BC/public/belr.git
[submodule "bctoolbox"]
path = bctoolbox
url = https://gitlab.linphone.org/BC/public/bctoolbox.git
[submodule "bcunit"]
path = bcunit
url = https://gitlab.linphone.org/BC/public/bcunit.git
[submodule "ortp"]
path = ortp
url = https://gitlab.linphone.org/BC/public/ortp.git
[submodule "mediastreamer2"]
path = mediastreamer2
url = https://gitlab.linphone.org/BC/public/mediastreamer2.git
[submodule "mswasapi"]
path = mswasapi
url = https://gitlab.linphone.org/BC/public/mswasapi.git
[submodule "bcmatroska2"]
path = bcmatroska2
url = https://gitlab.linphone.org/BC/public/bcmatroska2.git
[submodule "external/mbedtls"]
path = external/mbedtls
url = https://gitlab.linphone.org/BC/public/external/mbedtls.git
[submodule "external/bv16-floatingpoint"]
path = external/bv16-floatingpoint
url = https://gitlab.linphone.org/BC/public/external/bv16-floatingpoint.git
[submodule "external/speex"]
path = external/speex
url = https://gitlab.linphone.org/BC/public/external/speex.git
[submodule "external/ffmpeg"]
path = external/ffmpeg
url = https://gitlab.linphone.org/BC/public/external/ffmpeg.git
[submodule "external/libvpx"]
path = external/libvpx
url = https://gitlab.linphone.org/BC/public/external/libvpx.git
[submodule "external/opus"]
path = external/opus
url = https://gitlab.linphone.org/BC/public/external/opus.git
[submodule "external/gsm"]
path = external/gsm
url = https://gitlab.linphone.org/BC/public/external/gsm.git
[submodule "external/srtp"]
path = external/srtp
url = https://gitlab.linphone.org/BC/public/external/srtp.git
[submodule "external/libxml2"]
path = external/libxml2
url = https://gitlab.linphone.org/BC/public/external/libxml2.git
[submodule "external/zlib"]
path = external/zlib
url = https://gitlab.linphone.org/BC/public/external/zlib.git
[submodule "external/openh264"]
path = external/openh264
url = https://gitlab.linphone.org/BC/public/external/openh264.git
[submodule "external/libjpeg-turbo"]
path = external/libjpeg-turbo
url = https://gitlab.linphone.org/BC/public/external/libjpeg-turbo.git
[submodule "external/xerces-c"]
path = external/xerces-c
url = https://gitlab.linphone.org/BC/public/external/xerces-c.git
[submodule "external/libxsd"]
path = external/libxsd
url = https://gitlab.linphone.org/BC/public/external/libxsd.git
[submodule "external/soci"]
path = external/soci
url = https://gitlab.linphone.org/BC/public/external/soci.git
[submodule "external/sqlite3"]
path = external/sqlite3
url = https://gitlab.linphone.org/BC/public/external/sqlite3.git
[submodule "external/codec2"]
path = external/codec2
url = https://gitlab.linphone.org/BC/public/external/codec2.git
[submodule "mscodec2"]
path = mscodec2
url = https://gitlab.linphone.org/BC/public/mscodec2.git
[submodule "external/decaf"]
path = external/decaf
url = https://gitlab.linphone.org/BC/public/external/decaf.git
[submodule "external/zxing-cpp"]
path = external/zxing-cpp
url = https://gitlab.linphone.org/BC/public/external/zxing-cpp.git
[submodule "external/vo-amrwbenc"]
path = external/vo-amrwbenc
url = https://gitlab.linphone.org/BC/public/external/vo-amrwbenc.git
[submodule "external/opencore-amr"]
path = external/opencore-amr
url = https://gitlab.linphone.org/BC/public/external/opencore-amr.git
[submodule "lime"]
path = lime
url = https://gitlab.linphone.org/BC/public/lime.git
############################################################################
# CMakeLists.txt
# Copyright (C) 2010-2018 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
cmake_minimum_required(VERSION 3.2)
project(linphone-sdk VERSION 0.0.1 LANGUAGES NONE)
set(LINPHONESDK_DIR "${CMAKE_CURRENT_LIST_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LINPHONESDK_DIR}/cmake")
include(LinphoneSdkUtils)
linphone_sdk_git_submodule_update()
set(LINPHONESDK_PREBUILD_DEPENDENCIES)
if(ENABLE_TUNNEL)
add_custom_target(tunnel-clone
"${CMAKE_COMMAND}" "-DLINPHONESDK_DIR=${LINPHONESDK_DIR}" "-P" "${LINPHONESDK_DIR}/cmake/LinphoneSdkTunnelClone.cmake"
)
list(APPEND LINPHONESDK_PREBUILD_DEPENDENCIES tunnel-clone)
endif()
set(LINPHONESDK_PLATFORM "Android" CACHE STRING "Platform to build")
set_property(CACHE LINPHONESDK_PLATFORM PROPERTY STRINGS "Android" "IOS")
# TODO: This will be deletable once we get rid of cmake-builder
string(TOLOWER "${LINPHONESDK_PLATFORM}" _lowercase_platform)
include(cmake-builder/cmake/LinphoneOptions.cmake)
include(cmake-builder/configs/options-${_lowercase_platform}.cmake)
include(cmake-builder/options/common.cmake)
include(cmake-builder/options/bctoolbox.cmake)
include(cmake-builder/options/bellesip.cmake)
include(cmake-builder/options/ms2.cmake)
include(cmake-builder/options/linphone.cmake)
include(LinphoneSdkPlatform${LINPHONESDK_PLATFORM})
# Give a feature summary
include(FeatureSummary)
feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
if(ENABLE_GPL_THIRD_PARTIES)
message(WARNING "
***************************************************************************
***************************************************************************
***** CAUTION, this Linphone SDK is built using third party GPL code *****
***** Even if you acquired a proprietary license from Belledonne *****
***** Communications, this SDK is GPL and GPL only. *****
***** To disable third party GPL code, set the *****
***** ENABLE_GPL_THIRD_PARTIES option to OFF *****
***************************************************************************
***************************************************************************")
else()
message("
***************************************************************************
***************************************************************************
***** Linphone SDK without third party GPL software *****
***** If you acquired a proprietary license from Belledonne *****
***** Communications, this SDK can be used to create *****
***** a proprietary Linphone-based application. *****
***************************************************************************
***************************************************************************
")
endif()
# linphone-sdk
Meta repository holding all the dependencies to build a full Linphone SDK.
\ No newline at end of file
Meta repository holding all the dependencies to build a full Linphone SDK.
The currently supported platforms are Android and iOS.
## Building and customizing the SDK
The build system is based on CMake, so you need to install it first if you don't have it on your machine.
The steps to build the SDK are:
1. Create and go inside a directory where the SDK will be built:
`mkdir build-android && cd build-android`
2. Execute CMake to configure the project:
`cmake ..`
3. Build the SDK:
`cmake --build . --target sdk`
You can pass some options to CMake at the second step to configure the SDK as you want.
For instance, to build an iOS SDK (the default being Android):
`cmake .. -DLINPHONESDK_PLATFORM=IOS`
## Upgrading your SDK
Simply re-invoking `cmake --build .` in your build directory should update your SDK. If compilation fails, you may need to rebuilding everything by erasing your build directory and restarting your build as explained above.
## Customizing features
The SDK can be customized by passing `-D` options to CMake when configuring the project. If you know the options you want to use, just pass them to CMake.
Otherwise, you can use the `cmake-gui` or `ccmake` commands to configure all the available options interactively.
### Important customization options
Some customization are particularly important:
1. `CMAKE_BUILD_TYPE`: By default it is set to `RelWithDebInfo` to build in release mode keeping the debug information. You might want to set it to `Debug` to ease the debugging.
2. `LINPHONESDK_PLATFORM`: The platform for which you want to build the Linphone SDK. It must be one of: `Android`, `IOS`.
3. `LINPHONESDK_ANDROID_ARCHS`: A comma-separated list of the architectures for which you want to build the Android Linphone SDK for.
4. `LINPHONESDK_IOS_ARCHS`: Same as `LINPHONESDK_ANDROID_ARCHS` but for an iOS build.
5. `LINPHONESDK_IOS_BASE_URL`: The base of the URL that will be used to download the zip file of the SDK.
## Licensing: GPL third parties versus non GPL third parties
This SDK can be generated in 2 flavors:
* GPL third parties enabled means that the Linphone SDK includes GPL third parties like FFmpeg. If you choose this flavor, your final application **must comply with GPL in any case**. This is the default mode.
* NO GPL third parties means that the Linphone SDK will only use non GPL code except for the code from Belledonne Communications. If you choose this flavor, your final application is **still subject to GPL except if you have a [commercial license from Belledonne Communications](http://www.belledonne-communications.com/products.html)**.
To generate the a SDK without GPL third parties, use the `-DENABLE_GPL_THIRD_PARTIES=NO` option when configuring the project.
## Note regarding third party components subject to license
The Linphone SDK is compiled with third parties code that are subject to patent license, especially: AMR, SILK, G729 and H264 codecs.
To build a SDK with any of these features you need to enable the `ENABLE_NON_FREE_CODECS` option.
Before embedding these features in your final application, **make sure to have the right to do so**.
Subproject commit aefc8f6383cea2273a679d2fc6fcfa323999fb85
Subproject commit 7cc7b930af024707b1e7d4a9da4c40c3fa3d4ed7
Subproject commit d3e747b3d0b3f3098d8dee79d24bef034cf8fd16
Subproject commit 8f5e72c3428ad6ff9bfa59da5a83524ff0764fa5
Subproject commit ab5416d66620f32ff6882b6e29dec63203dbca41
Subproject commit 2aafb7f0d699338c3c28bd9accb8097b46ce3cd8
Subproject commit cfad8fcc28c7cdba69684c8e35846711aaa16775
Subproject commit 2dea113f7f1596af94d024008f401899b102b2ab
Subproject commit b2dda64a8faea3849fb2ab3cf5290dbb5d7ac0b7
############################################################################
# CopyLibs.cmake
# Copyright (C) 2010-2018 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
list(APPEND CMAKE_MODULE_PATH "${LINPHONESDK_DIR}/cmake")
include(LinphoneSdkUtils)
linphone_sdk_convert_comma_separated_list_to_cmake_list("${LINPHONESDK_ANDROID_ARCHS}" _archs)
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "remove_directory" "libs"
COMMAND "${CMAKE_COMMAND}" "-E" "remove_directory" "libs-debug"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
foreach(_arch ${_archs})
if(_arch STREQUAL "arm")
set(_libarch "armeabi")
elseif(_arch STREQUAL "armv7")
set(_libarch "armeabi-v7a")
elseif(_arch STREQUAL "arm64")
set(_libarch "arm64-v8a")
elseif(_arch STREQUAL "x86")
set(_libarch "x86")
elseif(_arch STREQUAL "x86_64")
set(_libarch "x86_64")
else()
message(FATAL_ERROR "Unknown architecture ${_arch}")
endif()
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "libs/${_libarch}"
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "libs-debug/${_libarch}"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
file(GLOB _libs "linphone-sdk/android-${_arch}/lib/lib*.so")
file(GLOB _plugins "linphone-sdk/android-${_arch}/lib/mediastreamer/plugins/*.so")
foreach(_lib ${_libs})
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${_lib}" "libs/${_libarch}/"
COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${_lib}" "libs-debug/${_libarch}/"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
endforeach()
foreach(_plugin ${_plugins})
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${_plugin}" "libs/${_libarch}/"
COMMAND "${CMAKE_COMMAND}" "-E" "copy" "${_plugin}" "libs-debug/${_libarch}/"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
endforeach()
execute_process(
COMMAND "sh" "WORK/android-${_arch}/strip.sh" "libs/${_libarch}/*.so"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
endforeach()
############################################################################
# GenerateSDK.cmake
# Copyright (C) 2010-2018 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
execute_process(
COMMAND "${LINPHONESDK_DIR}/cmake/Android/gradlew" "assembleDebug"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
execute_process(
COMMAND "${LINPHONESDK_DIR}/cmake/Android/gradlew" "-q" "sdkZip"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
############################################################################
# GradleClean.cmake
# Copyright (C) 2010-2018 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
configure_file("${LINPHONESDK_DIR}/cmake/Android/gradle/build.gradle.cmake" "${LINPHONESDK_BUILD_DIR}/build.gradle" @ONLY)
configure_file("${LINPHONESDK_DIR}/cmake/Android/gradle/gradle.properties.cmake" "${LINPHONESDK_BUILD_DIR}/gradle.properties" @ONLY)
configure_file("${LINPHONESDK_DIR}/cmake/Android/gradle/LinphoneSdkManifest.xml.cmake" "${LINPHONESDK_BUILD_DIR}/LinphoneSdkManifest.xml" @ONLY)
execute_process(
COMMAND "${LINPHONESDK_DIR}/cmake/Android/gradlew" "clean"
WORKING_DIRECTORY "${LINPHONESDK_BUILD_DIR}"
)
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.linphone.sdk"
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="4001"
android:versionName="4.0.0">
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="28"/>
</manifest>
// Signing APK Release
RELEASE_STORE_FILE=""
RELEASE_STORE_PASSWORD=
RELEASE_KEY_ALIAS=
RELEASE_KEY_PASSWORD=
#source:https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory
org.gradle.jvmargs=-Xmx2g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#Wed May 16 15:22:42 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
############################################################################
# GenerateSDK.cmake
# Copyright (C) 2010-2018 Belledonne Communications, Grenoble France
#
############################################################################