Skip to content

Commit 9092cda

Browse files
author
jef
committed
osgeo4w build: cmake doesn't deal with backslashed very well
git-svn-id: http://svn.osgeo.org/qgis/trunk@11355 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9f9bccf commit 9092cda

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

ms-windows/osgeo4w/package.cmd

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ call "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
1010
set OSGEO4W_ROOT=%PROGRAMFILES%\OSGeo4W
1111
call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
1212

13-
set LIB_DIR=%OSGEO4W_ROOT%
13+
set O4W_ROOT=%OSGEO4W_ROOT:\=/%
14+
set LIB_DIR=%O4W_ROOT%
1415

1516
set FLEX=%PROGRAMFILES%\GnuWin32\bin\flex.exe
1617
set BISON=%PROGRAMFILES%\GnuWin32\bin\bison.exe
@@ -76,35 +77,38 @@ cmake -G "Visual Studio 9 2008" ^
7677
-D CMAKE_BUILDCONFIGURATION_TYPES=%BUILDCONF% ^
7778
-D FLEX_EXECUTABLE=%FLEX% ^
7879
-D BISON_EXECUTABLE=%BISON% ^
79-
-D GDAL_INCLUDE_DIR=%OSGEO4W_ROOT%\apps\gdal-16\include -D GDAL_LIBRARY=%OSGEO4W_ROOT%\apps\gdal-16\lib\gdal_i.lib ^
80-
-D PYTHON_EXECUTABLE=%OSGEO4W_ROOT%\bin\python.exe ^
81-
-D PYTHON_INCLUDE_PATH=%OSGEO4W_ROOT%\apps\Python25\include ^
82-
-D PYTHON_LIBRARY=%OSGEO4W_ROOT%\apps\Python25\libs\python25.lib ^
83-
-D SIP_BINARY_PATH=%OSGEO4W_ROOT%\apps\Python25\sip.exe ^
84-
-D GRASS_PREFIX=%OSGEO4W_ROOT%\apps\grass\grass-%GRASS_VERSION% ^
85-
-D QT_BINARY_DIR=%OSGEO4W_ROOT%\bin -D QT_LIBRARY_DIR=%OSGEO4W_ROOT%\lib ^
86-
-D QT_HEADERS_DIR=%OSGEO4W_ROOT%\include\qt4 ^
87-
-D QT_ZLIB_LIBRARY=%OSGEO4W_ROOT%\lib\zlib.lib ^
88-
-D QT_PNG_LIBRARY=%OSGEO4W_ROOT%\lib\libpng13.lib ^
89-
-D CMAKE_INSTALL_PREFIX=%OSGEO4W_ROOT%\apps\qgis-dev ^
80+
-D GDAL_INCLUDE_DIR=%O4W_ROOT%/apps/gdal-16/include ^
81+
-D GDAL_LIBRARY=%O4W_ROOT%/apps/gdal-16/lib/gdal_i.lib ^
82+
-D PYTHON_EXECUTABLE=%O4W_ROOT%/bin/python.exe ^
83+
-D PYTHON_INCLUDE_PATH=%O4W_ROOT%/apps/Python25/include ^
84+
-D PYTHON_LIBRARY=%O4W_ROOT%/apps/Python25/libs/python25.lib ^
85+
-D SIP_BINARY_PATH=%O4W_ROOT%/apps/Python25/sip.exe ^
86+
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION% ^
87+
-D QT_BINARY_DIR=%O4W_ROOT%/bin ^
88+
-D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^
89+
-D QT_HEADERS_DIR=%O4W_ROOT%/include/qt4 ^
90+
-D QT_ZLIB_LIBRARY=%O4W_ROOT%/lib/zlib.lib ^
91+
-D QT_PNG_LIBRARY=%O4W_ROOT%/lib/libpng13.lib ^
92+
-D CMAKE_INSTALL_PREFIX=%O4W_ROOT%/apps/qgis-dev ^
9093
../../..>>%LOG% 2>&1
9194
if errorlevel 1 goto error
9295

93-
egrep -vq "^(Python not being built|Could not find GRASS)" %LOG%
94-
if errorlevel 1 goto error
96+
REM bail out if python or grass was not found
97+
grep -Eq "^(Python not being built|Could not find GRASS)" %LOG%
98+
if not errorlevel 1 goto error
9599

96100
:skipcmake
97101

98102
echo ZERO_CHECK: %DATE% %TIME%>>%LOG% 2>&1
99-
devenv qgis%VERSION%.sln /Project ZERO_CHECK /Build %BUILDCONF%>>%LOG% 2>&1
103+
devenv qgis%VERSION%.sln /Project ZERO_CHECK /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
100104
if errorlevel 1 goto error
101105

102106
echo ALL_BUILD: %DATE% %TIME%>>%LOG% 2>&1
103-
devenv qgis%VERSION%.sln /Project ALL_BUILD /Build %BUILDCONF%>>%LOG% 2>&1
107+
devenv qgis%VERSION%.sln /Project ALL_BUILD /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
104108
if errorlevel 1 goto error
105109

106110
echo INSTALL: %DATE% %TIME%>>%LOG% 2>&1
107-
devenv qgis%VERSION%.sln /Project INSTALL /Build %BUILDCONF%>>%LOG% 2>&1
111+
devenv qgis%VERSION%.sln /Project INSTALL /Build %BUILDCONF% /Out %LOG%>>%LOG% 2>&1
108112
if errorlevel 1 goto error
109113

110114
echo PACKAGE: %DATE% %TIME%>>%LOG% 2>&1

0 commit comments

Comments
 (0)