Skip to content

Commit 194e2b3

Browse files
author
jef
committedJul 29, 2009

File tree

6 files changed

+153
-10
lines changed

6 files changed

+153
-10
lines changed
 

‎CMakeLists.txt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,10 @@ IF (PEDANTIC)
201201
ENDIF (MSVC)
202202
ENDIF (PEDANTIC)
203203

204-
IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
204+
IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_CONFIGURATION_TYPE MATCHES RelWithDebInfo)
205+
MESSAGE ("-- Debug output enabled")
205206
ADD_DEFINITIONS(-DQGISDEBUG=1)
206-
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
207+
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_CONFIGURATION_TYPE MATCHES RelWithDebInfo)
207208

208209
#############################################################
209210
# platform specific stuff
@@ -215,11 +216,6 @@ IF (WIN32)
215216
SET (DEFAULT_INCLUDE_SUBDIR include)
216217

217218
IF (MSVC)
218-
# Python parts need to be build with nmake not vcexpress
219-
# if you dont add this clause, extra blank msvc projects
220-
# will pop up mid way through the build process and block
221-
# the build, plus the python bindings wont build correctly
222-
SET (CMAKE_MAKE_PROGRAM nmake)
223219
SET (DEFAULT_BIN_SUBDIR bin)
224220
# put all the build products into a single directory
225221
# under build (doesnt affect install target) to make for
@@ -234,11 +230,14 @@ IF (WIN32)
234230
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
235231
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_WARNINGS)
236232

237-
IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
233+
IF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_CONFIGURATION_TYPE MATCHES RelWithDebInfo)
234+
MESSAGE ("-- Generating browse files")
238235
ADD_DEFINITIONS( /FR )
239-
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
236+
ENDIF (CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_CONFIGURATION_TYPE MATCHES RelWithDebInfo)
240237

241-
INSTALL(DIRECTORY ${CMAKE_BINARY_DIR}/../vcdeps/. DESTINATION .)
238+
IF (INSTALL_DEPS)
239+
INSTALL(DIRECTORY ${INSTALL_DEPS} DESTINATION .)
240+
ENDIF (INSTALL_DEPS)
242241
ELSE(MSVC)
243242
SET (DEFAULT_BIN_SUBDIR .)
244243
ENDIF(MSVC)

‎ms-windows/osgeo4w/package.cmd

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
@echo off
2+
set GRASS_VERSION=6.4.0svn
3+
4+
path %SYSTEMROOT%\system32;%SYSTEMROOT%;%SYSTEMROOT%\System32\Wbem;%PROGRAMFILES%\CMake 2.6\bin
5+
set PYTHONPATH=
6+
7+
set VS90COMNTOOLS=%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\Tools\
8+
call "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
9+
10+
set OSGEO4W_ROOT=%PROGRAMFILES%\OSGeo4W
11+
call "%OSGEO4W_ROOT%\bin\o4w_env.bat"
12+
13+
set LIB_DIR=%OSGEO4W_ROOT%
14+
15+
set FLEX=%PROGRAMFILES%\GnuWin32\bin\flex.exe
16+
set BISON=%PROGRAMFILES%\GnuWin32\bin\bison.exe
17+
18+
set VERSION=%1
19+
set PACKAGE=%2
20+
21+
PROMPT qgis%VERSION%$g
22+
23+
set BUILDCONF=RelWithDebInfo
24+
REM set BUILDCONF=Release
25+
26+
if not exist build mkdir build
27+
if not exist build goto error
28+
29+
if not exist build.log goto build
30+
31+
REM
32+
REM try renaming the logfile to see if it's locked
33+
REM
34+
35+
if exist build.tmp del build.tmp
36+
if exist build.tmp goto error
37+
38+
ren build.log build.tmp
39+
if exist build.log goto locked
40+
if not exist build.tmp goto locked
41+
42+
ren build.tmp build.log
43+
if exist build.tmp goto locked
44+
if not exist build.log goto locked
45+
46+
goto build
47+
48+
:locked
49+
echo Logfile locked
50+
if exist build.tmp del build.tmp
51+
goto error
52+
53+
:build
54+
set LOG=%CD%\build.log
55+
56+
cd build
57+
58+
echo Logging to %LOG%
59+
echo BEGIN: %DATE% %TIME%>>%LOG% 2>&1
60+
if errorlevel 1 goto error
61+
62+
set >buildenv.log
63+
64+
if exist CMakeCache.txt goto skipcmake
65+
66+
echo CMAKE: %DATE% %TIME%>>%LOG% 2>&1
67+
if errorlevel 1 goto error
68+
69+
cmake -G "Visual Studio 9 2008" ^
70+
-D PEDANTIC=TRUE ^
71+
-D WITH_SPATIALITE=TRUE ^
72+
-D WITH_INTERNAL_SPATIALITE=TRUE ^
73+
-D CMAKE_CONFIGURATION_TYPE=%BUILDCONF% ^
74+
-D CMAKE_BUILDCONFIGURATION_TYPES=%BUILDCONF% ^
75+
-D FLEX_EXECUTABLE=%FLEX% ^
76+
-D BISON_EXECUTABLE=%BISON% ^
77+
-D GDAL_INCLUDE_DIR=%OSGEO4W_ROOT%\apps\gdal-16\include -D GDAL_LIBRARY=%OSGEO4W_ROOT%\apps\gdal-16\lib\gdal_i.lib ^
78+
-D PYTHON_EXECUTABLE=%OSGEO4W_ROOT%\bin\python.exe ^
79+
-D PYTHON_INCLUDE_DIR=%OSGEO4W_ROOT%\apps\Python25\include -D PYTHON_LIBRARY=%OSGEO4W_ROOT%\apps\Python25\libs\python25.lib ^
80+
-D SIP_BINARY_PATH=%OSGEO4W_ROOT%\apps\Python25\sip.exe ^
81+
-D GRASS_PREFIX=%OSGEO4W_ROOT%\apps\grass\grass-%GRASS_VERSION% ^
82+
-D QT_BINARY_DIR=%OSGEO4W_ROOT%\bin -D QT_LIBRARY_DIR=%OSGEO4W_ROOT%\lib ^
83+
-D QT_HEADERS_DIR=%OSGEO4W_ROOT%\include\qt4 ^
84+
-D QT_ZLIB_LIBRARY=%OSGEO4W_ROOT%\lib\zlib.lib ^
85+
-D QT_PNG_LIBRARY=%OSGEO4W_ROOT%\lib\libpng13.lib ^
86+
-D CMAKE_INSTALL_PREFIX=%OSGEO4W_ROOT%\apps\qgis-dev ^
87+
../../..>>%LOG% 2>&1
88+
if errorlevel 1 goto error
89+
90+
:skipcmake
91+
92+
echo ZERO_CHECK: %DATE% %TIME%>>%LOG% 2>&1
93+
devenv qgis%VERSION%.sln /Project ZERO_CHECK /Build %BUILDCONF%>>%LOG% 2>&1
94+
if errorlevel 1 goto error
95+
96+
echo ALL_BUILD: %DATE% %TIME%>>%LOG% 2>&1
97+
devenv qgis%VERSION%.sln /Project ALL_BUILD /Build %BUILDCONF%>>%LOG% 2>&1
98+
if errorlevel 1 goto error
99+
100+
echo INSTALL: %DATE% %TIME%>>%LOG% 2>&1
101+
devenv qgis%VERSION%.sln /Project INSTALL /Build %BUILDCONF%>>%LOG% 2>&1
102+
if errorlevel 1 goto error
103+
104+
echo PACKAGE: %DATE% %TIME%>>%LOG% 2>&1
105+
106+
cd ..
107+
copy postinstall.bat %OSGEO4W_ROOT%\etc\postinstall\qgis-dev.bat
108+
copy preremove.bat %OSGEO4W_ROOT%\etc\preremove\qgis-dev.bat
109+
copy qgis-dev.bat.tmpl %OSGEO4W_ROOT%\bin\qgis-dev.bat.tmpl
110+
111+
tar -C %OSGEO4W_ROOT% -cjf qgis-dev-%VERSION%-%PACKAGE%.tar.bz2 ^
112+
--exclude "apps/qgis-dev/plugins/EDBSQuery.dll" ^
113+
apps/qgis-dev ^
114+
bin/qgis-dev.bat.tmpl ^
115+
etc/postinstall/qgis-dev.bat ^
116+
etc/preremove/qgis-dev.bat>>%LOG% 2>&1
117+
if errorlevel 1 goto error
118+
119+
goto end
120+
121+
:error
122+
echo BUILD ERROR %ERRORLEVEL%: %DATE% %TIME%
123+
echo BUILD ERROR %ERRORLEVEL%: %DATE% %TIME%>>%LOG% 2>&1
124+
if exist qgis-dev-%VERSION%-%PACKAGE%.tar.bz2 del qgis-dev-%VERSION%-%PACKAGE%.tar.bz2
125+
126+
:end
127+
echo FINISHED: %DATE% %TIME% >>%LOG% 2>&1

‎ms-windows/osgeo4w/postinstall.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
textreplace -std -t bin\qgis-dev.bat
2+
3+
mkdir "%OSGEO4W_STARTMENU%"
4+
xxmklink "%OSGEO4W_STARTMENU%\Quantum GIS (trunk).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev.bat" " " \ "Quantum GIS - Desktop GIS (trunk)" 1 "%OSGEO4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"
5+
xxmklink "%ALLUSERSPROFILE%\Desktop\Quantum GIS (trunk).lnk" "%OSGEO4W_ROOT%\bin\qgis-dev.bat" " " \ "Quantum GIS - Desktop GIS (trunk)" 1 "%OSGEO4W_ROOT%\apps\qgis-dev\icons\QGIS.ico"

‎ms-windows/osgeo4w/preremove.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
del "%OSGEO4W_STARTMENU%\Quantum GIS (trunk).lnk"
2+
del "%ALLUSERSPROFILE%\Desktop\Quantum GIS (trunk).lnk"
3+
del "%OSGEO4W_ROOT%\bin\qgis-dev.bat

‎ms-windows/osgeo4w/qgis-dev.bat.tmpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@echo off
2+
3+
SET OSGEO4W_ROOT=@osgeo4w@
4+
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
5+
call "%OSGEO4W_ROOT%"\bin\gdal16.bat
6+
@echo off
7+
path %PATH%;%GISBASE%\bin
8+
start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\qgis-dev\bin\qgis.exe %*

‎python/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/configure.py.in
5050

5151
IF (MSVC)
5252
SET(EXPORT "__declspec(dllimport)")
53+
SET(CMAKE_MAKE_PROGRAM $ENV{VCINSTALLDIR}/bin/nmake.exe)
5354
ELSE (MSVC)
5455
SET(EXPORT "")
5556
ENDIF (MSVC)

0 commit comments

Comments
 (0)
Please sign in to comment.