Merge pull request #1573 from dneto0/fix-pch

PCH filename depends on current binary dir
This commit is contained in:
John Kessenich 2018-11-12 16:13:40 -07:00 committed by GitHub
commit 97573b0c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ macro(glslang_pch SRCS PCHCPP)
if (CMAKE_GENERATOR MATCHES "^Visual Studio")
set(PCH_NAME "$(IntDir)\\pch.pch")
else()
set(PCH_NAME "pch.pch")
set(PCH_NAME "${CMAKE_CURRENT_BINARY_DIR}/pch.pch")
endif()
# 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}")