From ba53b4ce5fe0a236c632ad860c45c3f1e1fbd915 Mon Sep 17 00:00:00 2001 From: Clement de l'Hamaide Date: Sat, 16 Nov 2013 00:07:57 +0100 Subject: [PATCH] Superbuild: use SVN for 3rdParty and Boost + add exit code in installWinDeps.bat if xcopy fails --- CMakeLists.txt | 21 +++++++++------------ installWinDeps.bat | 17 ++++++++++------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8638a0f..c50a884 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,33 +102,30 @@ endif() if (MSVC) # download 3rdparty dependencies zip, including boost + string(TOLOWER ${RDPARTY_DIR} Rd_Party_Lower) ExternalProject_Add(WinDeps - DOWNLOAD_COMMAND URL http://files.goneabitbursar.com/fg/fgfs-${WIN_TAG}-VS100-3rdParty+OSG-20120411.zip + SVN_REPOSITORY http://fgfs.goneabitbursar.com/fgwin3rdparty/trunk/msvc100/${Rd_Party_Lower} # extract to current root - SOURCE_DIR ${CMAKE_BINARY_DIR}/winDeps - BINARY_DIR ${CMAKE_BINARY_DIR} + SOURCE_DIR ${CMAKE_BINARY_DIR}/winDeps/${RDPARTY_DIR} + BINARY_DIR ${CMAKE_BINARY_DIR} + UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND ${CMAKE_SOURCE_DIR}/installWinDeps.bat INSTALL_COMMAND "" ) - - set(BOOST_ARGS link=static stage --with-system) - set( Boost_Version 1.54.0 ) - string( REPLACE "." "_" Boost_Version_Underscore ${Boost_Version} ) + set(BOOST_ARGS link=static stage --with-system) ExternalProject_Add(Boost PREFIX ${CMAKE_BINARY_DIR} - URL http://downloads.sourceforge.net/project/boost/boost/${Boost_Version}/boost_${Boost_Version_Underscore}.zip - URL_MD5 78a35834c45220a6164310e280abe675 - UPDATE_COMMAND "bootstrap.bat" + SVN_REPOSITORY http://svn.boost.org/svn/boost/tags/release/Boost_1_54_0 + UPDATE_COMMAND ${BOOST_BOOTSTRAP} CONFIGURE_COMMAND "" BUILD_COMMAND bjam --with-program_options ${BOOST_ARGS} BUILD_IN_SOURCE 1 INSTALL_COMMAND "" ) - + list(APPEND SG_DEPS Boost) - list(APPEND SG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR}/src/Boost) list(APPEND FG_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR}/src/Boost) list(APPEND FGRUN_CMAKE_ARGS -DBOOST_ROOT=${CMAKE_BINARY_DIR}/src/Boost) diff --git a/installWinDeps.bat b/installWinDeps.bat index c7df973..73972a6 100644 --- a/installWinDeps.bat +++ b/installWinDeps.bat @@ -1,5 +1,3 @@ - - REM ExternalProject can't cleanly extract a zip into an existing directory REM Instead we extract to a subdir, and then move the directories we want REM using this bat file. @@ -8,9 +6,14 @@ echo %CD% IF EXIST winDeps/3rdParty ( md 3rdParty xcopy /Y /E winDeps/3rdParty 3rdParty + echo "Done copying Windows deps" +) ELSE ( + IF EXIST winDeps/3rdParty.x64 ( + md 3rdParty.x64 + xcopy /Y /E winDeps/3rdParty.x64 3rdParty.x64 + echo "Done copying Windows deps" + ) ELSE ( + echo "Error: Windows deps not found" + exit -1 + ) ) -IF EXIST winDeps/3rdParty.x64 ( - md 3rdParty.x64 - xcopy /Y /E winDeps/3rdParty.x64 3rdParty.x64 -) -echo "Done copying Windows deps"