diff --git a/CMakeLists.txt b/CMakeLists.txt index b653827b17..25042ed729 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -341,7 +341,9 @@ add_definitions(-DWX_COMPATIBILITY) find_package( OpenGL QUIET ) check_find_package_result( OPENGL_FOUND "OpenGL" ) -if( KICAD_SCRIPTING_WXPYTHON ) + +if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) + add_custom_target( lib-wxpython ) include( download_pcre ) include( download_swig ) @@ -349,9 +351,7 @@ add_custom_target( lib-wxpython ) add_dependencies( lib-wxpython pcre ) add_dependencies( lib-wxpython swig ) add_dependencies( lib-wxpython libwxpython ) -endif() -if( KICAD_BUILD_STATIC OR KICAD_BUILD_DYNAMIC ) #set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib;.dll") diff --git a/CMakeModules/download_swig.cmake b/CMakeModules/download_swig.cmake index 7ee8a4ebc6..e72918e89f 100644 --- a/CMakeModules/download_swig.cmake +++ b/CMakeModules/download_swig.cmake @@ -42,8 +42,10 @@ if (APPLE) set( SWIG_CFLAGS "CFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" ) set( SWIG_CXXFLAGS "CXXFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" ) set( SWIG_LDFLAGS "LDFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" ) - set( SWIG_PYTHON "--with-python=/usr/bin/python2.6" ) endif( CMAKE_OSX_ARCHITECTURES ) + + set( SWIG_PYTHON "--with-python=/usr/bin/python2.6" ) + set( SWIG_OPTS --disable-dependency-tracking ) endif(APPLE) # = ${PREFIX}/src/glew @@ -66,7 +68,7 @@ ExternalProject_Add( swig UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${SWIG_ROOT}" #PATCH_COMMAND "true" - CONFIGURE_COMMAND ./configure --prefix=${SWIG_ROOT} --with-pcre-prefix=${PCRE_ROOT} ${SWIG_CFLAGS} ${SWIG_LDFLAGS} ${SWIG_CXXFLAGS} ${SWIG_PYTHON} + CONFIGURE_COMMAND ./configure --prefix=${SWIG_ROOT} --with-pcre-prefix=${PCRE_ROOT} ${SWIG_CFLAGS} ${SWIG_LDFLAGS} ${SWIG_CXXFLAGS} ${SWIG_PYTHON} ${SWIG_OPTS} #BINARY_DIR "${PREFIX}" diff --git a/CMakeModules/download_wxpython.cmake b/CMakeModules/download_wxpython.cmake index 60225b40f4..4e1a71f688 100644 --- a/CMakeModules/download_wxpython.cmake +++ b/CMakeModules/download_wxpython.cmake @@ -74,7 +74,7 @@ ExternalProject_Add( libwxpython UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${LIBWXPYTHON_ROOT}" COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --clean - CONFIGURE_COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --prefix=/Users/marco/Development/product/libwxpython_root --unicode --install ${LIBWXPYTHON_OPTS} + CONFIGURE_COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --prefix=${LIBWXPYTHON_ROOT} --unicode --install ${LIBWXPYTHON_OPTS} #BINARY_DIR "${PREFIX}" diff --git a/Documentation/compiling/mac-osx.txt b/Documentation/compiling/mac-osx.txt index ac606ff3c5..cb24f9632d 100644 --- a/Documentation/compiling/mac-osx.txt +++ b/Documentation/compiling/mac-osx.txt @@ -27,18 +27,21 @@ Building Kicad with no support for Scripting If you set KICAD_BUILD_DYNAMIC the building system will build all and include the needed libraries for each executable in its bundle + cmake -DKICAD_BUILD_DYNAMIC=ON . + make + Building Kicad with support for Scripting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Due some problems with some dependencies the build of this kind of binary is a bit more complex, you should initially set KICAD_BUILD_DYNAMIC then issue for example - cmake -DKICAD_BUILD_DYNAMIC=ON + cmake -DKICAD_BUILD_DYNAMIC=ON . make lib-wxpython After successfully building you can set your KICAD_SCRIPTING* options (for example): - cmake -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_WXPYTHON=ON + cmake -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_WXPYTHON=ON . make The system will build all accordling your choices and package all in the bundle diff --git a/patches/wxpython-3.0.0_macosx_multiarch.patch b/patches/wxpython-3.0.0_macosx_multiarch.patch index e8270251b7..d3b70dd0ec 100644 --- a/patches/wxpython-3.0.0_macosx_multiarch.patch +++ b/patches/wxpython-3.0.0_macosx_multiarch.patch @@ -1,6 +1,6 @@ === modified file 'wxPython/config.py' ---- wxPython/config.py 2014-02-07 20:23:11 +0000 -+++ wxPython/config.py 2014-02-07 21:00:18 +0000 +--- wxPython/config.py 2014-02-08 12:23:31 +0000 ++++ wxPython/config.py 2014-02-08 13:58:07 +0000 @@ -22,6 +22,7 @@ import sys, os, glob, fnmatch, tempfile @@ -17,8 +17,8 @@ - cflags.append(ARCH) - lflags.append("-arch") - lflags.append(ARCH) -+ cflags.append('-arch ' + re.sub(',',' -arch ',ARCH)) -+ lflags.append('-arch ' + re.sub(',',' -arch ',ARCH)) ++ cflags.append("-arch " + re.sub(","," -arch ",ARCH)) ++ #lflags.append("-arch " + re.sub(","," -arch ",ARCH)) if not os.environ.get('CC') or not os.environ.get('CXX'): os.environ["CXX"] = getWxConfigValue('--cxx') diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index e486d013d9..c1cf74bd32 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -598,7 +598,7 @@ if( KICAD_SCRIPTING ) # copies all into PYTHON_DEST then all into the bundle ! add_custom_target( _pcbnew_py_copy ALL COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py "${PYTHON_DEST}" - DEPENDS FixSwigImportsModuleScripting + DEPENDS FixSwigImportsScripting COMMENT "Copying pcbnew.py into PYTHON_DEST" ) diff --git a/tools/Info.plist b/tools/Info.plist new file mode 100644 index 0000000000..e69de29bb2