Skip to content

Commit

Permalink
Windows standard build: download our own copy of Boost.
Browse files Browse the repository at this point in the history
This is probably better (and easier for Windows users) than relying on
installing a binary package that may not work with their compiler.
  • Loading branch information
qris committed Oct 28, 2016
1 parent f047808 commit 614aaa6
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions infrastructure/cmake/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ set(OPENSSL_HASH SHA256=1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c
set(PCRE_VERSION 8.38 CACHE STRING "Version of PCRE to download, build, and compile Box Backup against")
set(PCRE_HASH SHA256=dbef7cf80258c29396d435804cd5dba34006a77548850bca8bad6db6a6eac110
CACHE STRING "Hash of the PCRE download file, to be verified after download")
set(BOOST_ROOT "" CACHE STRING "Directory where Boost >=1.56 can be found for Box Backup to compile against")
set(BOOST_VERSION 1.62.0 CACHE STRING "Version of Boost to download, unpack, and compile Box Backup against")
set(BOOST_HASH SHA1=5fd97433c3f859d8cbab1eaed4156d3068ae3648
CACHE STRING "Hash of the Boost download file, to be verified after download")

include(ExternalProject)

Expand Down Expand Up @@ -82,13 +84,24 @@ ExternalProject_Add(pcre
COMMAND ${CMAKE_COMMAND} --build <BINARY_DIR> --target install --config Release
)

find_package(Boost)
string(REPLACE "." "_" BOOST_VERSION_UNDERSCORES ${BOOST_VERSION})
ExternalProject_Add(boost
URL "http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_UNDERSCORES}.tar.bz2"
URL_HASH ${BOOST_HASH}
# DOWNLOAD_NO_PROGRESS 1
CONFIGURE_COMMAND "" # none needed
BUILD_COMMAND ${CMAKE_COMMAND} -E echo "No build step needed" # none needed
INSTALL_COMMAND "" # none needed
)

ExternalProject_Add(boxbackup
DEPENDS zlib openssl pcre
SOURCE_DIR ${boxbackup_dir}/infrastructure/cmake
CMAKE_ARGS -DZLIB_ROOT=${install_dir} -DOPENSSL_ROOT_DIR=${install_dir}
-DPCRE_ROOT=${install_dir} -DBOOST_INCLUDEDIR=${Boost_INCLUDE_DIRS}
-DBOOST_LIBRARYDIR=${Boost_LIBRARY_DIRS} -DAPPVEYOR_MODE=1
CMAKE_ARGS
-DZLIB_ROOT=${install_dir}
-DOPENSSL_ROOT_DIR=${install_dir}
-DPCRE_ROOT=${install_dir}
-DBOOST_ROOT=${CMAKE_SOURCE_DIR}/boost
-DAPPVEYOR_MODE=1
STEP_TARGETS configure build install
)

0 comments on commit 614aaa6

Please sign in to comment.