diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 93815d9..4584bd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -5,9 +5,6 @@ project(zlib C) | |||
5 | 5 | ||
6 | set(VERSION "1.2.12.1") | 6 | set(VERSION "1.2.12.1") |
7 | 7 | ||
8 | option(ASM686 "Enable building i686 assembly implementation") | ||
9 | option(AMD64 "Enable building amd64 assembly implementation") | ||
10 | |||
11 | set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") | 8 | set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") |
12 | set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") | 9 | set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") |
13 | set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") | 10 | set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers") |
@@ -129,39 +126,6 @@ if(NOT MINGW) | |||
129 | ) | 126 | ) |
130 | endif() | 127 | endif() |
131 | 128 | ||
132 | if(CMAKE_COMPILER_IS_GNUCC) | ||
133 | if(ASM686) | ||
134 | set(ZLIB_ASMS contrib/asm686/match.S) | ||
135 | elseif (AMD64) | ||
136 | set(ZLIB_ASMS contrib/amd64/amd64-match.S) | ||
137 | endif () | ||
138 | |||
139 | if(ZLIB_ASMS) | ||
140 | add_definitions(-DASMV) | ||
141 | set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE) | ||
142 | endif() | ||
143 | endif() | ||
144 | |||
145 | if(MSVC) | ||
146 | if(ASM686) | ||
147 | ENABLE_LANGUAGE(ASM_MASM) | ||
148 | set(ZLIB_ASMS | ||
149 | contrib/masmx86/inffas32.asm | ||
150 | contrib/masmx86/match686.asm | ||
151 | ) | ||
152 | elseif (AMD64) | ||
153 | ENABLE_LANGUAGE(ASM_MASM) | ||
154 | set(ZLIB_ASMS | ||
155 | contrib/masmx64/gvmat64.asm | ||
156 | contrib/masmx64/inffasx64.asm | ||
157 | ) | ||
158 | endif() | ||
159 | |||
160 | if(ZLIB_ASMS) | ||
161 | add_definitions(-DASMV -DASMINF) | ||
162 | endif() | ||
163 | endif() | ||
164 | |||
165 | # parse the full version number from zlib.h and include in ZLIB_FULL_VERSION | 129 | # parse the full version number from zlib.h and include in ZLIB_FULL_VERSION |
166 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) | 130 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) |
167 | string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" | 131 | string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" |
@@ -183,8 +147,8 @@ if(MINGW) | |||
183 | set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) | 147 | set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) |
184 | endif(MINGW) | 148 | endif(MINGW) |
185 | 149 | ||
186 | add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | 150 | add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
187 | add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) | 151 | add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) |
188 | set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) | 152 | set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) |
189 | set_target_properties(zlib PROPERTIES SOVERSION 1) | 153 | set_target_properties(zlib PROPERTIES SOVERSION 1) |
190 | 154 | ||