Skip to content
Permalink
Browse files

Backported cmake rules from trunk that let cmake detect dependencies …

…from c:\osgeo4w under windows msvc

git-svn-id: http://svn.osgeo.org/qgis/branches/Version-1_0@10432 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Mar 28, 2009
1 parent 6d39f4b commit cb9e6d366b6c4be41abe4648337fa1659f55a0d4
Showing with 23 additions and 13 deletions.
  1. +7 −4 cmake/FindGDAL.cmake
  2. +12 −4 cmake/FindGEOS.cmake
  3. +3 −4 cmake/FindPostgres.cmake
  4. +1 −1 cmake/FindSqlite3.cmake
@@ -22,10 +22,13 @@ IF(WIN32)
"$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)


@@ -21,10 +21,18 @@ IF(WIN32)
"$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)
@@ -16,11 +16,12 @@ IF(WIN32)
/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 @@ ENDIF(WIN32)

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_FOUND)
ELSE (POSTGRES_FIND_REQUIRED)
MESSAGE(STATUS "Could not find PostgreSQL")
ENDIF (POSTGRES_FIND_REQUIRED)

ENDIF (POSTGRES_FOUND)
@@ -22,7 +22,7 @@ FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
)
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

0 comments on commit cb9e6d3

Please sign in to comment.
You can’t perform that action at this time.