Skip to content

Commit

Permalink
Tweaks to make cmake find the sqlite3, pq, gdal and geos dependencies…
Browse files Browse the repository at this point in the history
… when using LIB_DIR and osgeo4w dependencies

git-svn-id: http://svn.osgeo.org/qgis/trunk@10288 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 17, 2009
1 parent 806a72f commit 975d2d4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 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
5 changes: 2 additions & 3 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 Down
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 975d2d4

Please sign in to comment.