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 6aabf7d..2b61875 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) | |||
| 87 | # As own target for usage in multiple libraries | 87 | # As own target for usage in multiple libraries |
| 88 | if(NOT TARGET ${PCH_PCH_TARGET}_pch) | 88 | if(NOT TARGET ${PCH_PCH_TARGET}_pch) |
| 89 | add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) | 89 | add_library(${PCH_PCH_TARGET}_pch STATIC ${pch_source}) |
| 90 | set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | 90 | set_target_properties(${PCH_PCH_TARGET}_pch PROPERTIES COMPILE_PDB_NAME vc140 |
| 91 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | ||
| 91 | endif() | 92 | endif() |
| 92 | # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). | 93 | # From VS2012 onwards, precompiled headers have to be linked against (LNK2011). |
| 93 | target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) | 94 | target_link_libraries(${target} PUBLIC ${PCH_PCH_TARGET}_pch) |
| 94 | set_target_properties(${target} PROPERTIES COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | 95 | set_target_properties(${target} PROPERTIES COMPILE_PDB_NAME vc140 |
| 96 | COMPILE_PDB_OUTPUT_DIRECTORY ${PRECOMPILEDHEADER_DIR}) | ||
| 95 | else() | 97 | else() |
| 96 | # As part of the target | 98 | # As part of the target |
| 97 | target_sources(${target} PRIVATE ${pch_source}) | 99 | target_sources(${target} PRIVATE ${pch_source}) |
