Commit ebe4eab4 authored by Steve-o's avatar Steve-o Committed by Steven McCoy

Detect compiler version to tag libraries.

parent 046c8ec7
......@@ -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)
......
......@@ -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()
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