Protobuf will install submodules if necessary

This commit is contained in:
Marc Garcia Puig 2018-05-23 19:59:42 +02:00
parent 71310533be
commit a01d781e25
2 changed files with 26 additions and 24 deletions

View File

@ -45,8 +45,8 @@ if exist "%B_INSTALL_DIR%" (
if not exist "%B_SRC_DIR%" (
echo %FILE_N% Cloning Boost - version "%B_VERSION%"...
echo.
call git clone --depth=1 -b %B_VERSION% ^
--recurse-submodules -j8 ^
call git clone --depth=1 -b %B_VERSION%^
--recurse-submodules -j8^
https://github.com/boostorg/boost.git %B_SRC_DIR%
if errorlevel 1 goto error_git
echo.
@ -66,21 +66,21 @@ echo %FILE_N% Packing headers...
b2 headers
echo %FILE_N% Building...
b2 -j8 ^
headers ^
--layout=versioned ^
--with-system ^
--with-date_time ^
--build-dir=./build ^
architecture=x86 ^
address-model=64 ^
toolset=%B_TOOLSET% ^
variant=release ^
link=static ^
threading=multi ^
--prefix=%B_INSTALL_DIR% ^
--libdir=%B_LIB_DIR% ^
--includedir=%B_INSTALL_DIR% ^
b2 -j8^
headers^
--layout=versioned^
--with-system^
--with-date_time^
--build-dir=./build^
architecture=x86^
address-model=64^
toolset=%B_TOOLSET%^
variant=release^
link=static^
threading=multi^
--prefix=%B_INSTALL_DIR%^
--libdir=%B_LIB_DIR%^
--includedir=%B_INSTALL_DIR%^
install
if errorlevel 1 goto error_install

View File

@ -40,7 +40,9 @@ if exist "%P_INSTALL_DIR%" (
if not exist "%P_SRC_DIR%" (
echo %FILE_N% Cloning Protobuf - version "%P_VERSION%"...
echo.
call git clone --depth=1 -b %P_VERSION% https://github.com/google/protobuf.git %P_SRC_DIR%
call git clone --depth=1 -b %P_VERSION%^
--recurse-submodules -j8^
https://github.com/google/protobuf.git %P_SRC_DIR%
if errorlevel 1 goto error_git
echo.
@ -56,12 +58,12 @@ if not exist "%P_SRC_DIR%\cmake\build" (
cd %P_SRC_DIR%\cmake\build
echo %FILE_N% Generating build...
cmake -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
-Dprotobuf_BUILD_TESTS=OFF ^
-DCMAKE_CXX_FLAGS_RELEASE=/MD ^
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF ^
-DCMAKE_INSTALL_PREFIX=%P_INSTALL_DIR% ^
cmake -G "NMake Makefiles"^
-DCMAKE_BUILD_TYPE=Release^
-Dprotobuf_BUILD_TESTS=OFF^
-DCMAKE_CXX_FLAGS_RELEASE=/MD^
-Dprotobuf_MSVC_STATIC_RUNTIME=OFF^
-DCMAKE_INSTALL_PREFIX=%P_INSTALL_DIR%^
%P_SRC_DIR%\cmake
if errorlevel 1 goto error_cmake