[QGIS Commit] r10432 - branches/Version-1_0/cmake

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Mar 27 20:32:47 EDT 2009


Author: timlinux
Date: 2009-03-27 20:32:47 -0400 (Fri, 27 Mar 2009)
New Revision: 10432

Modified:
   branches/Version-1_0/cmake/FindGDAL.cmake
   branches/Version-1_0/cmake/FindGEOS.cmake
   branches/Version-1_0/cmake/FindPostgres.cmake
   branches/Version-1_0/cmake/FindSqlite3.cmake
Log:
Backported cmake rules from trunk that let cmake detect dependencies from c:\osgeo4w under windows msvc

Modified: branches/Version-1_0/cmake/FindGDAL.cmake
===================================================================
--- branches/Version-1_0/cmake/FindGDAL.cmake	2009-03-27 19:16:39 UTC (rev 10431)
+++ branches/Version-1_0/cmake/FindGDAL.cmake	2009-03-28 00:32:47 UTC (rev 10432)
@@ -22,10 +22,13 @@
        "$ENV{LIB_DIR}/include/gdal"
        CACHE STRING INTERNAL
        )
-    SET (
-       GDAL_LIBRARY 
-       "$ENV{LIB_DIR}/lib/gdal.lib";odbc32;odbccp32 
-       CACHE STRING INTERNAL)
+    FIND_LIBRARY(GDAL_LIBRARY NAMES gdal gdal_i PATHS 
+      "$ENV{LIB_DIR}/lib" /usr/lib c:/msys/local/lib)
+    IF (GDAL_LIBRARY)
+      SET (
+         GDAL_LIBRARY;odbc32;odbccp32 
+         CACHE STRING INTERNAL)
+    ENDIF (GDAL_LIBRARY)
   ENDIF (MSVC)
   
   

Modified: branches/Version-1_0/cmake/FindGEOS.cmake
===================================================================
--- branches/Version-1_0/cmake/FindGEOS.cmake	2009-03-27 19:16:39 UTC (rev 10431)
+++ branches/Version-1_0/cmake/FindGEOS.cmake	2009-03-28 00:32:47 UTC (rev 10432)
@@ -21,10 +21,18 @@
        "$ENV{LIB_DIR}/include"
        CACHE STRING INTERNAL
        )
-    SET (
-       GEOS_LIBRARY 
-       "$ENV{LIB_DIR}/lib/geos_c.lib";odbc32;odbccp32 
-       CACHE STRING INTERNAL)
+    FIND_LIBRARY(GEOS_LIBRARY NAMES geos geos_c_i PATHS 
+      "$ENV{LIB_DIR}/lib"
+      #mingw
+      c:/msys/local/lib
+      NO_DEFAULT_PATH
+      )
+    IF (GEOS_LIBRARY)
+       SET (
+         GEOS_LIBRARY 
+         GEOS_LIBRARY;odbc32;odbccp32 
+         CACHE STRING INTERNAL)
+    ENDIF (GEOS_LIBRARY)
   ENDIF (MSVC)
   
 ELSE(WIN32)

Modified: branches/Version-1_0/cmake/FindPostgres.cmake
===================================================================
--- branches/Version-1_0/cmake/FindPostgres.cmake	2009-03-27 19:16:39 UTC (rev 10431)
+++ branches/Version-1_0/cmake/FindPostgres.cmake	2009-03-28 00:32:47 UTC (rev 10432)
@@ -16,11 +16,12 @@
       /usr/include 
       c:/msys/local/include
       "$ENV{LIB_DIR}/include/postgresql"
+      "$ENV{LIB_DIR}/include"
       )
   ENDIF (NOT POSTGRES_INCLUDE_DIR)
 
   IF (NOT POSTGRES_LIBRARY)
-    FIND_LIBRARY(POSTGRES_LIBRARY NAMES pq libpq PATHS 
+    FIND_LIBRARY(POSTGRES_LIBRARY NAMES pq libpq libpqdll PATHS 
       /usr/local/lib 
       /usr/lib 
       c:/msys/local/lib
@@ -61,13 +62,11 @@
 
 IF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
    SET(POSTGRES_FOUND TRUE)
-
    IF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
      SET(HAVE_PGCONFIG TRUE)
    ELSE(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
      SET(HAVE_PGCONFIG FALSE)
    ENDIF(EXISTS "${POSTGRES_INCLUDE_DIR}/pg_config.h")
-
 ENDIF (POSTGRES_INCLUDE_DIR AND POSTGRES_LIBRARY)
 
 
@@ -87,5 +86,5 @@
    ELSE (POSTGRES_FIND_REQUIRED)
       MESSAGE(STATUS "Could not find PostgreSQL")
    ENDIF (POSTGRES_FIND_REQUIRED)
-   
+
 ENDIF (POSTGRES_FOUND)

Modified: branches/Version-1_0/cmake/FindSqlite3.cmake
===================================================================
--- branches/Version-1_0/cmake/FindSqlite3.cmake	2009-03-27 19:16:39 UTC (rev 10431)
+++ branches/Version-1_0/cmake/FindSqlite3.cmake	2009-03-28 00:32:47 UTC (rev 10432)
@@ -22,7 +22,7 @@
   )
 FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h)
 
-FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 PATHS
+FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 sqlite3_i PATHS
   "$ENV{LIB_DIR}/lib"
   #mingw
   c:/msys/local/lib



More information about the QGIS-commit mailing list