From 33db5b43ba285133de9be6ed20ef3e7aed8aa5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Mr=C3=A1z?= Date: Thu, 14 Sep 2017 11:50:11 +0200 Subject: [PATCH] Installing pdb files also in release build. --- googletest/cmake/internal_utils.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 1fad232c14..1c8f4c8bf4 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -266,15 +266,22 @@ endfunction() macro( install_pdb_files target ) if(MSVC AND NOT ${CMAKE_VERSION} VERSION_LESS 3.1.0) # COMPILE_PDB_... properties where introduced with cmake 3.1 set(debugOutputDir ${PROJECT_BINARY_DIR}/Debug) + set(releaseOutputDir ${PROJECT_BINARY_DIR}/Release) # make sure the compiler generated .pdb files are palced besides the .lib files if(NOT BUILD_SHARED_LIBS) set_target_properties( ${target} PROPERTIES COMPILE_PDB_NAME_DEBUG ${target}d COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG ${debugOutputDir} ) + set_target_properties( ${target} PROPERTIES COMPILE_PDB_NAME_RELEASE ${target} COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE ${releaseOutputDir} ) endif() install( FILES ${debugOutputDir}/${target}d.pdb DESTINATION "lib" CONFIGURATIONS Debug ) + install( + FILES ${releaseOutputDir}/${target}.pdb + DESTINATION "lib" + CONFIGURATIONS Release + ) endif() endmacro()