Fix CMake compilation of static lib for MSVC2010 x64.
This commit is contained in:
parent
bfac156463
commit
486ef7b4b4
@ -121,7 +121,7 @@ set(ZLIB_SRCS
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(NOT MINGW)
|
if(NOT MINGW)
|
||||||
set(ZLIB_SRCS ${ZLIB_SRCS}
|
set(ZLIB_DLL_SRCS
|
||||||
win32/zlib1.rc # If present will override custom build rule below.
|
win32/zlib1.rc # If present will override custom build rule below.
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@ -134,7 +134,7 @@ string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
|||||||
if(MINGW)
|
if(MINGW)
|
||||||
# This gets us DLL resource information when compiling on MinGW.
|
# This gets us DLL resource information when compiling on MinGW.
|
||||||
if(NOT CMAKE_RC_COMPILER)
|
if(NOT CMAKE_RC_COMPILER)
|
||||||
SET(CMAKE_RC_COMPILER windres.exe)
|
set(CMAKE_RC_COMPILER windres.exe)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||||
@ -144,10 +144,10 @@ if(MINGW)
|
|||||||
-I ${CMAKE_CURRENT_BINARY_DIR}
|
-I ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
|
||||||
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
|
-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)
|
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})
|
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 DEFINE_SYMBOL ZLIB_DLL)
|
||||||
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user