Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
14e2d58
Merge pull request #35 from metaron-uk/master3
ksooo Aug 20, 2015
6af1e3d
Update to PVR addon API v4.0.0
ksooo Sep 9, 2015
e2cd8ee
Merge pull request #42 from ksooo/pvr-api-4-0-0
ksooo Sep 14, 2015
497643a
Update to PVR addon API v4.1.0
ksooo Sep 18, 2015
953477b
Merge pull request #45 from ksooo/pvr-api-4-1-0
ksooo Sep 20, 2015
eda38cc
[lang] updated language files from Transifex
txtranslation Dec 8, 2015
85a31ca
[lang] updated language files from Transifex
txtranslation Jan 3, 2016
567eeb3
[lang] updated language files from Transifex
txtranslation Jan 10, 2016
878cf5d
Initial Kodi Krypton version.
ksooo Jan 17, 2016
2dbfe7f
update for pvr api 4.2.0
stefansaraev Jan 19, 2016
3c722e6
[src] Update to p8-platform
hudokkow Jan 6, 2016
3f834bc
[cmake] Update to p8-platform
hudokkow Jan 6, 2016
6f7d175
Merge pull request #54 from hudokkow/p8platform
hudokkow Jan 22, 2016
fe62ab0
Merge pull request #55 from stefansaraev/pvr-api-420
hudokkow Jan 22, 2016
5aa51c6
bump to 2.0.1
stefansaraev Jan 22, 2016
d62cf5b
Merge pull request #57 from stefansaraev/api420
Jalle19 Jan 22, 2016
6ccfebd
Fix build after rename of p8-platform
hudokkow Jan 23, 2016
70e4924
Merge pull request #58 from hudokkow/p8platform
hudokkow Jan 23, 2016
bd52b62
[lang] updated language files from Transifex
txtranslation Jan 23, 2016
f0d9707
add Travis-CI file
MartijnKaijser Jan 29, 2016
7cdc326
Update README.md
MartijnKaijser Jan 29, 2016
fb32418
Add .gitignore file
hudokkow Jan 28, 2016
4255aa0
[debian] Delete changelog. We generate it on the fly using changelog.…
hudokkow Jan 28, 2016
baaae15
Merge pull request #60 from hudokkow/modernize
hudokkow Jan 29, 2016
c2fd137
[API 5.0.0] Version bump and changelog update
ksooo Feb 8, 2016
9da1396
[API 5.0.0] Remove GUI API dependency
ksooo Feb 8, 2016
1a66ae4
[API 5.0.0] Remove GetCurrentClientChannel
ksooo Feb 8, 2016
19d1d11
[API 5.0.0] Add SetEPGTimeFrame
ksooo Feb 9, 2016
5ee3a53
Merge pull request #62 from ksooo/pvr-api-5-0-0
ksooo Feb 16, 2016
abeff92
* Fix: Don't ignore channels logo if base logo path setting is empty.
afedchin Feb 18, 2016
260c26e
Bump to v2.1.1
afedchin Feb 18, 2016
1dfc354
Merge pull request #64 from afedchin/fix_logos
afedchin Feb 18, 2016
87a43d9
[API 5.1.0] PVR API and addon version bump.
ksooo Mar 8, 2016
d4fcb21
Merge pull request #69 from ksooo/pvr-api-5-1-0
ksooo Mar 8, 2016
f27ae14
PVR API 5.1.1
FernetMenta Mar 27, 2016
b741cac
Update .travis.yml
FernetMenta Mar 31, 2016
ae23489
adapt to PVR API 5.2.0
janbar Apr 20, 2016
373b525
Merge pull request #75 from janbar/master
MartijnKaijser Apr 24, 2016
e988fb7
Fix includes
hudokkow May 13, 2016
613cf86
Bump addon
hudokkow May 13, 2016
8fa3ad2
Merge pull request #80 from hudokkow/fix_includes
hudokkow May 16, 2016
619b834
[cmake] Rename find_package(kodi) to Kodi
hudokkow May 16, 2016
6ea17c5
Bump add-on
hudokkow May 18, 2016
7a5a43f
Merge pull request #81 from hudokkow/fixes
hudokkow May 18, 2016
9c85da9
Increase logging, parse M3U files lacking EXTM3U marker.
dw Jun 12, 2016
1ea1f36
[lang] updated language files from Transifex
txtranslation Jun 18, 2016
21e91a5
[lang] updated language files from Transifex
txtranslation Jul 21, 2016
a4c5255
[lang] updated language files from Transifex
txtranslation Aug 20, 2016
0532986
Handle time offset in EPG programme start and end times
ChadiEM Oct 6, 2016
0dc2055
Bump to v2.4.4
ChadiEM Oct 7, 2016
57b546a
Merge pull request #89 from ChadiEM/master
Jalle19 Oct 8, 2016
ae4c7a8
fixup build on windows.
Oct 10, 2016
adee8a7
Merge pull request #90 from afedchin/fix_89
afedchin Oct 11, 2016
28e607b
add channel number tag
excorp Nov 24, 2016
b4dfdde
Merge pull request #83 from dw/master
Jalle19 Nov 24, 2016
d22e119
adapt to api change - SeekTime
FernetMenta Nov 26, 2016
d69778e
bump version to 2.4.5
FernetMenta Nov 26, 2016
e792e13
Modify source code style to suit guidelines
excorp Nov 28, 2016
85866f9
Initial Kodi v18 version.
ksooo Dec 5, 2016
b19850d
[lang] updated language files from Transifex
txtranslation Dec 12, 2016
df0649e
Merge pull request #92 from excorp/master
afedchin Dec 17, 2016
1cfcd05
Update README.md
galgolan Jan 13, 2017
6ebc37c
fix tvg-shift=0
MrYadro Jan 17, 2017
75ca25f
Fix trailing spaces and travis CI
MrYadro Jan 17, 2017
73907d2
Merge pull request #100 from MrYadro/fix_travis_and_spaces
Jalle19 Jan 17, 2017
59a0112
Merge pull request #99 from MrYadro/master
Jalle19 Jan 17, 2017
2de83f0
Merge pull request #97 from galgolan/fix-build-instructions
Jalle19 Jan 20, 2017
cc5db36
Increase Line Length to standard 4k
Shani-08 Jan 30, 2017
050657e
Updated Version for Line length change
Shani-08 Jan 31, 2017
58b16dc
Update changelog.txt
Shani-08 Jan 31, 2017
53d63cc
Merge pull request #103 from Shani-08/patch-2
Jalle19 Jan 31, 2017
0b41d6b
fix install path
mdeguzis Feb 24, 2017
f848065
Remove not used part
AlwinEsch Apr 26, 2017
e842a93
Merge pull request #118 from AlwinEsch/remove-not-used-part
afedchin Apr 26, 2017
5110352
libXBMC_codec.h removed and changed to libXBMC_pvr.h
AlwinEsch Apr 29, 2017
cdbb1da
Merge pull request #120 from AlwinEsch/change-codec-way
AlwinEsch Apr 29, 2017
9bc8080
change to automatic interface version set
AlwinEsch Apr 29, 2017
28350d6
Merge pull request #121 from AlwinEsch/auto-xml
afedchin Apr 29, 2017
8f5babf
Revert "change to automatic interface version set"
AlwinEsch May 2, 2017
f83990a
Merge pull request #122 from kodi-pvr/revert-121-auto-xml
AlwinEsch May 2, 2017
7bac15a
change to automatic depends set on addon.xml
AlwinEsch May 10, 2017
6ea9e2e
Merge pull request #127 from AlwinEsch/auto_addon_xml
AlwinEsch May 16, 2017
6a42b33
remove no more needed version functions
AlwinEsch May 16, 2017
52fe3f8
Merge pull request #128 from AlwinEsch/remove-functions
AlwinEsch May 16, 2017
5a5ec6f
update debian control
AlwinEsch May 17, 2017
735c181
version increase after callback lib changes
AlwinEsch May 17, 2017
fb7de00
Merge pull request #130 from AlwinEsch/remove-functions
AlwinEsch May 17, 2017
15df955
Update on kodi to addon interface
AlwinEsch May 22, 2017
dbf6011
Merge pull request #131 from AlwinEsch/remove-functions
AlwinEsch May 22, 2017
548adfb
Added minimalistic support for PVR Addon API 5.3.0
ksooo Jul 7, 2017
8ccf85c
Merge pull request #136 from kodi-pvr/pvr-api-5-3-0
ksooo Jul 8, 2017
8b39460
Merge pull request #112 from mdeguzis/patch-1
Jalle19 Aug 6, 2017
09cb9d2
Ignore cmake-debug-build/, CLion creates it automatically unless conf…
Aug 6, 2017
cc7cdd2
Merge pull request #133 from badgeling/Krypton
Jalle19 Aug 6, 2017
7071c19
Bump version to v3.1.1
Aug 6, 2017
0829c84
Merge pull request #143 from kodi-pvr/line-length-master
Jalle19 Aug 6, 2017
efd96c4
Remove GetChannelSwitchDelay() method
Aug 6, 2017
0c1a09b
Add unimplemented GetStreamTimes() method
Aug 6, 2017
28d6248
Implement GetLiveStreamURL() to restore live TV playback functionality
Aug 6, 2017
1d978bb
Merge pull request #144 from kodi-pvr/pvr-api-550
Jalle19 Aug 6, 2017
aff4226
Support multiple groups per channel
mrtnmtth Apr 10, 2017
620f4b4
Bump version to 3.2.1 & update changelog
mrtnmtth Aug 6, 2017
bf43104
[win10] do not include StdString header (not used actually)
afedchin Aug 7, 2017
23419f3
[win32] drop direct calls to WinAPI
afedchin Aug 7, 2017
66b1e6f
Merge pull request #147 from afedchin/fix-header
afedchin Aug 7, 2017
29af69f
fix undefined symbol: get_addon after #147
afedchin Aug 8, 2017
0f4a453
Merge pull request #149 from afedchin/fix-get-addon
afedchin Aug 8, 2017
d6a9295
Merge pull request #117 from mttronc/master
Jalle19 Aug 11, 2017
2286612
Fix links in the README (closes #145)
Aug 13, 2017
0b7b308
Merge pull request #150 from kodi-pvr/fix-readme-links
Jalle19 Aug 13, 2017
220349a
PVR API 5.6.0: Remove GetLiveStreamURL. Remove PVR_RECORDING::strStr…
ksooo Aug 13, 2017
260434e
Merge pull request #152 from ksooo/pvr-api-5-6-0
ksooo Aug 13, 2017
00f1996
PVR API 5.7.0: Add IsEPGTagRecordable, IsEPGTagPlayable, GetEPGTagStr…
ksooo Aug 23, 2017
1b80347
Merge pull request #155 from ksooo/pvr-api-5-7-0
ksooo Aug 25, 2017
ac4f4bd
[lang] updated language files from Transifex
txtranslation Aug 27, 2017
53f94ec
[lang] updated language files from Transifex
txtranslation Dec 15, 2017
ec3974e
Fix multithreading issues
a1rwulf Dec 21, 2017
58448c4
Bump version to 3.3.3
a1rwulf Dec 22, 2017
cbd4f5a
Merge pull request #169 from a1rwulf/threading
ksooo Dec 22, 2017
7c2f269
PVR API 5.8.0
ksooo Dec 22, 2017
a768d0e
Merge pull request #172 from ksooo/pvr-api-5-8-0
ksooo Dec 28, 2017
e5e98ef
added: pass on kodi properties from m3u
akva2 Jan 15, 2018
a00d008
Merge pull request #174 from notspiff/add_adap_props
ksooo Jan 16, 2018
933a5c4
[lang] updated language files from Transifex
txtranslation Feb 5, 2018
7540571
PVR API 5.9.0
rbuehlma Apr 3, 2018
77156cb
Merge pull request #182 from rbuehlma/api-update
ksooo Apr 7, 2018
c8356fc
[lang] updated language files from Transifex
txtranslation May 14, 2018
e220777
[lang] updated language files from Transifex
txtranslation May 22, 2018
03394f5
PVR API 5.10.0
ksooo Jun 8, 2018
663040c
Merge pull request #186 from ksooo/pvr-api-5-10-0
ksooo Jun 9, 2018
d8d34b2
PVR API 5.10.1
ksooo Jun 19, 2018
7db634b
Merge pull request #188 from ksooo/pvr-api-5-10-1
ksooo Jun 20, 2018
6e44490
Add support for #EXT-X-PLAYLIST-TYPE in M3U
a1rwulf Jun 25, 2018
c721c03
[lang] updated language files from Transifex
alanwww1 Jul 1, 2018
55637c8
Merge pull request #189 from a1rwulf/extplaylisttype
ksooo Jul 4, 2018
e8effad
[lang] updated language files from Transifex
alanwww1 Aug 25, 2018
754ed12
[ci][travis] use ubuntu xenial
Rechi Aug 28, 2018
7a8e825
[ci][travis] use xcode9
Rechi Aug 28, 2018
9f7fffc
Merge pull request #191 from Rechi/ci
Rechi Oct 14, 2018
2134467
add Jenkinsfile
Rechi Oct 14, 2018
d27b3ed
move rapidxml to depends
Rechi Oct 23, 2018
8b7c701
Merge pull request #199 from Rechi/depends/rapidxml
Rechi Oct 23, 2018
f9cc6bb
[depends] rapidxml: convert patch to crlf line endings
Rechi Oct 24, 2018
40a0ac6
Merge pull request #201 from Rechi/fix/windowsstore
Rechi Oct 24, 2018
73622be
[ci][travis] add ADDONS_DEFINITION_DIR
Rechi Oct 26, 2018
98694e5
[depends] bump zlib to 1.2.11
Rechi Oct 29, 2018
c7c136a
Merge pull request #200 from Rechi/depends/zlib
Rechi Oct 29, 2018
90a8d6f
[lang] automatic syntax corrections for the en_GB language file
alanwww1 Nov 4, 2018
362c7e0
[lang] updated language files from Transifex
alanwww1 Jan 15, 2019
aad9d00
Fix build version shown in Kodi
vpeter4 Oct 31, 2018
f37b7bf
Merge pull request #206 from vpeter4/iptv_version
ksooo Jan 15, 2019
1ad9c34
Fix version number/changelog.
ksooo Jan 15, 2019
73feb2f
Merge pull request #213 from ksooo/3.5.7-Leia
ksooo Jan 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# build artifacts
build/
cmake-build-debug/
debian/changelog
debian/files
debian/kodi-pvr-iptvsimple-dbg.debhelper.log
debian/kodi-pvr-iptvsimple-dbg.substvars
debian/kodi-pvr-iptvsimple-dbg/
debian/kodi-pvr-iptvsimple.debhelper.log
debian/kodi-pvr-iptvsimple.postinst.debhelper
debian/kodi-pvr-iptvsimple.postrm.debhelper
debian/kodi-pvr-iptvsimple.substvars
debian/kodi-pvr-iptvsimple/
debian/tmp/
obj-x86_64-linux-gnu/
pvr.iptvsimple/addon.xml

# clion
.idea/

# Eclipse/CDT
.cproject
.project
.settings/
41 changes: 41 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
language: cpp

#
# Define the build matrix
#
# Travis defaults to building on Ubuntu Precise when building on
# Linux. We need Trusty in order to get up to date versions of
# cmake and g++.
#
env:
global:
- app_id=pvr.iptvsimple

matrix:
include:
- os: linux
dist: xenial
sudo: required
compiler: gcc
- os: linux
dist: xenial
sudo: required
compiler: clang
- os: osx
osx_image: xcode9
- os: osx
osx_image: xcode9.4

#
# The addon source is automatically checked out in $TRAVIS_BUILD_DIR,
# we'll put the Kodi source on the same level
#
before_script:
- cd $TRAVIS_BUILD_DIR/..
- git clone --depth=1 https://github.com/xbmc/xbmc.git
- 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
21 changes: 15 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,36 @@ project(pvr.iptvsimple)

cmake_minimum_required(VERSION 2.6)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})

enable_language(CXX)

find_package(kodi REQUIRED)
find_package(Kodi REQUIRED)
find_package(kodiplatform REQUIRED)
find_package(platform REQUIRED)
find_package(p8-platform REQUIRED)
find_package(Rapidxml REQUIRED)
find_package(ZLIB REQUIRED)

include_directories(${kodiplatform_INCLUDE_DIRS}
${platform_INCLUDE_DIRS}
${p8-platform_INCLUDE_DIRS}
${KODI_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/lib)
${RAPIDXML_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS})

set(DEPLIBS ${platform_LIBRARIES}
set(DEPLIBS ${p8-platform_LIBRARIES}
${ZLIB_LIBRARIES})

message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}")

set(IPTV_SOURCES src/client.cpp
src/PVRIptvData.cpp)

set(IPTV_HEADERS src/client.h
src/PVRIptvData.h)

addon_version(pvr.iptvsimple IPTV)
add_definitions(-DIPTV_VERSION=${IPTV_VERSION})

build_addon(pvr.iptvsimple IPTV DEPLIBS)

include(CPack)
12 changes: 12 additions & 0 deletions FindRapidxml.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# - Try to find rapidxml
# Once done this will define
#
# RAPIDXML_FOUND - system has rapidxml
# RAPIDXML_INCLUDE_DIRS - the rapidxml include directory

find_path(RAPIDXML_INCLUDE_DIRS rapidxml/rapidxml.hpp)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Rapidxml DEFAULT_MSG RAPIDXML_INCLUDE_DIRS)

mark_as_advanced(RAPIDXML_INCLUDE_DIRS)
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
buildPlugin()
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
[![Build Status](https://travis-ci.org/kodi-pvr/pvr.iptvsimple.svg?branch=master)](https://travis-ci.org/kodi-pvr/pvr.iptvsimple)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/5120/badge.svg)](https://scan.coverity.com/projects/5120)

# IPTV Simple PVR
IPTV Live TV and Radio PVR client addon for [Kodi] (http://kodi.tv)

IPTV Live TV and Radio PVR client addon for [Kodi](http://kodi.tv)

## Build instructions

### Linux

1. `git clone https://github.com/xbmc/xbmc.git`
2. `git clone https://github.com/kodi-pvr/pvr.iptvsimple.git`
3. `cd pvr.iptvsimple && mkdir build && cd build`
4. `cmake -DADDONS_TO_BUILD=pvr.iptvsimple -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons`
5. `make`

##### 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](http://forum.kodi.tv/forumdisplay.php?fid=167)
* [Kodi's PVR development support](http://forum.kodi.tv/forumdisplay.php?fid=136)
7 changes: 0 additions & 7 deletions debian/changelog

This file was deleted.

4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Source: kodi-pvr-iptvsimple
Priority: extra
Maintainer: Anton Fedchin <[email protected]>
Build-Depends: debhelper (>= 9.0.0), cmake, kodi-pvr-dev,
libkodiplatform-dev (>= 16.0.0), kodi-addon-dev, zlib1g-dev
Build-Depends: debhelper (>= 9.0.0), cmake, libkodiplatform-dev (>= 16.0.0),
kodi-addon-dev, librapidxml-dev, zlib1g-dev
Standards-Version: 3.9.4
Section: libs

Expand Down
4 changes: 2 additions & 2 deletions debian/kodi-pvr-iptvsimple.install
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
usr/lib/*/addons/pvr.iptvsimple/pvr.iptvsimple.so* usr/lib/kodi/addons/pvr.iptvsimple
usr/share/kodi/addons/pvr.iptvsimple
usr/lib/*
usr/share/*
29 changes: 29 additions & 0 deletions depends/common/rapidxml/01-fix-windows.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- a/rapidxml.hpp
+++ b/rapidxml.hpp
@@ -382,7 +382,7 @@
public:

//! \cond internal
- typedef void *(alloc_func)(std::size_t); // Type of user-defined function used to allocate memory
+ typedef void *(alloc_func_)(std::size_t); // Type of user-defined function used to allocate memory
typedef void (free_func)(void *); // Type of user-defined function used to free memory
//! \endcond

@@ -549,7 +549,7 @@ namespace rapidxml
//! </code><br>
//! \param af Allocation function, or 0 to restore default function
//! \param ff Free function, or 0 to restore default function
- void set_allocator(alloc_func *af, free_func *ff)
+ void set_allocator(alloc_func_ *af, free_func *ff)
{
assert(m_begin == m_static_memory && m_ptr == align(m_begin)); // Verify that no memory is allocated yet
m_alloc_func = af;
@@ -634,7 +634,7 @@ namespace rapidxml
char *m_ptr; // First free byte in current pool
char *m_end; // One past last available byte in current pool
char m_static_memory[RAPIDXML_STATIC_POOL_SIZE]; // Static raw memory
- alloc_func *m_alloc_func; // Allocator function, or 0 if default is to be used
+ alloc_func_ *m_alloc_func; // Allocator function, or 0 if default is to be used
free_func *m_free_func; // Free function, or 0 if default is to be used
};

5 changes: 5 additions & 0 deletions depends/common/rapidxml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.5)

project(rapidxml)

install(FILES rapidxml.hpp rapidxml_iterators.hpp rapidxml_print.hpp rapidxml_utils.hpp DESTINATION include/rapidxml)
1 change: 1 addition & 0 deletions depends/common/rapidxml/rapidxml.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c3f0b886374981bb20fabcf323d755db4be6dba42064599481da64a85f5b3571
1 change: 1 addition & 0 deletions depends/common/rapidxml/rapidxml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rapidxml http://mirrors.kodi.tv/build-deps/sources/rapidxml-1.13.zip
36 changes: 36 additions & 0 deletions depends/common/zlib/01-build-static.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,10 +183,11 @@
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)

-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
-set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
-set_target_properties(zlib PROPERTIES SOVERSION 1)
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+if(BUILD_SHARED_LIBS)
+ set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+ set_target_properties(zlib PROPERTIES SOVERSION 1)
+endif()

if(NOT CYGWIN)
# This property causes shared libraries on Linux to have the full version
@@ -201,7 +202,7 @@

if(UNIX)
# On unix-like platforms the library is almost always called libz
- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z)
+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
if(NOT APPLE)
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
endif()
@@ -211,7 +212,7 @@
endif()

if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
- install(TARGETS zlib zlibstatic
+ install(TARGETS zlib
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
Loading