Build: Fixed VS always triggering a full build when PCH is enabled, even if only a source file was edited

(cherry picked from commit 9b1dfe5e5e)
(cherry picked from commit b64583b7c1)
This commit is contained in:
Shauren
2019-06-02 21:09:53 +02:00
committed by Ovahlord
parent ec6d64b9c6
commit ad377241f9
2 changed files with 27 additions and 8 deletions

View File

@@ -166,6 +166,11 @@ foreach(SCRIPT_MODULE ${SCRIPT_MODULE_LIST})
trinity-core-interface
PUBLIC
game)
target_include_directories(${SCRIPT_MODULE_PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(${SCRIPT_MODULE_PROJECT_NAME}
PROPERTIES
FOLDER
@@ -221,7 +226,7 @@ set_target_properties(scripts
# Generate precompiled header
if (USE_SCRIPTPCH)
list(APPEND ALL_SCRIPT_PROJECTS scripts ${DYNAMIC_SCRIPT_MODULE_PROJECTS})
add_cxx_pch("${ALL_SCRIPT_PROJECTS}" ${PRIVATE_PCH_HEADER} ${PRIVATE_PCH_SOURCE})
add_cxx_pch("${ALL_SCRIPT_PROJECTS}" ${PRIVATE_PCH_HEADER})
endif()
# Remove all shared libraries in the installl directory which