Merge pull request #8000 from donovaly/PD-PCH-fix

[PD] App: precomnpiled header fixes
This commit is contained in:
Uwe
2022-12-09 20:07:32 +01:00
committed by GitHub
5 changed files with 12 additions and 13 deletions

View File

@@ -63,7 +63,7 @@ extern PyObject* initModule();
}
/* Python entry */
PyMOD_INIT_FUNC(_PartDesign)
PyMOD_INIT_FUNC(PartDesign)
{
// load dependent module
try {

View File

@@ -32,7 +32,7 @@ namespace PartDesign {
class Module : public Py::ExtensionModule<Module>
{
public:
Module() : Py::ExtensionModule<Module>("_PartDesign")
Module() : Py::ExtensionModule<Module>("PartDesign")
{
add_varargs_method("makeFilletArc",&Module::makeFilletArc,
"makeFilletArc(...) -- Fillet arc."

View File

@@ -144,16 +144,16 @@ SET(PartDesign_SRCS
${Python_SRCS}
)
if(FREECAD_USE_PCH)
add_definitions(-D_PreComp_)
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${PartDesign_SRCS})
ADD_MSVC_PRECOMPILED_HEADER(PartDesign PreCompiled.h PreCompiled.cpp PCH_SRCS)
endif(FREECAD_USE_PCH)
add_library(PartDesign SHARED ${PartDesign_SRCS})
target_link_libraries(PartDesign ${PartDesign_LIBS})
if(FREECAD_USE_PCH)
add_definitions(-D_PreComp_)
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PartDesign_CPP_SRCS ${PartDesign_SRCS})
ADD_MSVC_PRECOMPILED_HEADER(PartDesign PreCompiled.h PreCompiled.cpp PartDesign_CPP_SRCS)
endif(FREECAD_USE_PCH)
SET_BIN_DIR(PartDesign _PartDesign /Mod/PartDesign)
SET_BIN_DIR(PartDesign PartDesign /Mod/PartDesign)
SET_PYTHON_PREFIX_SUFFIX(PartDesign)
INSTALL(TARGETS PartDesign DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -20,5 +20,4 @@
* *
***************************************************************************/
#include "PreCompiled.h"

View File

@@ -1,3 +1,3 @@
import _PartDesign
makeFilletArc = _PartDesign.makeFilletArc
import PartDesign
makeFilletArc = PartDesign.makeFilletArc