Remove OSX dependency builder code from CMake files.

* Remove USE_OSX_DEPS_BUILDER option.
* Remove all download_foo.cmake files used by the OSX dependency builder.
This commit is contained in:
Wayne Stambaugh 2015-12-01 09:44:40 -05:00
parent 7b0d981f21
commit 6f5a49bb60
10 changed files with 0 additions and 909 deletions

View File

@ -62,10 +62,6 @@ option( KICAD_BUILD_DYNAMIC
"Build dependencies as shared libraries. Required for wxPython support. OXS only. (default OFF)."
)
option( USE_OSX_DEPS_BUILDER
"Build dependencies from source instead of dependencies installed on system. OSX only. (default OFF)."
)
# WARNING: KiCad developers strongly advise you to build Boost with supplied patches,
# as it is known to work with KiCad. Other versions may contain bugs that may result
# in KiCad errors.
@ -460,88 +456,6 @@ check_find_package_result( OPENGL_FOUND "OpenGL" )
# Always defined, empty if no libraries are to be built
add_custom_target( lib-dependencies )
# Only download and build all dependencies from source on OSX if the user specifically requests
# it. Otherwise, respect the developers wishes to use the dependencies already installed on
# their system
if( APPLE AND USE_OSX_DEPS_BUILDER )
# This should be built in all cases, if swig exec is not available
# will be impossible also enable SCRIPTING being for PCBNEW required immediately
include( download_pcre )
include( download_swig )
#set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;.so;.dylib;.dll")
if( KICAD_BUILD_STATIC AND KICAD_BUILD_DYNAMIC )
message(FATAL_ERROR "You can't build STATIC and DYNAMIC together")
endif()
if( KICAD_BUILD_STATIC )
message(STATUS "KICAD_BUILD_STATIC set")
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES )
message(FATAL_ERROR "KICAD_SCRIPTING* is not supported with KICAD_BUILD_STATIC, please select KICAD_BUILD_DYNAMIC" )
endif()
endif()
if( KICAD_BUILD_DYNAMIC )
message(STATUS "KICAD_BUILD_DYNAMIC set")
endif()
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_WXPYTHON OR KICAD_SCRIPTING_MODULES )
message(STATUS "Scripting ENABLED")
include( download_wxpython )
set( SWIG_EXECUTABLE ${SWIG_ROOT}/bin/swig )
set( SWIG_INCLUDE ${SWIG_ROOT}/include )
set( PYTHON_DEST ${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages )
if( NOT EXISTS ${SWIG_EXECUTABLE} )
set(KICAD_SCRIPTING CACHE OFF FORCE "Disabling KICAD_SCRIPTING")
message( STATUS "KICAD_SCRIPTING Enabled but SWIG not found, please disable and before reenabling execute: make swig")
message( FATAL_ERROR "Missing SWIG!")
endif()
message(STATUS "SWIG_EXECUTABLE: ${SWIG_EXECUTABLE}")
set( PYTHON_DEST ${LIBWXPYTHON_ROOT}/wxPython/lib/python2.6/site-packages )
add_dependencies( lib-dependencies libwxpython )
add_dependencies( lib-dependencies swig )
else()
include( download_wxwidgets )
add_dependencies( lib-dependencies libwx )
endif()
include( download_libpng )
include( download_pkgconfig )
set( PKG_CONFIG_EXECUTABLE "${PKGCONFIG_ROOT}/bin/pkg-config" )
include( download_glew )
set( GLEW_GLEW_LIBRARY "${GLEW_ROOT}/lib/libGLEW.a" )
set( GLEW_INCLUDE_DIR "${GLEW_ROOT}/include" )
include( download_pixman )
set( PIXMAN_LIBRARY "${PIXMAN_ROOT}/lib/libpixman-1.a" )
include( download_cairo )
set( CAIRO_INCLUDE_DIR "${CAIRO_ROOT}/include/cairo" )
set( CAIRO_LIBRARY "${CAIRO_ROOT}/lib/libcairo.a" )
add_dependencies( lib-dependencies boost )
add_dependencies( lib-dependencies cairo )
add_dependencies( lib-dependencies libpng )
add_dependencies( lib-dependencies pixman )
add_dependencies( lib-dependencies pkgconfig )
if( KICAD_BUILD_DYNAMIC AND APPLE )
add_custom_target( osx_fix_bundles ALL DEPENDS
eeschema gerbview kicad pcbnew bitmap2component pcb_calculator pl_editor)
add_custom_command(TARGET osx_fix_bundles
POST_BUILD COMMAND ${PROJECT_SOURCE_DIR}/scripts/osx_fixbundle.sh ${PROJECT_SOURCE_DIR}
COMMENT "Migrating dylibs to bundles")
endif()
endif()
#####################
# Find GLEW library #
#####################

View File

@ -1,109 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds CAIRO
#-----<configure>----------------------------------------------------------------
set( CAIRO_RELEASE 1.12.0 )
set( CAIRO_MD5 e6c85575ba7094f88b637bdfd835a751 ) # re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( CAIRO_ROOT "${PROJECT_SOURCE_DIR}/cairo_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/cairo )
if ( KICAD_BUILD_STATIC )
set( CAIRO_BUILDTYPE --disable-shared )
endif( KICAD_BUILD_STATIC )
if (APPLE)
set( CAIRO_CFLAGS "CFLAGS=" )
set( CAIRO_LDFLAGS "LDFLAGS=-framework CoreServices -framework Cocoa" )
set( CAIRO_OPTS --enable-ft=no )
if( CMAKE_OSX_ARCHITECTURES )
set( CAIRO_CFLAGS "${CAIRO_CFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES}" )
set( CAIRO_LDFLAGS "${CAIRO_LDFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES}" )
endif( CMAKE_OSX_ARCHITECTURES )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set(CAIRO_CFLAGS "${CAIRO_CFLAGS} -fno-lto" )
endif()
if( CMAKE_OSX_SYSROOT )
#set( CAIRO_CFLAGS "${CAIRO_CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
set( CAIRO_LDFLAGS "${CAIRO_LDFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
endif( CMAKE_OSX_SYSROOT)
endif(APPLE)
# <SOURCE_DIR> = ${PREFIX}/src/glew
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( cairo
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://cairographics.org/releases/cairo-${CAIRO_RELEASE}.tar.gz
URL_MD5 ${CAIRO_MD5}
STAMP_DIR "${PREFIX}"
DEPENDS pkgconfig pixman libpng
BUILD_IN_SOURCE 1
#SOURCE_DIR "${PREFIX}"
#PATCH_COMMAND ""
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${CAIRO_ROOT}"
CONFIGURE_COMMAND ./configure --prefix=${CAIRO_ROOT} --enable-static ${CAIRO_BUILDTYPE}
PKG_CONFIG=${PROJECT_SOURCE_DIR}/pkgconfig_root/bin/pkg-config
PKG_CONFIG_PATH=${PROJECT_SOURCE_DIR}/pixman_root/lib/pkgconfig:${PROJECT_SOURCE_DIR}/libpng_root/lib/pkgconfig
--enable-png=yes --enable-svg=yes
--disable-silent-rules --disable-dependency-tracking
${CAIRO_CFLAGS}
${CAIRO_LDFLAGS}
${CAIRO_OPTS}
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${CAIRO_ROOT}"
INSTALL_COMMAND $(MAKE) install
)
# match these with whatever FindCairo.cmake sets
# Dick i'vent set it because /lib and /lib64 issue in non multiarch binaries OSs
#set( CAIRO_FOUND true )
set( CAIRO_INCLUDE_DIR ${CAIRO_ROOT}/include )
set( CAIRO_LIBRARIES ${CAIRO_ROOT}/lib )

View File

@ -1,89 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds GLEW
#-----<configure>----------------------------------------------------------------
set( GLEW_RELEASE 1.10.0 )
set( GLEW_MD5 2f09e5e6cb1b9f3611bcac79bc9c2d5d ) # re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( GLEW_ROOT "${PROJECT_SOURCE_DIR}/glew_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/glew )
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set( GLEW_CFLAGS "CFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
set( GLEW_LDFLAGS "LDFLAGS.EXTRA=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
set( GLEW_STRIP "STRIP=")
endif( CMAKE_OSX_ARCHITECTURES )
endif(APPLE)
# <SOURCE_DIR> = ${PREFIX}/src/glew
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( glew
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://sourceforge.net/projects/glew/files/glew/1.10.0/glew-${GLEW_RELEASE}.tgz
URL_MD5 ${GLEW_MD5}
STAMP_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${GLEW_ROOT}"
#PATCH_COMMAND "true"
CONFIGURE_COMMAND ""
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE) ${GLEW_CFLAGS} ${GLEW_LDFLAGS} ${GLEW_STRIP}
INSTALL_DIR "${GLEW_ROOT}"
INSTALL_COMMAND $(MAKE) GLEW_DEST="${GLEW_ROOT}" install
)
#
# Optional Steps
#
if( APPLE )
# On OSX is needed to run ranlib to make .a indexes for all platforms
ExternalProject_Add_Step( glew glew_osx_ranlib
COMMAND ranlib "${GLEW_ROOT}/lib/libGLEW.a"
COMMENT "ranlib ${GLEW_ROOT}/lib/libGLEW.a - Needed on OSX only"
DEPENDEES install
)
endif()

View File

@ -1,76 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds LIBPNG
#-----<configure>----------------------------------------------------------------
set( LIBPNG_RELEASE 1.4.12 )
set( LIBPNG_MD5 849b14d88e1240a1b9f2cb39dd39701e ) # re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( LIBPNG_ROOT "${PROJECT_SOURCE_DIR}/libpng_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/libpng )
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
SET( LIBPNG_CFLAGS "CFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES}")
endif( CMAKE_OSX_ARCHITECTURES )
endif(APPLE)
if (KICAD_BUILD_STATIC)
set(LIBPNG_OPTS --enable-static --disable-shared)
else()
set(LIBPNG_OPTS --enable-static --enable-shared)
endif(KICAD_BUILD_STATIC)
# <SOURCE_DIR> = ${PREFIX}/src/glew
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( libpng
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://sourceforge.net/projects/libpng/files/libpng14/${LIBPNG_RELEASE}/libpng-${LIBPNG_RELEASE}.tar.bz2
URL_MD5 ${LIBPNG_MD5}
STAMP_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
#PATCH_COMMAND "true"
CONFIGURE_COMMAND ./configure --prefix=${LIBPNG_ROOT} ${LIBPNG_OPTS} ${LIBPNG_CFLAGS} --disable-dependency-tracking
#BINARY_DIR "${PREFIX}"
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${LIBPNG_ROOT}"
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${LIBPNG_ROOT}"
INSTALL_COMMAND $(MAKE) install
)

View File

@ -1,67 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds PCRE
#-----<configure>----------------------------------------------------------------
set( PCRE_RELEASE 8.34 )
set( PCRE_MD5 eb34b2c9c727fd64940d6fd9a00995eb ) # re-calc this on every RELEASE change
set( PCRE_ROOT "${PROJECT_SOURCE_DIR}/pcre_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/pcre )
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set( PCRE_CFLAGS "CFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
set( PCRE_CXXFLAGS "CXXFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
set( PCRE_LDFLAGS "LDFLAGS=-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.5" )
endif( CMAKE_OSX_ARCHITECTURES )
endif(APPLE)
ExternalProject_Add( pcre
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://sourceforge.net/projects/pcre/files/pcre/${PCRE_RELEASE}/pcre-${PCRE_RELEASE}.tar.gz
URL_MD5 ${PCRE_MD5}
STAMP_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${PCRE_ROOT}"
#PATCH_COMMAND "true"
CONFIGURE_COMMAND ./configure --prefix=${PCRE_ROOT} ${PCRE_CFLAGS} ${PCRE_CXXFLAGS} ${PCRE_LDFLAGS} --disable-dependency-tracking
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${PCRE_ROOT}"
INSTALL_COMMAND $(MAKE) install
)

View File

@ -1,83 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds PIXMAN
#-----<configure>----------------------------------------------------------------
set( PIXMAN_RELEASE 0.32.4 )
set( PIXMAN_MD5 eba449138b972fbf4547a8c152fea162 ) # re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( PIXMAN_ROOT "${PROJECT_SOURCE_DIR}/pixman_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/pixman )
set(PIXMAN_CPPFLAGS "CFLAGS=")
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
set(PIXMAN_CPPFLAGS "${PIXMAN_CPPFLAGS} -arch ${CMAKE_OSX_ARCHITECTURES} -fno-common -mmacosx-version-min=10.5")
else()
set(PIXMAN_CPPFLAGS "${PIXMAN_CPPFLAGS} -fno-common -mmacosx-version-min=10.5")
endif( CMAKE_OSX_ARCHITECTURES )
endif(APPLE)
if (KICAD_BUILD_STATIC)
set(PIXMAN_OPTS --enable-static=yes --enable-shared=no)
else()
set(PIXMAN_OPTS --enable-static=yes --enable-shared=yes)
endif(KICAD_BUILD_STATIC)
# <SOURCE_DIR> = ${PREFIX}/src/glew
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( pixman
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://cairographics.org/releases/pixman-${PIXMAN_RELEASE}.tar.gz
URL_MD5 ${PIXMAN_MD5}
STAMP_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${PIXMAN_ROOT}"
#PATCH_COMMAND "true"
CONFIGURE_COMMAND ./configure --prefix=${PIXMAN_ROOT} ${PIXMAN_OPTS} ${PIXMAN_CPPFLAGS} --disable-dependency-tracking
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${PIXMAN_ROOT}"
INSTALL_COMMAND $(MAKE) install
)

View File

@ -1,80 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds CAIRO
#-----<configure>----------------------------------------------------------------
set( PKGCONFIG_RELEASE 0.28 )
set( PKGCONFIG_MD5 aa3c86e67551adc3ac865160e34a2a0d ) # re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( PKGCONFIG_ROOT "${PROJECT_SOURCE_DIR}/pkgconfig_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/pkgconfig )
if ( KICAD_BUILD_STATIC )
set( PKGCONFIG_BUILDTYPE --enable-shared=no --enable-static=yes )
else()
set( PKGCONFIG_BUILDTYPE --enable-shared=yes --enable-static=yes )
endif( KICAD_BUILD_STATIC )
# <SOURCE_DIR> = ${PREFIX}/src/glew
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( pkgconfig
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://pkgconfig.freedesktop.org/releases/pkg-config-${PKGCONFIG_RELEASE}.tar.gz
URL_MD5 ${PKGCONFIG_MD5}
STAMP_DIR "${PREFIX}"
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
#PATCH_COMMAND "true"
CONFIGURE_COMMAND ./configure --prefix=${PKGCONFIG_ROOT} --with-internal-glib ${PKGCONFIG_BUILDTYPE} --disable-silent-rules
#BINARY_DIR "${PREFIX}"
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${PKGCONFIG_ROOT}"
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${PKGCONFIG_ROOT}"
INSTALL_COMMAND $(MAKE) install
)
ExternalProject_Add_Step( pkgconfig pkgconfig_cleanup
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PKGCONFIG_ROOT}"
COMMENT "pkgconfig - cleanup destination before proceeding in install"
DEPENDEES build
)

View File

@ -1,79 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds SWIG
#-----<configure>----------------------------------------------------------------
set( SWIG_RELEASE 2.0.11 )
set( SWIG_MD5 291ba57c0acd218da0b0916c280dcbae ) # re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( SWIG_ROOT "${PROJECT_SOURCE_DIR}/swig_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/swig )
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
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" )
endif( CMAKE_OSX_ARCHITECTURES )
set( SWIG_PYTHON "--with-python=/usr/bin/python2.6" )
set( SWIG_OPTS --disable-dependency-tracking )
endif(APPLE)
# <SOURCE_DIR> = ${PREFIX}/src/glew
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( swig
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://sourceforge.net/projects/swig/files/swig/swig-${SWIG_RELEASE}/swig-${SWIG_RELEASE}.tar.gz
URL_MD5 ${SWIG_MD5}
STAMP_DIR "${PREFIX}"
DEPENDS pcre
#SOURCE_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
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} ${SWIG_OPTS}
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE)
INSTALL_DIR "${SWIG_ROOT}"
INSTALL_COMMAND $(MAKE) install
)

View File

@ -1,121 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds LIBWXPYTHON
#-----<configure>----------------------------------------------------------------
set( LIBWXPYTHON_RELEASE 3.0.0.0 )
set( LIBWXPYTHON_MD5 f5e32c7d85dc261ba777e113c3b7e365 ) # re-calc this on every RELEASE change
set( LIBWXPYTHON_ROOT "${PROJECT_SOURCE_DIR}/libwxpython_root" )
#-----</configure>---------------------------------------------------------------
find_package( BZip2 REQUIRED )
set( PREFIX ${DOWNLOAD_DIR}/libwxpython )
set( LIBWXPYTHON_EXEC python )
set( LIBWXPYTHON_OPTS --wxpy_installdir=${LIBWXPYTHON_ROOT}/wxPython )
if (APPLE)
SET( LIBWXPYTHON_EXEC python2.6 )
SET( LIBWXPYTHON_OPTS ${LIBWXPYTHON_OPTS} --osx_cocoa )
#SET( LIBWXPYTHON_OPTS ${LIBWXPYTHON_OPTS} --mac_framework --mac_framework_prefix=${LIBWXPYTHON_ROOT}/wxPython )
if( CMAKE_OSX_ARCHITECTURES )
STRING(REGEX REPLACE " -arch " "," LIBWXPYTHON_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
SET( LIBWXPYTHON_OPTS ${LIBWXPYTHON_OPTS} --mac_arch=${LIBWXPYTHON_ARCHITECTURES})
endif( CMAKE_OSX_ARCHITECTURES )
if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
SET( LIBWXPYTHON_PRECMD export CFLAGS=-Qunused-arguments && )
endif()
endif(APPLE)
if ( KICAD_BUILD_STATIC )
#message fail
set( LIBWXPYTHON_BUILDTYPE "--disable-shared" )
endif( KICAD_BUILD_STATIC )
# <SOURCE_DIR> = ${PREFIX}/src/libwx
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( libwxpython
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://sourceforge.net/projects/wxpython/files/wxPython/${LIBWXPYTHON_RELEASE}/wxPython-src-${LIBWXPYTHON_RELEASE}.tar.bz2
URL_MD5 ${LIBWXPYTHON_MD5}
STAMP_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
PATCH_COMMAND bzr revert
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/wxpython-3.0.0_macosx.patch"
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/wxpython-3.0.0_macosx_multiarch.patch" # http://trac.wxwidgets.org/ticket/15957
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${LIBWXPYTHON_ROOT}"
COMMAND ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --clean
CONFIGURE_COMMAND ${LIBWXPYTHON_PRECMD} ${LIBWXPYTHON_EXEC} wxPython/build-wxpython.py --prefix=${LIBWXPYTHON_ROOT} --unicode --install ${LIBWXPYTHON_OPTS}
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND true
INSTALL_DIR "${LIBWXPYTHON_ROOT}"
INSTALL_COMMAND true
)
ExternalProject_Add_Step( libwxpython bzr_commit_libwxpython
COMMAND bzr ci -q -m pristine <SOURCE_DIR>
COMMENT "committing pristine libwxpython files to 'libwxpython scratch repo'"
DEPENDERS patch
)
ExternalProject_Add_Step( libwxpython bzr_add_libwxpython
COMMAND bzr add -q ${PREFIX}/src/libwxpython
COMMENT "adding pristine libwxpython files to 'libwxpython scratch repo'"
DEPENDERS bzr_commit_libwxpython
)
ExternalProject_Add_Step( libwxpython bzr_init_libwxpython
COMMAND bzr init -q <SOURCE_DIR>
COMMENT "creating 'libwxpython scratch repo' specifically for libwx to track libwx patches"
DEPENDERS bzr_add_libwxpython
DEPENDEES download
)
######
# Now is time to search what we have built
######
ExternalProject_Add_Step( libwxpython libwxpython_recursive_message
COMMAND cmake .
COMMENT "*** RERUN CMAKE - wxWidgets built, now reissue a cmake to build Kicad"
DEPENDEES install
)

View File

@ -1,119 +0,0 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, you may find one here:
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# or you may search the http://www.gnu.org website for the version 2 license,
# or you may write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
# Downloads and builds LIBWX
#-----<configure>----------------------------------------------------------------
set( LIBWX_RELEASE 3.0.0 )
set( LIBWX_MD5 241998efc12205172ed24c18788ea2cd ) # re-calc this on every RELEASE change
# The boost headers [and static libs if built] go here, at the top of KiCad
# source tree in boost_root.
set( LIBWX_ROOT "${PROJECT_SOURCE_DIR}/libwx_root" )
#-----</configure>---------------------------------------------------------------
if( NOT BZIP2_FOUND )
find_package( BZip2 REQUIRED )
endif()
set( PREFIX ${DOWNLOAD_DIR}/libwx )
if (APPLE)
if( CMAKE_OSX_ARCHITECTURES )
STRING(REGEX REPLACE " -arch " "," LIBWX_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
SET( LIBWX_ARCHITECTURES --enable-universal_binary=${LIBWX_ARCHITECTURES})
endif( CMAKE_OSX_ARCHITECTURES )
endif(APPLE)
if ( KICAD_BUILD_STATIC )
set( LIBWX_BUILDTYPE "--disable-shared" )
endif( KICAD_BUILD_STATIC )
# <SOURCE_DIR> = ${PREFIX}/src/libwx
# There is a Bazaar 'boost scratch repo' in <SOURCE_DIR>/boost and after committing pristine
# download, the patch is applied. This lets you regenerate a new patch at any time
# easily, simply by editing the working tree in <SOURCE_DIR> and doing "bzr diff" in there.
ExternalProject_Add( libwx
PREFIX "${PREFIX}"
DOWNLOAD_DIR "${DOWNLOAD_DIR}"
URL http://downloads.sourceforge.net/project/wxwindows/${LIBWX_RELEASE}/wxWidgets-${LIBWX_RELEASE}.tar.bz2
URL_MD5 ${LIBWX_MD5}
STAMP_DIR "${PREFIX}"
BUILD_IN_SOURCE 1
PATCH_COMMAND bzr revert
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/wxwidgets-3.0.0_macosx.patch"
COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/wxwidgets-3.0.0_macosx_bug_15908.patch"
UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${LIBWX_ROOT}"
CONFIGURE_COMMAND ./configure --prefix=${LIBWX_ROOT} -with-opengl --enable-aui --enable-debug_info -with-expat=builtin --with-regex=builtin --enable-utf8 ${LIBWX_ARCHITECTURES} ${LIBWX_BUILDTYPE}
#BINARY_DIR "${PREFIX}"
BUILD_COMMAND $(MAKE) VERBOSE=1
INSTALL_DIR "${LIBWX_ROOT}"
INSTALL_COMMAND make install
)
#SET directories
set(wxWidgets_BIN_DIR ${LIBWX_ROOT}/bin)
set(wxWidgets_CONFIG_EXECUTABLE ${LIBWX_ROOT}/bin/wx-config)
set(wxWidgets_INCLUDE_DIRS ${LIBWX_ROOT}/include)
set(wxWidgets_LIBRARY_DIRS ${LIBWX_ROOT}/lib)
ExternalProject_Add_Step( libwx bzr_commit_libwx
COMMAND bzr ci -q -m pristine <SOURCE_DIR>
COMMENT "committing pristine libwx files to 'libwx scratch repo'"
DEPENDERS patch
)
ExternalProject_Add_Step( libwx bzr_add_libwx
COMMAND bzr add -q ${PREFIX}/src/libwx
COMMENT "adding pristine libwx files to 'libwx scratch repo'"
DEPENDERS bzr_commit_libwx
)
ExternalProject_Add_Step( libwx bzr_init_libwx
COMMAND bzr init -q <SOURCE_DIR>
COMMENT "creating 'libwx scratch repo' specifically for libwx to track libwx patches"
DEPENDERS bzr_add_libwx
DEPENDEES download
)
######
# Now is time to search what we have built
######
ExternalProject_Add_Step( libwx libwx_recursive_message
COMMAND cmake .
COMMENT "*** RERUN CMAKE - wxWidgets built, now reissue a cmake to build Kicad"
DEPENDEES install
)