Skip to content
Permalink
Browse files

Tweaks to make cmake find the sqlite3, pq, gdal and geos dependencies…

… 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
timlinux committed Mar 17, 2009
1 parent 806a72f commit 975d2d4e1165add096eba22f0f6f9991328432f8
Showing with 22 additions and 12 deletions.
  1. +7 −4 cmake/FindGDAL.cmake
  2. +12 −4 cmake/FindGEOS.cmake
  3. +2 −3 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)


@@ -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 975d2d4

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