PCH filename depends on current binary dir

Fixes #1572
This commit is contained in:
David Neto 2018-11-12 17:09:07 -05:00
Родитель d509a5eec6
Коммит 0392544b7a
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -50,7 +50,7 @@ macro(glslang_pch SRCS PCHCPP)
if (CMAKE_GENERATOR MATCHES "^Visual Studio") if (CMAKE_GENERATOR MATCHES "^Visual Studio")
set(PCH_NAME "$(IntDir)\\pch.pch") set(PCH_NAME "$(IntDir)\\pch.pch")
else() else()
set(PCH_NAME "pch.pch") set(PCH_NAME "${CMAKE_CURRENT_BINARY_DIR}/pch.pch")
endif() endif()
# make source files use/depend on PCH_NAME # make source files use/depend on PCH_NAME
set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}") set_source_files_properties(${${SRCS}} PROPERTIES COMPILE_FLAGS "/Yupch.h /FIpch.h /Fp${PCH_NAME} /Zm300" OBJECT_DEPENDS "${PCH_NAME}")