2013-05-31 21:26:08 +00:00
|
|
|
# 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
|
|
|
|
|
|
|
|
|
2013-05-31 04:46:02 +00:00
|
|
|
|
|
|
|
# Download and patch boost headers to a particular version.
|
|
|
|
# Assumes include( ExternalProject ) was done inline previous to this file.
|
|
|
|
|
|
|
|
set( BOOST_RELEASE 1.53.0 )
|
|
|
|
set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change
|
2013-05-31 21:22:34 +00:00
|
|
|
|
|
|
|
string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" )
|
2013-05-31 04:46:02 +00:00
|
|
|
set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} )
|
|
|
|
|
2013-06-01 04:04:56 +00:00
|
|
|
# <SOURCE_DIR> = ${PREFIX}/src/boost
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
# include only the headers in the repo.
|
|
|
|
# repo = "${headers}/../.bzr" = "<SOURCE_DIR>/.bzr"
|
|
|
|
set( headers ${PREFIX}/src/boost/boost )
|
|
|
|
|
2013-05-31 04:46:02 +00:00
|
|
|
|
2013-05-31 21:22:34 +00:00
|
|
|
ExternalProject_Add( boost
|
2013-05-31 04:46:02 +00:00
|
|
|
PREFIX ${PREFIX}
|
|
|
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
2013-05-31 21:22:34 +00:00
|
|
|
URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2
|
|
|
|
URL_MD5 ${BOOST_MD5}
|
2013-05-31 04:46:02 +00:00
|
|
|
|
|
|
|
# The patch command executes with the working directory set to <SOURCE_DIR>
|
2013-05-31 21:22:34 +00:00
|
|
|
PATCH_COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/boost.patch
|
2013-05-31 04:46:02 +00:00
|
|
|
|
|
|
|
CONFIGURE_COMMAND ""
|
|
|
|
|
|
|
|
# remove then re-copy into the include/boost directory during next two steps:
|
2013-05-31 21:22:34 +00:00
|
|
|
BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/include/boost
|
2013-06-01 04:04:56 +00:00
|
|
|
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${headers} ${PROJECT_SOURCE_DIR}/include/boost
|
2013-05-31 04:46:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ExternalProject_Add_Step( boost bzr_commit_boost
|
|
|
|
COMMAND bzr ci -q -m pristine <SOURCE_DIR>
|
2013-05-31 21:22:34 +00:00
|
|
|
COMMENT "committing pristine boost files to 'boost scratch repo'"
|
2013-05-31 04:46:02 +00:00
|
|
|
DEPENDERS patch
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ExternalProject_Add_Step( boost bzr_add_boost
|
2013-06-01 04:04:56 +00:00
|
|
|
# add only the headers to the scratch repo, repo = "../.bzr" from ${headers}
|
|
|
|
COMMAND bzr add -q ${headers}
|
2013-05-31 21:22:34 +00:00
|
|
|
COMMENT "adding pristine boost files to 'boost scratch repo'"
|
2013-05-31 04:46:02 +00:00
|
|
|
DEPENDERS bzr_commit_boost
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
ExternalProject_Add_Step( boost bzr_init_boost
|
|
|
|
COMMAND bzr init -q <SOURCE_DIR>
|
|
|
|
COMMENT "creating 'boost scratch repo' specifically for boost to track boost patches"
|
2013-05-31 21:22:34 +00:00
|
|
|
DEPENDERS bzr_add_boost
|
2013-05-31 04:46:02 +00:00
|
|
|
DEPENDEES download
|
|
|
|
)
|