diff --git a/CMakeLists.txt b/CMakeLists.txt index 44e56d5c72..87bdd4efee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -347,6 +347,12 @@ check_find_package_result( OPENGL_FOUND "OpenGL" ) if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) add_custom_target( lib-wxpython ) + include( download_pcre ) + include( download_swig ) + include( download_wxpython ) + add_dependencies( lib-wxpython pcre ) + add_dependencies( lib-wxpython swig ) + add_dependencies( lib-wxpython libwxpython ) #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib;.dll") @@ -394,12 +400,6 @@ add_custom_target( lib-wxpython ) set(wxWidgets_INCLUDE_DIRS ${LIBWXPYTHON_ROOT}/include/wx-3.0 ) set(wxWidgets_LIBRARY_DIRS ${LIBWXPYTHON_ROOT}/lib ) - include( download_pcre ) - include( download_swig ) - include( download_wxpython ) - add_dependencies( lib-wxpython pcre ) - add_dependencies( lib-wxpython swig ) - add_dependencies( lib-wxpython libwxpython ) add_dependencies( lib-dependencies libwxpython ) else() include( download_wxwidgets ) diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 49cae3dea4..d070e1825f 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -169,9 +169,13 @@ bool EDA_APP::OnInit() bundledir.RemoveLastDir(); // Prepend in PYTHONPATH the content of the bundle libraries ! - wxSetEnv("PYTHONPATH",((wxGetenv("PYTHONPATH") != NULL ) ? (wxString(wxGetenv("PYTHONPATH")) + ":") : wxString("")) - + bundledir.GetPath() + - "/Frameworks/wxPython/lib/python2.6/site-packages/wx-3.0-osx_cocoa" ); + wxSetEnv("PYTHONPATH",((wxGetenv("PYTHONPATH") != NULL ) ? (wxString(wxGetenv("PYTHONPATH")) + ":") : wxString("")) + + "/Library/Application Support/kicad/scripting" + ":" + + bundledir.GetPath() + "/PlugIns" + ":" + + wxString( wxGetenv("HOME") ) + "/Library/Application Support/kicad/scripting" + + bundledir.GetPath() + + "/Frameworks/wxPython/lib/python2.6/site-packages/wx-3.0-osx_cocoa" + ); #endif #endif // On linux and osx, 2 others paths are