mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 23:51:04 +08:00
fixed issue with ticket #1517 (wrong lib output name in MSVC CMake build) and apply some improvements in CMake build system
This commit is contained in:
parent
8e6ef4616e
commit
a50834cbec
@ -589,18 +589,18 @@ if(MSVC)
|
|||||||
RELEASE_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
|
RELEASE_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
|
||||||
DEBUG_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-sgd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
|
DEBUG_POSTFIX "-${CMAKE_VS_PLATFORM_TOOLSET}-mt-sgd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}"
|
||||||
COMPILE_FLAGS "/D ZMQ_STATIC"
|
COMPILE_FLAGS "/D ZMQ_STATIC"
|
||||||
OUTPUT_NAME "libzmq")
|
OUTPUT_NAME "libzmq-static")
|
||||||
else()
|
else()
|
||||||
add_library(libzmq SHARED ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig})
|
add_library(libzmq SHARED ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig})
|
||||||
set_target_properties(libzmq PROPERTIES
|
set_target_properties(libzmq PROPERTIES
|
||||||
COMPILE_DEFINITIONS "DLL_EXPORT"
|
COMPILE_DEFINITIONS "DLL_EXPORT"
|
||||||
PUBLIC_HEADER "${public_headers}"
|
PUBLIC_HEADER "${public_headers}"
|
||||||
VERSION ${ZMQ_VERSION}
|
VERSION ${ZMQ_VERSION}
|
||||||
SOVERSION "${ZMQ_VERSION_MAJOR}.${ZMQ_VERSION_MINOR}.0")
|
SOVERSION "${ZMQ_VERSION_MAJOR}.${ZMQ_VERSION_MINOR}.0"
|
||||||
|
OUTPUT_NAME "libzmq")
|
||||||
if(ZMQ_BUILD_FRAMEWORK)
|
if(ZMQ_BUILD_FRAMEWORK)
|
||||||
set_target_properties(libzmq PROPERTIES
|
set_target_properties(libzmq PROPERTIES
|
||||||
FRAMEWORK TRUE
|
FRAMEWORK TRUE
|
||||||
OUTPUT_NAME "ZeroMQ"
|
|
||||||
MACOSX_FRAMEWORK_IDENTIFIER "org.zeromq.libzmq"
|
MACOSX_FRAMEWORK_IDENTIFIER "org.zeromq.libzmq"
|
||||||
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${ZMQ_VERSION}
|
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${ZMQ_VERSION}
|
||||||
MACOSX_FRAMEWORK_BUNDLE_VERSION ${ZMQ_VERSION})
|
MACOSX_FRAMEWORK_BUNDLE_VERSION ${ZMQ_VERSION})
|
||||||
@ -610,16 +610,12 @@ else()
|
|||||||
MACOSX_PACKAGE_LOCATION etc)
|
MACOSX_PACKAGE_LOCATION etc)
|
||||||
set_source_files_properties(${zmq-pkgconfig} PROPERTIES
|
set_source_files_properties(${zmq-pkgconfig} PROPERTIES
|
||||||
MACOSX_PACKAGE_LOCATION lib/pkgconfig)
|
MACOSX_PACKAGE_LOCATION lib/pkgconfig)
|
||||||
else()
|
|
||||||
set_target_properties(libzmq PROPERTIES
|
|
||||||
OUTPUT_NAME "zmq"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
add_library(libzmq-static STATIC ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig})
|
add_library(libzmq-static STATIC ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig})
|
||||||
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 "zmq-static")
|
OUTPUT_NAME "libzmq-static")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(libzmq ${SODIUM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(libzmq ${SODIUM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user