aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ee3bc4..cbb3d4c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -121,7 +121,7 @@ set(ZLIB_SRCS
121) 121)
122 122
123if(NOT MINGW) 123if(NOT MINGW)
124 set(ZLIB_SRCS ${ZLIB_SRCS} 124 set(ZLIB_DLL_SRCS
125 win32/zlib1.rc # If present will override custom build rule below. 125 win32/zlib1.rc # If present will override custom build rule below.
126 ) 126 )
127endif() 127endif()
@@ -134,7 +134,7 @@ string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
134if(MINGW) 134if(MINGW)
135 # This gets us DLL resource information when compiling on MinGW. 135 # This gets us DLL resource information when compiling on MinGW.
136 if(NOT CMAKE_RC_COMPILER) 136 if(NOT CMAKE_RC_COMPILER)
137 SET(CMAKE_RC_COMPILER windres.exe) 137 set(CMAKE_RC_COMPILER windres.exe)
138 endif() 138 endif()
139 139
140 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj 140 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
@@ -144,10 +144,10 @@ if(MINGW)
144 -I ${CMAKE_CURRENT_BINARY_DIR} 144 -I ${CMAKE_CURRENT_BINARY_DIR}
145 -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj 145 -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
146 -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) 146 -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
147 set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) 147 set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
148endif(MINGW) 148endif(MINGW)
149 149
150add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) 150add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
151add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) 151add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
152set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) 152set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
153set_target_properties(zlib PROPERTIES SOVERSION 1) 153set_target_properties(zlib PROPERTIES SOVERSION 1)