diff --git a/3rdparty/mongo-c-driver/mongo-c-driver.pro b/3rdparty/mongo-c-driver/mongo-c-driver.pro index 384b2feed..a47ef4c82 100644 --- a/3rdparty/mongo-c-driver/mongo-c-driver.pro +++ b/3rdparty/mongo-c-driver/mongo-c-driver.pro @@ -6,7 +6,7 @@ TEMPLATE = lib TARGET = mongoc CONFIG += static console CONFIG -= qt -DEFINES += MONGO_HAVE_STDINT MONGO_DLL_BUILD _POSIX_SOURCE +DEFINES += MONGO_HAVE_STDINT MONGO_DLL_BUILD _POSIX_SOURCE MONGO_STATIC_BUILD macx:DEFINES += _DARWIN_C_SOURCE *-g++|*-clang { QMAKE_CFLAGS += -std=c99 diff --git a/build.bat b/build.bat index abc9c90ca..ce1c307b9 100644 --- a/build.bat +++ b/build.bat @@ -5,7 +5,15 @@ :: Edit this line to run the batch file for Qt environment. :: ::call "C:\Qt\Qt5.2.1\5.2.1\mingw48_32\bin\qtenv2.bat" -call "C:\Qt\Qt5.3.1\5.3\mingw482_32\bin\qtenv2.bat" +::call "C:\Qt\Qt5.3.1\5.3\mingw482_32\bin\qtenv2.bat" +call "C:\Qt\Qt5.3.2\5.3\msvc2013_64\bin\qtenv2.bat" + + +if "%DevEnvDir%" == "" ( + set MAKE=mingw32-make -j4 +) else ( + set MAKE=nmake +) :: :: Compile and Install @@ -16,11 +24,11 @@ call configure.bat --enable-debug if ERRORLEVEL 1 goto :error cd src -mingw32-make.exe -j4 install +%MAKE% install if ERRORLEVEL 1 goto :error cd ..\tools -mingw32-make.exe -j4 install +%MAKE% install if ERRORLEVEL 1 goto :error cd .. @@ -28,11 +36,11 @@ call configure.bat if ERRORLEVEL 1 goto :error cd src -mingw32-make.exe -j4 install +%MAKE% install if ERRORLEVEL 1 goto :error cd ..\tools -mingw32-make.exe -j4 install +%MAKE% install if ERRORLEVEL 1 goto :error echo. diff --git a/configure.bat b/configure.bat index 7dbbb12ed..6323f4a39 100644 --- a/configure.bat +++ b/configure.bat @@ -4,6 +4,12 @@ set VERSION=1.7.7 set TFDIR=C:\TreeFrog\%VERSION% +if "%DevEnvDir%" == "" ( + set MAKE=mingw32-make +) else ( + set MAKE=nmake +) + :parse_loop if "%1" == "" goto :start if /i "%1" == "--prefix" goto :prefix @@ -72,8 +78,8 @@ set TFDIR=%TFDIR:\=/% echo Compiling MongoDB driver library ... cd 3rdparty\mongo-c-driver qmake -r %OPT% -mingw32-make clean >nul 2>&1 -mingw32-make >nul 2>&1 +%MAKE% clean >nul 2>&1 +%MAKE% >nul 2>&1 if ERRORLEVEL 1 ( echo Compile failed. echo MongoDB driver not available. @@ -82,18 +88,18 @@ if ERRORLEVEL 1 ( cd ..\.. cd src -if exist Makefile ( mingw32-make -k distclean >nul 2>&1 ) -qmake -spec win32-g++ %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI% +if exist Makefile ( %MAKE% -k distclean >nul 2>&1 ) +qmake %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' %USE_GUI% cd .. cd tools -if exist Makefile ( mingw32-make -k distclean >nul 2>&1 ) -qmake -recursive -spec win32-g++ %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%' -mingw32-make qmake +if exist Makefile ( %MAKE% -k distclean >nul 2>&1 ) +qmake -recursive %OPT% target.path='%TFDIR%/bin' header.path='%TFDIR%/include' datadir='%TFDIR%' +%MAKE% qmake cd .. echo; -echo First, run "mingw32-make install" in src directory. -echo Next, run "mingw32-make install" in tools directory. +echo First, run "%MAKE% install" in src directory. +echo Next, run "%MAKE% install" in tools directory. :exit exit /b