Skip to content

Commit f965668

Browse files
author
Oleh Kulykov
committed
1722329251
1 parent d36710e commit f965668

File tree

11 files changed

+48
-17
lines changed

11 files changed

+48
-17
lines changed

CHANGELOG

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
(Portable, Patched, Package, cross-P-latform) Lzma SDK, libplzma
22

3-
1.4.5: (current):
3+
1.4.6: (current):
4+
- Swift package, Cocoapods: add optional compiller flags.
5+
- Apple plaftforms: improve version generation.
6+
7+
1.4.5:
48
- MinGW support.
59

610
1.4.4:

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ set(PACKAGE "libplzma")
3333
set(CPACK_PACKAGE_NAME "${PACKAGE}")
3434
set(CPACK_PACKAGE_VERSION_MAJOR "1")
3535
set(CPACK_PACKAGE_VERSION_MINOR "4")
36-
set(CPACK_PACKAGE_VERSION_PATCH "5")
36+
set(CPACK_PACKAGE_VERSION_PATCH "6")
3737
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
3838
set(CPACK_PACKAGE_VENDOR "olehkulykov@gmail.com")
3939
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE} ${PACKAGE_VERSION}")
40-
set(SOVERSION "1.4.5")
40+
set(SOVERSION "1.4.6")
4141
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
4242
set(VERSION "${CPACK_PACKAGE_VERSION}")
4343

PLzmaSDK-ObjC.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'PLzmaSDK-ObjC'
3-
s.version = '1.4.5'
3+
s.version = '1.4.6'
44
s.summary = '(Portable, Patched, Package, cross-P-latform) Lzma SDK, libplzma'
55
s.homepage = 'https://github.com/OlehKulykov/PLzmaSDK'
66
s.source = { :git => s.homepage + '.git', :tag => s.version }

PLzmaSDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'PLzmaSDK'
3-
s.version = '1.4.5'
3+
s.version = '1.4.6'
44
s.summary = '(Portable, Patched, Package, cross-P-latform) Lzma SDK, libplzma'
55
s.homepage = 'https://github.com/OlehKulykov/PLzmaSDK'
66
s.source = { :git => s.homepage + '.git', :tag => s.version }

Package.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ let package = Package(
1919
cxxSettings: [
2020
.define("LIBPLZMA_VERSION_BUILD", to: "858"),
2121
.unsafeFlags(["-fPIC", "-fno-rtti"])
22-
]
23-
),
22+
]),
2423
.target(name: "PLzmaSDK",
2524
dependencies: [
2625
.target(name: "libplzma")
@@ -30,7 +29,13 @@ let package = Package(
3029
.copy("../resources/PrivacyInfo.xcprivacy"),
3130
]),
3231
.target(name: "plzma_test_files",
33-
path: "test_files"),
32+
path: "test_files",
33+
cSettings: [
34+
.unsafeFlags(["-fPIC"])
35+
],
36+
cxxSettings: [
37+
.unsafeFlags(["-fPIC", "-fno-rtti"])
38+
]),
3439
.testTarget(
3540
name: "PLzmaSDKTests",
3641
dependencies: [

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ All optional features are enabled by default, but they might be disabled during
5555
-----------
5656
#### Swift Package Manager
5757
```swift
58-
.package(url: "https://github.com/OlehKulykov/PLzmaSDK.git", .exact("1.4.5"))
58+
.package(url: "https://github.com/OlehKulykov/PLzmaSDK.git", .exact("1.4.6"))
5959
```
6060

6161
#### CocoaPods Podfile (Swift)
@@ -64,7 +64,7 @@ use_frameworks!
6464
platform :ios, '11.0'
6565

6666
target '<REPLACE_WITH_YOUR_TARGET>' do
67-
pod 'PLzmaSDK', '1.4.5'
67+
pod 'PLzmaSDK', '1.4.6'
6868
end
6969
```
7070

@@ -74,7 +74,7 @@ use_frameworks!
7474
platform :ios, '9.0'
7575

7676
target '<REPLACE_WITH_YOUR_TARGET>' do
77-
pod 'PLzmaSDK-ObjC', '1.4.5'
77+
pod 'PLzmaSDK-ObjC', '1.4.6'
7878
end
7979
```
8080

@@ -86,7 +86,7 @@ end
8686
"npm": ">=6.0.0"
8787
},
8888
"dependencies": {
89-
"plzmasdk": "1.4.5"
89+
"plzmasdk": "1.4.6"
9090
}
9191
}
9292
```

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1.4.5.{build}
1+
version: 1.4.6.{build}
22

33

44
os: Visual Studio 2019

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ android {
1919
minSdkVersion 21
2020
targetSdkVersion 26
2121
versionCode 1
22-
versionName "1.4.5"
22+
versionName "1.4.6"
2323
externalNativeBuild {
2424
cmake {
2525
arguments "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DLIBCLZMA_OPT_ANDROID:BOOL=ON", "-DLIBCLZMA_OPT_STATIC:BOOL=OFF", "-DLIBCLZMA_OPT_TESTS:BOOL=OFF", "-DLIBCLZMA_OPT_BUILD_NUMBER=601"

cmake_tests/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,28 @@ if (MSVC)
7070
# https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8
7171
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8")
7272
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
73+
74+
else()
75+
76+
# C with -fPIC
77+
check_c_compiler_flag("-fPIC" WITH_FPIC_C)
78+
if (WITH_FPIC_C)
79+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
80+
endif()
81+
82+
# CXX with -fPIC
83+
check_cxx_compiler_flag("-fPIC" WITH_FPIC_CXX)
84+
if (WITH_FPIC_CXX)
85+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
86+
endif()
87+
88+
# CXX with -fno-rtti
89+
check_cxx_compiler_flag("-fno-rtti" WITH_FNO_RTTI_CXX)
90+
if (WITH_FNO_RTTI_CXX)
91+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
92+
add_definitions(-DLIBPLZMA_NO_CPP_RTTI=1)
93+
endif()
94+
7395
endif()
7496

7597
set(LIBPLZMA_TESTS

libplzma.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
/// and all optional C bindings to the internal C++ part(Core) of the library.
4545
/// Everything what you need to use this library in C | Objective-C | Swift env. is here.
4646

47-
/// @brief Manualy defined version of the library, i.e. 1.4.5
47+
/// @brief Manualy defined version of the library, i.e. 1.4.6
4848
/// The optinal \a LIBPLZMA_VERSION_BUILD might be befined by the CI or CMake or manualy.
4949
/// Conforms 'Semantic Versioning 2.0.0'.
5050
/// @link https://semver.org
5151
#define LIBPLZMA_VERSION_MAJOR 1
5252
#define LIBPLZMA_VERSION_MINOR 4
53-
#define LIBPLZMA_VERSION_PATCH 5
53+
#define LIBPLZMA_VERSION_PATCH 6
5454

5555
// Check Windows
5656
#if defined(WIN32) || defined(_WIN32) || defined(_WIN64) || defined(WIN64) || defined(WIN32_LEAN_AND_MEAN)

0 commit comments

Comments
 (0)