diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake index 5f243ad23bf3..79ce2c9e2bed 100644 --- a/cMake/FreeCadMacros.cmake +++ b/cMake/FreeCadMacros.cmake @@ -168,10 +168,10 @@ endmacro(generate_from_py) #endmacro(qt4_wrap_ui) -MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar) +MACRO(ADD_MSVC_PRECOMPILED_HEADER TargetName PrecompiledHeader PrecompiledSource SourcesVar) IF(MSVC) GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE) - SET(PrecompiledBinary "$(IntDir)\\$(TargetName).pch") + SET(PrecompiledBinary ${CMAKE_CURRENT_BINARY_DIR}/${TargetName}.pch) SET(Sources ${${SourcesVar}}) SET_SOURCE_FILES_PROPERTIES(${PrecompiledSource} diff --git a/src/App/CMakeLists.txt b/src/App/CMakeLists.txt index 2bf4b59b5921..713610bd4523 100644 --- a/src/App/CMakeLists.txt +++ b/src/App/CMakeLists.txt @@ -170,7 +170,7 @@ SET(FreeCADApp_SRCS if(MSVC) add_definitions(-D_PreComp_) - ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" FreeCADApp_CPP_SRCS) + ADD_MSVC_PRECOMPILED_HEADER(FreeCADApp PreCompiled.h PreCompiled.cpp FreeCADApp_CPP_SRCS) endif(MSVC) add_library(FreeCADApp SHARED ${FreeCADApp_SRCS}) diff --git a/src/Base/CMakeLists.txt b/src/Base/CMakeLists.txt index 059806c1007b..e30d237eb685 100644 --- a/src/Base/CMakeLists.txt +++ b/src/Base/CMakeLists.txt @@ -312,7 +312,7 @@ endif(FREECAD_USE_EXTERNAL_ZIPIOS) if(MSVC) add_definitions(-D_PreComp_) -ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" FreeCADBase_CPP_SRCS) +ADD_MSVC_PRECOMPILED_HEADER(FreeCADBase PreCompiled.h PreCompiled.cpp FreeCADBase_CPP_SRCS) endif(MSVC) add_library(FreeCADBase SHARED ${FreeCADBase_SRCS}) diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index a8149884b647..157454454b87 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -925,7 +925,7 @@ if(MSVC) ${Workbench_CPP_SRCS} ${FreeCADGui_CPP_SRCS} ) - ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" FreeCADGui_CPP_SRCS) + ADD_MSVC_PRECOMPILED_HEADER(FreeCADGui PreCompiled.h PreCompiled.cpp FreeCADGui_CPP_SRCS) endif(MSVC) add_library(FreeCADGui SHARED ${FreeCADGui_SRCS}) diff --git a/src/Mod/Drawing/App/CMakeLists.txt b/src/Mod/Drawing/App/CMakeLists.txt index 577af8e239db..fb40e073ae18 100644 --- a/src/Mod/Drawing/App/CMakeLists.txt +++ b/src/Mod/Drawing/App/CMakeLists.txt @@ -64,7 +64,7 @@ SET(Drawing_Templates if(MSVC) add_definitions(-D_PreComp_) GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" Drawing_CPP_SRCS ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" Drawing_CPP_SRCS) + ADD_MSVC_PRECOMPILED_HEADER(Drawing PreCompiled.h PreCompiled.cpp Drawing_CPP_SRCS) endif(MSVC) add_library(Drawing SHARED ${Drawing_SRCS} ${Features_SRCS} ${DrawingAlgos_SRCS}) diff --git a/src/Mod/Drawing/Gui/CMakeLists.txt b/src/Mod/Drawing/Gui/CMakeLists.txt index e35a904b58fe..316ee489ff15 100644 --- a/src/Mod/Drawing/Gui/CMakeLists.txt +++ b/src/Mod/Drawing/Gui/CMakeLists.txt @@ -83,7 +83,7 @@ SOURCE_GROUP("TaskDialogs" FILES ${DrawingGuiTaskDlgs_SRCS}) if(MSVC) add_definitions(-D_PreComp_) GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${DrawingGui_SRCS} ${DrawingGuiView_SRCS} ${DrawingGuiViewProvider_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" PCH_SRCS) + ADD_MSVC_PRECOMPILED_HEADER(DrawingGui PreCompiled.h PreCompiled.cpp PCH_SRCS) endif(MSVC) add_library(DrawingGui SHARED ${DrawingGui_SRCS} ${DrawingGuiView_SRCS} ${DrawingGuiViewProvider_SRCS}) diff --git a/src/Mod/Mesh/App/CMakeLists.txt b/src/Mod/Mesh/App/CMakeLists.txt index f3c3c94a3721..b2b81c7ebec6 100644 --- a/src/Mod/Mesh/App/CMakeLists.txt +++ b/src/Mod/Mesh/App/CMakeLists.txt @@ -334,7 +334,7 @@ SET(Mesh_SRCS if(MSVC) add_definitions(-D_PreComp_) GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Core_SRCS} ${Mesh_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER("PreCompiled.h" "PreCompiled.cpp" PCH_SRCS) + ADD_MSVC_PRECOMPILED_HEADER(Mesh PreCompiled.h PreCompiled.cpp PCH_SRCS) endif(MSVC) add_library(Mesh SHARED ${Core_SRCS} ${WildMagic4_SRCS} ${Mesh_SRCS})