Skip to content

Commit

Permalink
Merge pull request #127 from AlwinEsch/Matrix-change
Browse files Browse the repository at this point in the history
[Matrix] update CMakeLists.txt to 3.5, remove one -fPIC use and change include way
  • Loading branch information
AlwinEsch committed Sep 21, 2019
2 parents 4bdf7f3 + 1301f30 commit ea4f292
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 34 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Expand Up @@ -22,9 +22,7 @@ matrix:
sudo: required
compiler: clang
- os: osx
osx_image: xcode9
- os: osx
osx_image: xcode9.4
osx_image: xcode10.2

#
# The addon source is automatically checked out in $TRAVIS_BUILD_DIR,
Expand Down
11 changes: 6 additions & 5 deletions CMakeLists.txt
@@ -1,23 +1,24 @@
cmake_minimum_required(VERSION 3.5)
project(pvr.stalker)

cmake_minimum_required(VERSION 2.6)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})

enable_language(CXX)

find_package(Kodi REQUIRED)
find_package(p8-platform REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(JsonCpp REQUIRED)

include_directories(
${p8-platform_INCLUDE_DIRS}
${KODI_INCLUDE_DIR}
${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways
${PROJECT_SOURCE_DIR}/lib
${LIBXML2_INCLUDE_DIR}
${JSONCPP_INCLUDE_DIRS})

if(WIN32)
add_compile_options(/wd4996)
endif()

add_subdirectory(lib/libstalkerclient)

set(DEPLIBS
Expand Down
14 changes: 7 additions & 7 deletions FindJsonCpp.cmake
@@ -1,15 +1,15 @@
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules (JSONCPP jsoncpp)
pkg_check_modules(PC_JSONCPP jsoncpp)
endif()

if(NOT JSONCPP_FOUND)
find_path(JSONCPP_INCLUDE_DIRS json/json.h
PATH_SUFFIXES jsoncpp)
find_library(JSONCPP_LIBRARIES jsoncpp)
endif()
find_path(JSONCPP_INCLUDE_DIRS json/json.h
PATHS ${PC_JSONCPP_INCLUDEDIR}
PATH_SUFFIXES jsoncpp)
find_library(JSONCPP_LIBRARIES jsoncpp
PATHS ${PC_JSONCPP_LIBDIR})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JsonCpp DEFAULT_MSG JSONCPP_LIBRARIES JSONCPP_INCLUDE_DIRS)
find_package_handle_standard_args(JsonCpp REQUIRED_VARS JSONCPP_LIBRARIES JSONCPP_INCLUDE_DIRS)

mark_as_advanced(JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES)
9 changes: 5 additions & 4 deletions README.md
@@ -1,8 +1,9 @@
[![Build Status](https://travis-ci.org/kodi-pvr/pvr.stalker.svg?branch=master)](https://travis-ci.org/kodi-pvr/pvr.stalker)
[![Build Status](https://travis-ci.org/kodi-pvr/pvr.stalker.svg?branch=Matrix)](https://travis-ci.org/kodi-pvr/pvr.stalker/branches)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/kodi-pvr/pvr.stalker?branch=Matrix&svg=true)](https://ci.appveyor.com/project/kodi-pvr/pvr-dvblink?branch=Matrix)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/5120/badge.svg)](https://scan.coverity.com/projects/5120)

# Stalker PVR
Stalker Middleware PVR client addon for [Kodi] (http://kodi.tv)
Stalker Middleware PVR client addon for [Kodi] (https://kodi.tv)

## Build instructions

Expand All @@ -16,5 +17,5 @@ Stalker Middleware PVR client addon for [Kodi] (http://kodi.tv)

##### Useful links

* [Kodi's PVR user support] (http://forum.kodi.tv/forumdisplay.php?fid=167)
* [Kodi's PVR development support] (http://forum.kodi.tv/forumdisplay.php?fid=136)
* [Kodi's PVR user support] (https://forum.kodi.tv/forumdisplay.php?fid=167)
* [Kodi's PVR development support] (https://forum.kodi.tv/forumdisplay.php?fid=136)
33 changes: 33 additions & 0 deletions appveyor.yml
@@ -0,0 +1,33 @@
version: BuildNr.{build}

image: Visual Studio 2017

shallow_clone: true

clone_folder: c:\projects\pvr.stalker

environment:
app_id: pvr.stalker

matrix:
- GENERATOR: "Visual Studio 15"
CONFIG: Release
- GENERATOR: "Visual Studio 15 Win64"
CONFIG: Release
- GENERATOR: "Visual Studio 15 Win64"
CONFIG: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"
- GENERATOR: "Visual Studio 15 ARM"
CONFIG: Release
WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0"

build_script:
- cd ..
- git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git
- cd %app_id%
- mkdir build
- cd build
- mkdir -p definition\%app_id%
- echo %app_id% %APPVEYOR_BUILD_FOLDER% %APPVEYOR_REPO_COMMIT% > definition\%app_id%\%app_id%.txt
- cmake -T host=x64 -G "%GENERATOR%" %WINSTORE% -DADDONS_TO_BUILD=%app_id% -DCMAKE_BUILD_TYPE=%CONFIG% -DADDONS_DEFINITION_DIR=%APPVEYOR_BUILD_FOLDER%/build/definition -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
- cmake --build . --config %CONFIG% --target %app_id%
7 changes: 5 additions & 2 deletions 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)
Expand All @@ -12,6 +11,10 @@ set(SOURCES src/lib_json/json_reader.cpp

include_directories(${PROJECT_SOURCE_DIR}/include)

if(WIN32)
add_compile_options(/wd4996)
endif()

add_library(jsoncpp ${SOURCES})

install(TARGETS jsoncpp DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
Expand Down
10 changes: 2 additions & 8 deletions lib/libstalkerclient/CMakeLists.txt
@@ -1,9 +1,6 @@
cmake_minimum_required(VERSION 3.5)
project(stalkerclient)

cmake_minimum_required(VERSION 2.6)

enable_language(C)

find_package(ZLIB REQUIRED)
find_package(LibXml2 REQUIRED)

Expand All @@ -22,7 +19,4 @@ set(LIBSTALKER_SOURCES

add_library(stalkerclient STATIC ${LIBSTALKER_SOURCES})
target_link_libraries(stalkerclient ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES})

if (NOT WIN32)
set_target_properties(stalkerclient PROPERTIES COMPILE_FLAGS "-fPIC")
endif ()
set_property(TARGET stalkerclient PROPERTY POSITION_INDEPENDENT_CODE ON)
2 changes: 1 addition & 1 deletion pvr.stalker/addon.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.stalker"
version="4.1.0"
version="4.1.1"
name="Stalker Client"
provider-name="Jamal Edey">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
7 changes: 7 additions & 0 deletions pvr.stalker/changelog.txt
@@ -1,3 +1,10 @@
4.1.1
- Update CMake build version to 3.5
- Cleanup CMake depend libstalkerclient
- Change interface header include way
- Fix package check for JsonCpp
- Add appveyor.yml and update .travis.yml to xcode 10.4 for test build

4.1.0
- Recompile for 6.1.0 PVR Addon API compatibility

Expand Down
2 changes: 1 addition & 1 deletion src/XMLTV.h
Expand Up @@ -26,7 +26,7 @@
#include <string>
#include <vector>

#include "xbmc_epg_types.h"
#include "kodi/xbmc_epg_types.h"

#include "libstalkerclient/xmltv.h"
#include "HTTPSocket.h"
Expand Down
2 changes: 1 addition & 1 deletion src/client.cpp
Expand Up @@ -21,7 +21,7 @@

#include "client.h"

#include <xbmc_pvr_dll.h>
#include <kodi/xbmc_pvr_dll.h>
#include <p8-platform/util/util.h>

#include "SData.h"
Expand Down
4 changes: 2 additions & 2 deletions src/client.h
Expand Up @@ -21,8 +21,8 @@
*
*/

#include <libXBMC_addon.h>
#include <libXBMC_pvr.h>
#include <kodi/libXBMC_addon.h>
#include <kodi/libXBMC_pvr.h>

extern ADDON::CHelper_libXBMC_addon *XBMC;
extern CHelper_libXBMC_pvr *PVR;
Expand Down

0 comments on commit ea4f292

Please sign in to comment.