Skip to content

Commit

Permalink
Backported cmake rules from trunk that let cmake detect dependencies …
Browse files Browse the repository at this point in the history
…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 committed Mar 28, 2009
1 parent 6d39f4b commit cb9e6d3
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
11 changes: 7 additions & 4 deletions cmake/FindGDAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
16 changes: 12 additions & 4 deletions cmake/FindGEOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions cmake/FindPostgres.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)


Expand All @@ -87,5 +86,5 @@ ELSE (POSTGRES_FOUND)
ELSE (POSTGRES_FIND_REQUIRED)
MESSAGE(STATUS "Could not find PostgreSQL")
ENDIF (POSTGRES_FIND_REQUIRED)

ENDIF (POSTGRES_FOUND)
2 changes: 1 addition & 1 deletion cmake/FindSqlite3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb9e6d3

Please sign in to comment.