Commit c031b0c4 authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #2317 from SylvainCorlay/windows-static-target-name

Problem: cmake artefacts different from make generated artefacts
parents e5677d89 e3845386
......@@ -731,15 +731,13 @@ if (MSVC)
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
COMPILE_DEFINITIONS "DLL_EXPORT")
add_library (libzmq-static STATIC ${sources})
# NOTE: on windows platform the static library name cannot be the same as the shared library name.
# since the .dll also requires a .lib companion file for linking.
set_target_properties (libzmq-static PROPERTIES
PUBLIC_HEADER "${public_headers}"
RELEASE_POSTFIX "${MSVC_TOOLSET}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
RELWITHDEBINFO_POSTFIX "${MSVC_TOOLSET}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
DEBUG_POSTFIX "${MSVC_TOOLSET}-mt-sgd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
COMPILE_FLAGS "/DZMQ_STATIC"
OUTPUT_NAME "libzmq-static")
OUTPUT_NAME "libzmq")
else ()
add_library (libzmq SHARED ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig})
# NOTE: the SOVERSION MUST be the same as the one generated by libtool!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment