mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Problem: name of static library generated by cmake differs from the behavior of kernel.
Solution: Change the target output name from libzmq-static to libzmq.
This commit is contained in:
parent
ee9751ec25
commit
c65a27213a
@ -731,6 +731,8 @@ if (MSVC)
|
|||||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
|
||||||
COMPILE_DEFINITIONS "DLL_EXPORT")
|
COMPILE_DEFINITIONS "DLL_EXPORT")
|
||||||
add_library (libzmq-static STATIC ${sources})
|
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
|
set_target_properties (libzmq-static PROPERTIES
|
||||||
PUBLIC_HEADER "${public_headers}"
|
PUBLIC_HEADER "${public_headers}"
|
||||||
RELEASE_POSTFIX "${MSVC_TOOLSET}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
|
RELEASE_POSTFIX "${MSVC_TOOLSET}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
|
||||||
@ -765,7 +767,7 @@ else ()
|
|||||||
set_target_properties (libzmq-static PROPERTIES
|
set_target_properties (libzmq-static PROPERTIES
|
||||||
PUBLIC_HEADER "${public_headers}"
|
PUBLIC_HEADER "${public_headers}"
|
||||||
COMPILE_DEFINITIONS "ZMQ_STATIC"
|
COMPILE_DEFINITIONS "ZMQ_STATIC"
|
||||||
OUTPUT_NAME "libzmq-static"
|
OUTPUT_NAME "libzmq"
|
||||||
PREFIX "")
|
PREFIX "")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user