[Qgis-developer] Updating Win Build - stuck

S Mizuno spookster at netzero.net
Mon Nov 9 23:13:59 EST 2009


Alex, 

I believe the problem is that qgssvnversion.h is not being constructed properly due to a test for MSVC in CMakeLists.txt in the top level source directory that should also test for MINGW , like in Python.cmake as you found. *nix commands are attempted, but fail since it is a Windows system.

see attached patch file

I hope this helps.

I have been using MinGW building for some time now and have some things I do to make compiling a little easier on my build system, which is somewhat different from the way Marco Pasetti documented Windows building. I would be willing to share these if you are interested. Most of these allow CMake to find libraries and headers without having to manually set the variables.

Steve

---------- Original Message ----------
From: Alex Mandel <tech_dev at wildintellect.com>
To: qgis-developer <qgis-developer at lists.osgeo.org>
Subject: [Qgis-developer] Updating Win Build - stuck
Date: Sun, 08 Nov 2009 00:05:10 -0800

All,

I've been working on bringing the mingw/msys build back up to date with
a working GRASS. So far via Marco's instructions and some shortcutting
via OSGeo4w I think I'm getting close.

Ran into an error somewhere between 3-7%, see
http://img8.imageshack.us/img8/232/cmakeerror.png

Based on ADKPete's suggestion I tried an mingw build of GEOS instead of
osgeo4w but that didn't seem to change anything.

Oh and an FYI, Python.cmake should be changed to check for MINGW or MSVC
for when to decide to use pyuic4.bat and pyrcc4.bat, or alternately just
use WIN32. I manually hacked it with that for now, not 100% what the
final solution is to ensure both build types with find the right python
files in the cmakesetup.

Thanks,
Alex
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

____________________________________________________________
One Up the Competition
Earn your MBA from Post University. Free textbooks for new students!
http://thirdpartyoffers.netzero.net/TGL2231/c?cp=GgjfjGqq7WImxQRveLyuZgAAJz5YOwpkkhYzlrNtu8XFIBruAAQAAAAFAAAAAO9TuT4AAAMlAAAAAAAAAAAAAAAAABIhWQAAAAA=
-------------- next part --------------
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 11823)
+++ CMakeLists.txt	(working copy)
@@ -348,21 +348,21 @@
   FIND_PROGRAM(SVNVERSION svnversion PATHS c:/cygwin/bin)
 
   IF(SVNVERSION)
-    IF(MSVC)
+    IF(MSVC OR MINGW)
 	ADD_CUSTOM_COMMAND(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
 		COMMAND for /f usebackq %%a in "(`\"${SVNVERSION}\"`)" do echo \#define QGSSVNVERSION \"%%a\" >${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
 		MAIN_DEPENDENCY ${SVN_MARKER}
 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 	)
-    ELSE(MSVC)
+    ELSE(MSVC OR MINGW)
 	ADD_CUSTOM_COMMAND(
 		OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
 		COMMAND echo \\\#define QGSSVNVERSION \\\"`${SVNVERSION}`\\\" >${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h
 		MAIN_DEPENDENCY ${SVN_MARKER}
 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
 	)
-    ENDIF(MSVC)
+    ENDIF(MSVC OR MINGW)
   ELSE(SVNVERSION)
     MESSAGE(STATUS "svnversion not found - version will be unknown")
     FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgssvnversion.h "#define QGSSVNVERSION \"unknown\"")


More information about the Qgis-developer mailing list