← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~gabipetrovay/zorba/geo-win-build into lp:zorba/geo-module

 

Gabriel Petrovay has proposed merging lp:~gabipetrovay/zorba/geo-win-build into lp:zorba/geo-module.

Requested reviews:
  Juan Zacarias (juan457)
  Daniel Turcanu (danielturcanu)

For more details, see:
https://code.launchpad.net/~gabipetrovay/zorba/geo-win-build/+merge/78602

Geos was not building in Windows.

When built from source Geos generates a DLL. This is required when running with the geo module.

(and some code beautifications here and there)
-- 
https://code.launchpad.net/~gabipetrovay/zorba/geo-win-build/+merge/78602
Your team Zorba Coders is subscribed to branch lp:zorba/geo-module.
=== modified file 'cmake_modules/FindGeos.cmake'
--- cmake_modules/FindGeos.cmake	2011-02-23 12:55:52 +0000
+++ cmake_modules/FindGeos.cmake	2011-10-07 13:47:52 +0000
@@ -15,19 +15,23 @@
 # Try to find the GEOS lib
 #
 #  GEOS_FOUND        - true if GEOS was found
-#  GEOS_INCLUDE_DIR - Directory to include to get GEOS headers
+#  GEOS_INCLUDE_DIR  - Directory to include to get GEOS headers
 #  GEOS_LIBRARIES    - Libraries to link against for the GEOS
 #
 
-INCLUDE(CMakeCompareVersionStrings)
+INCLUDE (CMakeCompareVersionStrings)
 
 IF (GEOS_INCLUDE_DIR)
-  SET(GEOS_FIND_QUIETLY TRUE)
+  SET (GEOS_FIND_QUIETLY TRUE)
 ENDIF (GEOS_INCLUDE_DIR)
 
 # Look for the header file.
-FIND_PATH(GEOS_INCLUDE_DIR geos.h PATHS "/usr/local/include/geos/") 
-MARK_AS_ADVANCED(GEOS_INCLUDE_DIR)
+FIND_PATH (
+  GEOS_INCLUDE_DIR
+  NAMES geos/geos.h
+  PATHS "/usr/local/include"
+)
+MARK_AS_ADVANCED (GEOS_INCLUDE_DIR)
 
 # Look for the library.
 # FIND_LIBRARY(GEOS_LIBRARY NAMES geos PATHS ${GEOS_LIBRARIES})

=== modified file 'cmake_modules/Windows/FindGeos.cmake'
--- cmake_modules/Windows/FindGeos.cmake	2011-08-19 00:03:44 +0000
+++ cmake_modules/Windows/FindGeos.cmake	2011-10-07 13:47:52 +0000
@@ -25,13 +25,13 @@
 # -D GEOS_INCLUDE="path_to_3rd_party_dir\*geos*\src"
 # -D GEOS_LIBRARY="path_to_3rd_party_dir\*geos*\bin\[Release]\geos.lib"
 #
-# See the FindLibTidy.cmake module shipped with Zorba for more information.
-
-FIND_PACKAGE_WIN32(NAME GEOS FOUND_VAR GEOS_FOUND SEARCH_NAMES GEOS)
-
-IF(GEOS_FOUND)
-
-  #find the needed DLL's
+# See the FindGeos.cmake module shipped with Zorba for more information.
+
+FIND_PACKAGE_WIN32 (NAME "Geos" FOUND_VAR "GEOS_FOUND" SEARCH_NAMES "geos")
+
+IF (GEOS_FOUND)
+
+  # find the needed DLLs
   FIND_PACKAGE_DLLS_WIN32 (${FOUND_LOCATION} geos_c.dll)
   
 ENDIF (GEOS_FOUND)  
\ No newline at end of file

=== modified file 'src/org/expath/ns/geo.xq.src/geo_functions.cpp'
--- src/org/expath/ns/geo.xq.src/geo_functions.cpp	2011-07-07 14:54:21 +0000
+++ src/org/expath/ns/geo.xq.src/geo_functions.cpp	2011-10-07 13:47:52 +0000
@@ -13,12 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include "geo_functions.h"
+
 #include <string.h>
 #include <stdio.h>
 #include <cmath>
 #include <stdlib.h>
-
-#include "geo_functions.h"
+#include <vector>
+#include <sstream>
+#include <iomanip>
 
 #include <geos/geom/PrecisionModel.h>
 #include <geos/geom/GeometryFactory.h>
@@ -45,9 +49,6 @@
 #include <geos/opLinemerge.h>
 #include <geos/opPolygonize.h>
 #include <geos/version.h>
-#include <vector>
-#include <sstream>
-#include <iomanip>
 
 #include <zorba/empty_sequence.h>
 #include <zorba/singleton_item_sequence.h>


Follow ups