MDEV-6016 Packaging error with cmake 2.8.12 and greater

Avoid CPack complaints when a pdb file is missing for a static library
(patch from Vladislav Vaintroub)
This commit is contained in:
Elena Stepanova 2014-04-03 21:58:56 +04:00
parent cb67dcb618
commit 0566c34afd

View File

@ -60,7 +60,11 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
IF(NOT comp)
SET(comp Debuginfo_archive_only) # not in MSI
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
IF(type MATCHES "STATIC")
# PDB for static libraries might be unsupported http://public.kitware.com/Bug/view.php?id=14600
SET(opt OPTIONAL)
ENDIF()
INSTALL(FILES ${pdb_location} DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp} ${opt})
ENDFOREACH()
ENDIF()
ENDFUNCTION()