@cpp.js/package-zlib 1.0.0-beta.29 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -19
- package/cppjs.config.js +9 -7
- package/package.json +6 -10
- package/CHANGELOG.md +0 -7
- package/README.md +0 -50
- package/assets/CMakeLists.txt +0 -234
- package/cppjs-package-zlib.podspec +0 -13
- package/cppjs.build.js +0 -6
- package/dist/prebuilt/Android-arm64-v8a/include/zconf.h +0 -545
- package/dist/prebuilt/Android-arm64-v8a/include/zlib.h +0 -1938
- package/dist/prebuilt/Android-arm64-v8a/lib/libz.so +0 -0
- package/dist/prebuilt/Android-arm64-v8a/share/man/man3/zlib.3 +0 -149
- package/dist/prebuilt/Android-arm64-v8a/share/pkgconfig/zlib.pc +0 -13
- package/dist/prebuilt/Android-x86_64/include/zconf.h +0 -545
- package/dist/prebuilt/Android-x86_64/include/zlib.h +0 -1938
- package/dist/prebuilt/Android-x86_64/lib/libz.so +0 -0
- package/dist/prebuilt/Android-x86_64/share/man/man3/zlib.3 +0 -149
- package/dist/prebuilt/Android-x86_64/share/pkgconfig/zlib.pc +0 -13
- package/dist/prebuilt/CMakeLists.txt +0 -44
- package/dist/prebuilt/Emscripten-x86_64/include/zconf.h +0 -545
- package/dist/prebuilt/Emscripten-x86_64/include/zlib.h +0 -1938
- package/dist/prebuilt/Emscripten-x86_64/lib/libz.a +0 -0
- package/dist/prebuilt/Emscripten-x86_64/share/man/man3/zlib.3 +0 -149
- package/dist/prebuilt/Emscripten-x86_64/share/pkgconfig/zlib.pc +0 -13
- package/dist/prebuilt/iOS-iphoneos/include/zconf.h +0 -545
- package/dist/prebuilt/iOS-iphoneos/include/zlib.h +0 -1938
- package/dist/prebuilt/iOS-iphoneos/lib/libz.a +0 -0
- package/dist/prebuilt/iOS-iphoneos/share/man/man3/zlib.3 +0 -149
- package/dist/prebuilt/iOS-iphoneos/share/pkgconfig/zlib.pc +0 -13
- package/dist/prebuilt/iOS-iphonesimulator/include/zconf.h +0 -545
- package/dist/prebuilt/iOS-iphonesimulator/include/zlib.h +0 -1938
- package/dist/prebuilt/iOS-iphonesimulator/lib/libz.a +0 -0
- package/dist/prebuilt/iOS-iphonesimulator/share/man/man3/zlib.3 +0 -149
- package/dist/prebuilt/iOS-iphonesimulator/share/pkgconfig/zlib.pc +0 -13
- package/z.xcframework/Info.plist +0 -50
- package/z.xcframework/ios-arm64_arm64e/Headers/zconf.h +0 -545
- package/z.xcframework/ios-arm64_arm64e/Headers/zlib.h +0 -1938
- package/z.xcframework/ios-arm64_arm64e/libz.a +0 -0
- package/z.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/zconf.h +0 -545
- package/z.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/zlib.h +0 -1938
- package/z.xcframework/ios-arm64_arm64e_x86_64-simulator/libz.a +0 -0
package/LICENSE
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
version 1.3.1, January 22nd, 2024
|
|
1
|
+
MIT License
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Copyright (c) 2025 Buğra Sarı
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
freely, subject to the following restrictions:
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Jean-loup Gailly Mark Adler
|
|
23
|
-
jloup@gzip.org madler@alumni.caltech.edu
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/cppjs.config.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import zlibWasm from '@cpp.js/package-zlib-wasm/cppjs.config.js';
|
|
2
|
+
import zlibAndroid from '@cpp.js/package-zlib-android/cppjs.config.js';
|
|
3
|
+
import zlibIOS from '@cpp.js/package-zlib-ios/cppjs.config.js';
|
|
4
|
+
|
|
1
5
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
},
|
|
6
|
+
dependencies: [
|
|
7
|
+
zlibWasm,
|
|
8
|
+
zlibAndroid,
|
|
9
|
+
zlibIOS
|
|
10
|
+
],
|
|
8
11
|
paths: {
|
|
9
12
|
config: import.meta.url,
|
|
10
|
-
output: 'dist',
|
|
11
13
|
},
|
|
12
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cpp.js/package-zlib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"nativeVersion": "1.3.1",
|
|
5
5
|
"description": "This package provides the precompiled zlib library, built using cpp.js, for easy integration into JavaScript, WebAssembly and React Native projects. It offers compression and decompression functionalities through the zlib API, ensuring high performance and cross-platform compatibility. Ideal for use in web and mobile applications.",
|
|
6
6
|
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-package-zlib#readme",
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
"license": "Zlib",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"cpp.js": "^
|
|
11
|
+
"cpp.js": "^2.0.0-beta.1",
|
|
12
|
+
"@cpp.js/package-zlib-wasm": "^2.0.0-beta.1",
|
|
13
|
+
"@cpp.js/package-zlib-android": "^2.0.0-beta.1",
|
|
14
|
+
"@cpp.js/package-zlib-ios": "^2.0.0-beta.1"
|
|
12
15
|
},
|
|
13
16
|
"keywords": [
|
|
14
17
|
"z",
|
|
@@ -17,12 +20,5 @@
|
|
|
17
20
|
"cpp.js-package",
|
|
18
21
|
"webassembly",
|
|
19
22
|
"react-native"
|
|
20
|
-
]
|
|
21
|
-
"scripts": {
|
|
22
|
-
"build": "cppjs build",
|
|
23
|
-
"build:wasm": "cppjs build -p WebAssembly",
|
|
24
|
-
"build:android": "cppjs build -p Android",
|
|
25
|
-
"build:ios": "cppjs build -p iOS",
|
|
26
|
-
"clear": "rm -rf .cppjs dist *.xcframework"
|
|
27
|
-
}
|
|
23
|
+
]
|
|
28
24
|
}
|
package/CHANGELOG.md
DELETED
package/README.md
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# @cpp.js/package-zlib
|
|
2
|
-
**Precompiled zlib library built with cpp.js for seamless integration in JavaScript, WebAssembly and React Native projects.**
|
|
3
|
-
|
|
4
|
-
<a href="https://www.npmjs.com/package/@cpp.js/package-zlib">
|
|
5
|
-
<img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/package-zlib?style=for-the-badge" />
|
|
6
|
-
</a>
|
|
7
|
-
<a href="https://zlib.net/">
|
|
8
|
-
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Funpkg.com%2F%40cpp.js%2Fpackage-zlib%2Fpackage.json&query=%24.nativeVersion&style=for-the-badge&label=zlib" />
|
|
9
|
-
</a>
|
|
10
|
-
<a href="https://zlib.net/zlib_license.html">
|
|
11
|
-
<img alt="License" src="https://img.shields.io/npm/l/%40cpp.js%2Fpackage-zlib?style=for-the-badge" />
|
|
12
|
-
</a>
|
|
13
|
-
|
|
14
|
-
## Integration
|
|
15
|
-
Start by installing these package with the following command:
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
npm install @cpp.js/package-zlib
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
To enable the library, modify the cppjs.config.js file as shown below.
|
|
22
|
-
```diff
|
|
23
|
-
+import zlib from '@cpp.js/package-zlib/cppjs.config.js';
|
|
24
|
-
|
|
25
|
-
export default {
|
|
26
|
-
dependencies: [
|
|
27
|
-
+ zlib
|
|
28
|
-
]
|
|
29
|
-
paths: {
|
|
30
|
-
config: import.meta.url,
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Usage
|
|
36
|
-
Below are the steps to use the zlib in your C++ or JavaScript code.
|
|
37
|
-
|
|
38
|
-
### Usage in C++ Code
|
|
39
|
-
```diff
|
|
40
|
-
+#include <zlib.h>
|
|
41
|
-
|
|
42
|
-
std::string Native::sample() {
|
|
43
|
-
+ return std::string(zlibVersion());
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## License
|
|
48
|
-
This project includes the precompiled zlib library, which is distributed under the [zlib License](https://zlib.net/zlib_license.html).
|
|
49
|
-
|
|
50
|
-
Zlib Homepage: <https://zlib.net/>
|
package/assets/CMakeLists.txt
DELETED
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 2.4.4...3.15.0)
|
|
2
|
-
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
|
3
|
-
|
|
4
|
-
project(zlib C)
|
|
5
|
-
|
|
6
|
-
set(VERSION "1.3.1")
|
|
7
|
-
|
|
8
|
-
option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON)
|
|
9
|
-
|
|
10
|
-
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
|
|
11
|
-
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
|
|
12
|
-
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
|
|
13
|
-
set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages")
|
|
14
|
-
set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
|
|
15
|
-
|
|
16
|
-
include(CheckTypeSize)
|
|
17
|
-
include(CheckFunctionExists)
|
|
18
|
-
include(CheckIncludeFile)
|
|
19
|
-
include(CheckCSourceCompiles)
|
|
20
|
-
enable_testing()
|
|
21
|
-
|
|
22
|
-
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
|
23
|
-
check_include_file(stdint.h HAVE_STDINT_H)
|
|
24
|
-
check_include_file(stddef.h HAVE_STDDEF_H)
|
|
25
|
-
|
|
26
|
-
#
|
|
27
|
-
# Check to see if we have large file support
|
|
28
|
-
#
|
|
29
|
-
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
|
|
30
|
-
# We add these other definitions here because CheckTypeSize.cmake
|
|
31
|
-
# in CMake 2.4.x does not automatically do so and we want
|
|
32
|
-
# compatibility with CMake 2.4.x.
|
|
33
|
-
if(HAVE_SYS_TYPES_H)
|
|
34
|
-
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
|
|
35
|
-
endif()
|
|
36
|
-
if(HAVE_STDINT_H)
|
|
37
|
-
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
|
|
38
|
-
endif()
|
|
39
|
-
if(HAVE_STDDEF_H)
|
|
40
|
-
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
|
|
41
|
-
endif()
|
|
42
|
-
check_type_size(off64_t OFF64_T)
|
|
43
|
-
if(HAVE_OFF64_T)
|
|
44
|
-
add_definitions(-D_LARGEFILE64_SOURCE=1)
|
|
45
|
-
endif()
|
|
46
|
-
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
|
|
47
|
-
|
|
48
|
-
#
|
|
49
|
-
# Check for fseeko
|
|
50
|
-
#
|
|
51
|
-
check_function_exists(fseeko HAVE_FSEEKO)
|
|
52
|
-
if(NOT HAVE_FSEEKO)
|
|
53
|
-
add_definitions(-DNO_FSEEKO)
|
|
54
|
-
endif()
|
|
55
|
-
|
|
56
|
-
#
|
|
57
|
-
# Check for unistd.h
|
|
58
|
-
#
|
|
59
|
-
check_include_file(unistd.h Z_HAVE_UNISTD_H)
|
|
60
|
-
|
|
61
|
-
if(MSVC)
|
|
62
|
-
set(CMAKE_DEBUG_POSTFIX "d")
|
|
63
|
-
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
|
|
64
|
-
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
|
65
|
-
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
66
|
-
endif()
|
|
67
|
-
|
|
68
|
-
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
|
69
|
-
# If we're doing an out of source build and the user has a zconf.h
|
|
70
|
-
# in their source tree...
|
|
71
|
-
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
|
|
72
|
-
message(STATUS "Renaming")
|
|
73
|
-
message(STATUS " ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h")
|
|
74
|
-
message(STATUS "to 'zconf.h.included' because this file is included with zlib")
|
|
75
|
-
message(STATUS "but CMake generates it automatically in the build directory.")
|
|
76
|
-
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
|
|
77
|
-
endif()
|
|
78
|
-
endif()
|
|
79
|
-
|
|
80
|
-
set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)
|
|
81
|
-
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
|
|
82
|
-
${ZLIB_PC} @ONLY)
|
|
83
|
-
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
|
|
84
|
-
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
|
|
85
|
-
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
#============================================================================
|
|
89
|
-
# zlib
|
|
90
|
-
#============================================================================
|
|
91
|
-
|
|
92
|
-
set(ZLIB_PUBLIC_HDRS
|
|
93
|
-
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
|
|
94
|
-
zlib.h
|
|
95
|
-
)
|
|
96
|
-
set(ZLIB_PRIVATE_HDRS
|
|
97
|
-
crc32.h
|
|
98
|
-
deflate.h
|
|
99
|
-
gzguts.h
|
|
100
|
-
inffast.h
|
|
101
|
-
inffixed.h
|
|
102
|
-
inflate.h
|
|
103
|
-
inftrees.h
|
|
104
|
-
trees.h
|
|
105
|
-
zutil.h
|
|
106
|
-
)
|
|
107
|
-
set(ZLIB_SRCS
|
|
108
|
-
adler32.c
|
|
109
|
-
compress.c
|
|
110
|
-
crc32.c
|
|
111
|
-
deflate.c
|
|
112
|
-
gzclose.c
|
|
113
|
-
gzlib.c
|
|
114
|
-
gzread.c
|
|
115
|
-
gzwrite.c
|
|
116
|
-
inflate.c
|
|
117
|
-
infback.c
|
|
118
|
-
inftrees.c
|
|
119
|
-
inffast.c
|
|
120
|
-
trees.c
|
|
121
|
-
uncompr.c
|
|
122
|
-
zutil.c
|
|
123
|
-
)
|
|
124
|
-
|
|
125
|
-
if(NOT MINGW)
|
|
126
|
-
set(ZLIB_DLL_SRCS
|
|
127
|
-
win32/zlib1.rc # If present will override custom build rule below.
|
|
128
|
-
)
|
|
129
|
-
endif()
|
|
130
|
-
|
|
131
|
-
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
|
|
132
|
-
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
|
133
|
-
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
|
134
|
-
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
|
|
135
|
-
|
|
136
|
-
if(MINGW)
|
|
137
|
-
# This gets us DLL resource information when compiling on MinGW.
|
|
138
|
-
if(NOT CMAKE_RC_COMPILER)
|
|
139
|
-
set(CMAKE_RC_COMPILER windres.exe)
|
|
140
|
-
endif()
|
|
141
|
-
|
|
142
|
-
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
|
143
|
-
COMMAND ${CMAKE_RC_COMPILER}
|
|
144
|
-
-D GCC_WINDRES
|
|
145
|
-
-I ${CMAKE_CURRENT_SOURCE_DIR}
|
|
146
|
-
-I ${CMAKE_CURRENT_BINARY_DIR}
|
|
147
|
-
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
|
148
|
-
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
|
149
|
-
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
|
150
|
-
endif(MINGW)
|
|
151
|
-
|
|
152
|
-
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
|
153
|
-
target_include_directories(zlib PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
154
|
-
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
|
155
|
-
target_include_directories(zlibstatic PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
|
156
|
-
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
|
|
157
|
-
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
|
158
|
-
|
|
159
|
-
if(NOT CYGWIN)
|
|
160
|
-
# This property causes shared libraries on Linux to have the full version
|
|
161
|
-
# encoded into their final filename. We disable this on Cygwin because
|
|
162
|
-
# it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
|
|
163
|
-
# seems to be the default.
|
|
164
|
-
#
|
|
165
|
-
# This has no effect with MSVC, on that platform the version info for
|
|
166
|
-
# the DLL comes from the resource file win32/zlib1.rc
|
|
167
|
-
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
|
|
168
|
-
endif()
|
|
169
|
-
|
|
170
|
-
if(UNIX)
|
|
171
|
-
# On unix-like platforms the library is almost always called libz
|
|
172
|
-
if (BUILD_TYPE STREQUAL "SHARED")
|
|
173
|
-
set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
|
|
174
|
-
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z2)
|
|
175
|
-
elseif(BUILD_TYPE STREQUAL "STATIC")
|
|
176
|
-
set_target_properties(zlib PROPERTIES OUTPUT_NAME z2)
|
|
177
|
-
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z)
|
|
178
|
-
else()
|
|
179
|
-
set_target_properties(zlib PROPERTIES OUTPUT_NAME a)
|
|
180
|
-
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME b)
|
|
181
|
-
endif()
|
|
182
|
-
if(NOT APPLE AND NOT(CMAKE_SYSTEM_NAME STREQUAL AIX))
|
|
183
|
-
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"")
|
|
184
|
-
endif()
|
|
185
|
-
elseif(BUILD_SHARED_LIBS AND WIN32)
|
|
186
|
-
# Creates zlib1.dll when building shared library version
|
|
187
|
-
set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
|
|
188
|
-
endif()
|
|
189
|
-
|
|
190
|
-
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
|
|
191
|
-
if (BUILD_TYPE STREQUAL "SHARED")
|
|
192
|
-
install(TARGETS zlib
|
|
193
|
-
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
|
|
194
|
-
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
|
|
195
|
-
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
|
|
196
|
-
elseif(BUILD_TYPE STREQUAL "STATIC")
|
|
197
|
-
install(TARGETS zlibstatic
|
|
198
|
-
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
|
|
199
|
-
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
|
|
200
|
-
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" )
|
|
201
|
-
endif()
|
|
202
|
-
endif()
|
|
203
|
-
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
|
|
204
|
-
install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION "${INSTALL_INC_DIR}")
|
|
205
|
-
endif()
|
|
206
|
-
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
|
207
|
-
install(FILES zlib.3 DESTINATION "${INSTALL_MAN_DIR}/man3")
|
|
208
|
-
endif()
|
|
209
|
-
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
|
|
210
|
-
install(FILES ${ZLIB_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}")
|
|
211
|
-
endif()
|
|
212
|
-
|
|
213
|
-
#============================================================================
|
|
214
|
-
# Example binaries
|
|
215
|
-
#============================================================================
|
|
216
|
-
if(ZLIB_BUILD_EXAMPLES)
|
|
217
|
-
add_executable(example test/example.c)
|
|
218
|
-
target_link_libraries(example zlib)
|
|
219
|
-
add_test(example example)
|
|
220
|
-
|
|
221
|
-
add_executable(minigzip test/minigzip.c)
|
|
222
|
-
target_link_libraries(minigzip zlib)
|
|
223
|
-
|
|
224
|
-
if(HAVE_OFF64_T)
|
|
225
|
-
add_executable(example64 test/example.c)
|
|
226
|
-
target_link_libraries(example64 zlib)
|
|
227
|
-
set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
|
|
228
|
-
add_test(example64 example64)
|
|
229
|
-
|
|
230
|
-
add_executable(minigzip64 test/minigzip.c)
|
|
231
|
-
target_link_libraries(minigzip64 zlib)
|
|
232
|
-
set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
|
|
233
|
-
endif()
|
|
234
|
-
endif()
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
3
|
-
|
|
4
|
-
Pod::Spec.new do |s|
|
|
5
|
-
s.module_name = "z"
|
|
6
|
-
s.name = "cppjs-package-zlib"
|
|
7
|
-
s.version = package["nativeVersion"]
|
|
8
|
-
s.summary = "A Massively Spiffy Yet Delicately Unobtrusive Compression Library"
|
|
9
|
-
s.homepage = "https://www.zlib.net/"
|
|
10
|
-
s.author = "ZLIB Authors"
|
|
11
|
-
s.source = { :http => "https://cpp.js.org" }
|
|
12
|
-
s.vendored_frameworks = 'z.xcframework'
|
|
13
|
-
end
|