0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Detect compiler version to tag libraries.

This commit is contained in:
Steve-o 2012-10-12 16:49:15 +00:00 committed by Steven McCoy
parent 046c8ec7eb
commit ebe4eab477
2 changed files with 14 additions and 6 deletions

View File

@ -242,15 +242,15 @@ endforeach (txt ${docs})
add_library(libzmq SHARED ${sources} ${html-docs} ${CMAKE_BINARY_DIR}/NSIS.template.in)
target_link_libraries(libzmq ws2_32.lib rpcrt4.lib)
set_target_properties(libzmq PROPERTIES RELEASE_POSTFIX "-v100-mt" DEBUG_POSTFIX "-v100-mt-gd")
set_target_properties(libzmq PROPERTIES RELEASE_POSTFIX "${_zmq_COMPILER}-mt" DEBUG_POSTFIX "${_zmq_COMPILER}-mt-gd")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq-v100-mt-gd.dll DESTINATION bin COMPONENT SDK)
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq-v100-mt-gd.lib DESTINATION lib COMPONENT SDK)
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq-v100-mt-gd.pdb DESTINATION lib COMPONENT SDK)
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq${_zmq_COMPILER}-mt-gd.dll DESTINATION bin COMPONENT SDK)
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq${_zmq_COMPILER}-mt-gd.lib DESTINATION lib COMPONENT SDK)
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq${_zmq_COMPILER}-mt-gd.pdb DESTINATION lib COMPONENT SDK)
else (CMAKE_BUILD_TYPE STREQUAL "Debug")
install (TARGETS libzmq RUNTIME DESTINATION bin COMPONENT Runtime)
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq-v100-mt.lib DESTINATION lib COMPONENT SDK)
install (FILES ${CMAKE_BINARY_DIR}/lib/libzmq${_zmq_COMPILER}-mt.lib DESTINATION lib COMPONENT SDK)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
install (FILES ${headers} DESTINATION include COMPONENT SDK)

View File

@ -24,4 +24,12 @@
MESSAGE(STATUS "Detecting ZMQ - failed")
ENDIF()
if (MSVC11)
set(_zmq_COMPILER "-v110")
elseif (MSVC10)
set(_zmq_COMPILER "-v100")
elseif (MSVC90)
set(_zmq_COMPILER "-v90")
else()
set(_zmq_COMPILER "")
endif()