0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 23:01:04 +08:00

Fix cmake install error when BUILD_SHARED is off

This fixes an error with the cmake install configuration, which
attempted an invalid copy of a .pdb file on windows, when the
BUILD_SHARED option is disabled.
This commit is contained in:
Francis Hart 2018-02-14 15:00:21 +02:00
parent d470475272
commit ef7cb96782

View File

@ -1106,7 +1106,7 @@ if (MSVC)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT SDK)
if (NOT CMAKE_PDB_OUTPUT_DIRECTORY)
if (NOT CMAKE_PDB_OUTPUT_DIRECTORY AND BUILD_SHARED)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/bin/libzmq${MSVC_TOOLSET}-mt-gd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}.pdb DESTINATION lib
COMPONENT SDK)
endif ()