diff --git a/.travis.yml b/.travis.yml index 46add12..1cb6b67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,28 +7,24 @@ language: cpp # Linux. We need Trusty in order to get up to date versions of # cmake and g++. # +env: + global: + - app_id=pvr.octonet + matrix: include: - os: linux - dist: trusty + dist: xenial sudo: required compiler: gcc - os: linux - dist: trusty + dist: xenial sudo: required compiler: clang - os: osx - osx_image: xcode7.3 + osx_image: xcode9 - os: osx - osx_image: xcode6.1 - -# -# Some of the OS X images don't have cmake, contrary to what people -# on the Internet say -# -before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which cmake || brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then which cmake || brew install cmake ; fi + osx_image: xcode9.4 # # The addon source is automatically checked out in $TRAVIS_BUILD_DIR, @@ -37,9 +33,9 @@ before_install: before_script: - cd $TRAVIS_BUILD_DIR/.. - git clone --branch Leia --depth=1 https://github.com/xbmc/xbmc.git - - mkdir -p xbmc/cmake/addons/addons/pvr.octonet - - echo "pvr.octonet https://github.com/DigitalDevices/pvr.octonet master" > xbmc/cmake/addons/addons/pvr.octonet/pvr.octonet.txt - - cd $TRAVIS_BUILD_DIR && mkdir build && cd build - - cmake -DADDONS_TO_BUILD=pvr.octonet -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons + - cd ${app_id} && mkdir build && cd build + - mkdir -p definition/${app_id} + - echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt + - 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 script: make diff --git a/CMakeLists.txt b/CMakeLists.txt index 8482976..b59c362 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,7 @@ +cmake_minimum_required(VERSION 3.5) project(pvr.octonet) -cmake_minimum_required(VERSION 2.6) - list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) -enable_language(CXX) find_package(Kodi REQUIRED) find_package(kodiplatform REQUIRED) @@ -13,7 +11,7 @@ find_package(JsonCpp REQUIRED) include_directories( ${kodiplatform_INCLUDE_DIRS} ${p8-platform_INCLUDE_DIRS} - ${KODI_INCLUDE_DIR} + ${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways ${JSONCPP_INCLUDE_DIRS}) set(DEPLIBS diff --git a/depends/common/jsoncpp/CMakeLists.txt b/depends/common/jsoncpp/CMakeLists.txt index b43dafc..a26585e 100644 --- a/depends/common/jsoncpp/CMakeLists.txt +++ b/depends/common/jsoncpp/CMakeLists.txt @@ -1,7 +1,6 @@ +cmake_minimum_required(VERSION 3.5) project(jsoncpp) -cmake_minimum_required(VERSION 3.1) -enable_language(CXX) SET(CMAKE_CXX_STANDARD 11) SET(CMAKE_CXX_STANDARD_REQUIRED ON) SET(CMAKE_CXX_EXTENSIONS OFF) diff --git a/pvr.octonet/addon.xml.in b/pvr.octonet/addon.xml.in index 80957b2..3e4b876 100644 --- a/pvr.octonet/addon.xml.in +++ b/pvr.octonet/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@ diff --git a/src/Socket.cpp b/src/Socket.cpp index 9f687a2..fec6bd9 100644 --- a/src/Socket.cpp +++ b/src/Socket.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . * */ -#include "libXBMC_addon.h" +#include "kodi/libXBMC_addon.h" #include #include "p8-platform/os.h" #include "client.h" diff --git a/src/client.cpp b/src/client.cpp index f2e5a9e..e016711 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -21,10 +21,10 @@ */ #include "client.h" -#include -#include +#include +#include #include -#include +#include #include "OctonetData.h" #include "rtsp_client.hpp" diff --git a/src/client.h b/src/client.h index 15f7177..ce9bdfd 100644 --- a/src/client.h +++ b/src/client.h @@ -21,8 +21,8 @@ * */ -#include "libXBMC_addon.h" -#include "libXBMC_pvr.h" +#include "kodi/libXBMC_addon.h" +#include "kodi/libXBMC_pvr.h" #ifndef __func__ #define __func__ __FUNCTION__ diff --git a/src/rtsp_client.cpp b/src/rtsp_client.cpp index e0123a9..fee28c0 100644 --- a/src/rtsp_client.cpp +++ b/src/rtsp_client.cpp @@ -5,7 +5,7 @@ #include "Socket.h" #include "client.h" #include -#include +#include #include #include diff --git a/src/rtsp_client.hpp b/src/rtsp_client.hpp index 04ced37..9538766 100644 --- a/src/rtsp_client.hpp +++ b/src/rtsp_client.hpp @@ -2,7 +2,7 @@ #define _RTSP_CLIENT_HPP_ #include -#include +#include bool rtsp_open(const std::string& name, const std::string& url_str); void rtsp_close();