| 1 |
Common subdirectories: ../zlib-1.2.11/amiga and ./amiga |
| 2 |
diff -u ../zlib-1.2.11/CMakeLists.txt ./CMakeLists.txt |
| 3 |
--- ../zlib-1.2.11/CMakeLists.txt 2017-01-15 09:29:40.000000000 +0100 |
| 4 |
+++ ./CMakeLists.txt 2021-03-24 15:24:48.190291072 +0100 |
| 5 |
@@ -183,10 +183,12 @@ |
| 6 |
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) |
| 7 |
endif(MINGW) |
| 8 |
|
| 9 |
-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
| 10 |
-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
| 11 |
-set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) |
| 12 |
-set_target_properties(zlib PROPERTIES SOVERSION 1) |
| 13 |
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
| 14 |
+if (BUILD_SHARED_LIBS) |
| 15 |
+ target_sources(zlib PRIVATE ${ZLIB_DLL_SRCS}) |
| 16 |
+ set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) |
| 17 |
+ set_target_properties(zlib PROPERTIES SOVERSION 1) |
| 18 |
+endif() |
| 19 |
|
| 20 |
if(NOT CYGWIN) |
| 21 |
# This property causes shared libraries on Linux to have the full version |
| 22 |
@@ -201,7 +203,7 @@ |
| 23 |
|
| 24 |
if(UNIX) |
| 25 |
# On unix-like platforms the library is almost always called libz |
| 26 |
- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) |
| 27 |
+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) |
| 28 |
if(NOT APPLE) |
| 29 |
set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") |
| 30 |
endif() |
| 31 |
@@ -211,7 +213,7 @@ |
| 32 |
endif() |
| 33 |
|
| 34 |
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) |
| 35 |
- install(TARGETS zlib zlibstatic |
| 36 |
+ install(TARGETS zlib |
| 37 |
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" |
| 38 |
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" |
| 39 |
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) |
| 40 |
Common subdirectories: ../zlib-1.2.11/contrib and ./contrib |
| 41 |
Common subdirectories: ../zlib-1.2.11/doc and ./doc |
| 42 |
Common subdirectories: ../zlib-1.2.11/examples and ./examples |
| 43 |
Common subdirectories: ../zlib-1.2.11/msdos and ./msdos |
| 44 |
Common subdirectories: ../zlib-1.2.11/nintendods and ./nintendods |
| 45 |
Common subdirectories: ../zlib-1.2.11/old and ./old |
| 46 |
Common subdirectories: ../zlib-1.2.11/os400 and ./os400 |
| 47 |
Common subdirectories: ../zlib-1.2.11/qnx and ./qnx |
| 48 |
Common subdirectories: ../zlib-1.2.11/test and ./test |
| 49 |
Common subdirectories: ../zlib-1.2.11/watcom and ./watcom |
| 50 |
Common subdirectories: ../zlib-1.2.11/win32 and ./win32 |
| 51 |
Only in ./: ZLIB.patch |