diff options
Diffstat (limited to 'project/cmake/scripts/windows/macros.cmake')
-rw-r--r-- | project/cmake/scripts/windows/macros.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/project/cmake/scripts/windows/macros.cmake b/project/cmake/scripts/windows/macros.cmake index 6aabf7d5a8..2b61875182 100644 --- a/project/cmake/scripts/windows/macros.cmake +++ b/project/cmake/scripts/windows/macros.cmake @@ -87,11 +87,13 @@ function(add_precompiled_header target pch_header pch_source) # As own target for usage in multiple libraries if(NOT TARGET ${PCH_PCH_TARGET}_pch) add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) - set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) + set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_NAME vc140 + COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) endif() # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) - set_target_properties(${target} PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) + set_target_properties(${target} PROPERTIES COMPILE_PDB_NAME vc140 + COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) else() # As part of the target target_sources(${target} PRIVATE ${pch_source}) |