diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index e2d7f80496..ac500c2b22 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -250,8 +250,10 @@ endif() if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) - set(SWIG_FLAGS -I${CMAKE_CURRENT_SOURCE_DIR}/../.. -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/../include -I${CMAKE_CURRENT_SOURCE_DIR}/../scripting -DDEBUG) - + set(SWIG_FLAGS -I${CMAKE_CURRENT_SOURCE_DIR}/../.. -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/../include -I${CMAKE_CURRENT_SOURCE_DIR}/../scripting ) + if (DEBUG) + set(SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG) + endif() # collect CFLAGS , and pass them to swig later get_directory_property( DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS ) diff --git a/scripting/kicad.i b/scripting/kicad.i index becaa24027..4719c8b559 100644 --- a/scripting/kicad.i +++ b/scripting/kicad.i @@ -36,8 +36,12 @@ %include %include -%nodefaultctor EDA_ITEM; +/* ignore some constructors of EDA_ITEM that will make the build fail */ +%nodefaultctor EDA_ITEM; +%ignore EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ); +%ignore EDA_ITEM::EDA_ITEM( KICAD_T idType ); +%ignore EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ); /* swig tries to wrap SetBack/SetNext on derived classes, but this method is private for most childs, so if we don't ignore it it won't compile */