diff --git a/src/Mod/Web/App/AppWeb.cpp b/src/Mod/Web/App/AppWeb.cpp index fff8c4c787..5e226dc6e0 100644 --- a/src/Mod/Web/App/AppWeb.cpp +++ b/src/Mod/Web/App/AppWeb.cpp @@ -20,11 +20,8 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include -#endif #include #include diff --git a/src/Mod/Web/App/CMakeLists.txt b/src/Mod/Web/App/CMakeLists.txt index e48746090c..bb809a309e 100644 --- a/src/Mod/Web/App/CMakeLists.txt +++ b/src/Mod/Web/App/CMakeLists.txt @@ -5,18 +5,11 @@ set(Web_LIBS SET(Web_SRCS AppWeb.cpp - PreCompiled.cpp PreCompiled.h Server.cpp Server.h ) -if(FREECAD_USE_PCH) - add_definitions(-D_PreComp_) - GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Web_SRCS}) - ADD_MSVC_PRECOMPILED_HEADER(Web PreCompiled.h PreCompiled.cpp PCH_SRCS) -endif(FREECAD_USE_PCH) - add_library(Web SHARED ${Web_SRCS}) target_include_directories( @@ -32,6 +25,13 @@ target_include_directories( ${QtNetwork_INCLUDE_DIRS} ) target_link_libraries(Web ${Web_LIBS}) + +if(FREECAD_USE_PCH) + target_precompile_headers(Web PRIVATE + $<$:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h"> + ) +endif(FREECAD_USE_PCH) + if (FREECAD_WARN_ERROR) target_compile_warn_error(Web) endif() diff --git a/src/Mod/Web/App/PreCompiled.cpp b/src/Mod/Web/App/PreCompiled.cpp deleted file mode 100644 index b25d69a63f..0000000000 --- a/src/Mod/Web/App/PreCompiled.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2014 Werner Mayer * - * * - * This file is part of the FreeCAD CAx development system. * - * * - * This library is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Library General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - * This library is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU Library General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this library; see the file COPYING.LIB. If not, * - * write to the Free Software Foundation, Inc., 59 Temple Place, * - * Suite 330, Boston, MA 02111-1307, USA * - * * - ***************************************************************************/ - -#include "PreCompiled.h" diff --git a/src/Mod/Web/App/PreCompiled.h b/src/Mod/Web/App/PreCompiled.h index 02f5cf78c2..b33f4d2376 100644 --- a/src/Mod/Web/App/PreCompiled.h +++ b/src/Mod/Web/App/PreCompiled.h @@ -25,8 +25,6 @@ #include -#ifdef _PreComp_ - // standard #include @@ -38,6 +36,4 @@ #include #include -#endif //_PreComp_ - #endif diff --git a/src/Mod/Web/App/Server.cpp b/src/Mod/Web/App/Server.cpp index 853cb54774..a7f886ae66 100644 --- a/src/Mod/Web/App/Server.cpp +++ b/src/Mod/Web/App/Server.cpp @@ -20,13 +20,11 @@ * * ***************************************************************************/ -#include "PreCompiled.h" -#ifndef _PreComp_ #include #include #include #include -#endif + #include #include