|
|
|
@ -121,7 +121,7 @@ set(ZLIB_SRCS |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
if(NOT MINGW) |
|
|
|
|
set(ZLIB_SRCS ${ZLIB_SRCS} |
|
|
|
|
set(ZLIB_DLL_SRCS |
|
|
|
|
win32/zlib1.rc # If present will override custom build rule below. |
|
|
|
|
) |
|
|
|
|
endif() |
|
|
|
@ -134,7 +134,7 @@ string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" |
|
|
|
|
if(MINGW) |
|
|
|
|
# This gets us DLL resource information when compiling on MinGW. |
|
|
|
|
if(NOT CMAKE_RC_COMPILER) |
|
|
|
|
SET(CMAKE_RC_COMPILER windres.exe) |
|
|
|
|
set(CMAKE_RC_COMPILER windres.exe) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj |
|
|
|
@ -144,10 +144,10 @@ if(MINGW) |
|
|
|
|
-I ${CMAKE_CURRENT_BINARY_DIR} |
|
|
|
|
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj |
|
|
|
|
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) |
|
|
|
|
set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) |
|
|
|
|
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) |
|
|
|
|
endif(MINGW) |
|
|
|
|
|
|
|
|
|
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
|
|
|
|
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
|
|
|
|
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
|
|
|
|
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) |
|
|
|
|
set_target_properties(zlib PROPERTIES SOVERSION 1) |
|
|
|
|