diff options
-rw-r--r-- | CMakeLists.txt | 8 |
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 | ||
123 | if(NOT MINGW) | 123 | if(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 | ) |
127 | endif() | 127 | endif() |
@@ -134,7 +134,7 @@ string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" | |||
134 | if(MINGW) | 134 | if(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) |
148 | endif(MINGW) | 148 | endif(MINGW) |
149 | 149 | ||
150 | add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | 150 | add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
151 | add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | 151 | add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
152 | set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) | 152 | set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) |
153 | set_target_properties(zlib PROPERTIES SOVERSION 1) | 153 | set_target_properties(zlib PROPERTIES SOVERSION 1) |