Skip to content

Commit

Permalink
CMake:
Browse files Browse the repository at this point in the history
- search for GDAL and GSL also in /usr/local
- added mac-specific locations for GDAL and GRASS


git-svn-id: http://svn.osgeo.org/qgis/trunk@6515 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Feb 4, 2007
1 parent da24225 commit 880a93a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cmake/FindGDAL.cmake
Expand Up @@ -17,9 +17,17 @@ IF(WIN32)

ELSE(WIN32)
IF(UNIX)

# try to use framework on mac
IF (APPLE)
SET (GDAL_MAC_PATH /Library/Frameworks/GDAL.framework/unix/bin)
ENDIF (APPLE)

SET(GDAL_CONFIG_PREFER_PATH "$ENV{GDAL_HOME}/bin" CACHE STRING "preferred path to GDAL (gdal-config)")
FIND_PROGRAM(GDAL_CONFIG gdal-config
${GDAL_CONFIG_PREFER_PATH}
${GDAL_MAC_PATH}
/usr/local/bin/
/usr/bin/
)
# MESSAGE("DBG GDAL_CONFIG ${GDAL_CONFIG}")
Expand Down
5 changes: 5 additions & 0 deletions cmake/FindGRASS.cmake
Expand Up @@ -41,6 +41,11 @@ ENDMACRO (CHECK_GRASS)
# list of paths which to search - user's choice as first
SET (GRASS_PATHS ${GRASS_PREFIX} /usr/lib/grass)

# mac-specific path
IF (APPLE)
SET (GRASS_PATHS ${GRASS_PATHS} /Applications/GRASS.app/Contents/Resources)
ENDIF (APPLE)

IF (WITH_GRASS)

FOREACH (G_PREFIX ${GRASS_PATHS})
Expand Down
3 changes: 2 additions & 1 deletion cmake/FindGSL.cmake
Expand Up @@ -25,7 +25,7 @@

IF(WIN32)

SET(GSL_PREFIX "" CACHE PATH "Path to GSL directory")
SET(GSL_PREFIX "c:/msys/local" CACHE PATH "Path to GSL directory")

FIND_LIBRARY(GSL_LIB gsl PATH ${GSL_PREFIX}/lib)
FIND_LIBRARY(GSLCBLAS_LIB gslcblas PATH ${GSL_PREFIX}/lib)
Expand All @@ -41,6 +41,7 @@ ELSE(WIN32)
SET(GSL_CONFIG_PREFER_PATH "$ENV{GSL_HOME}/bin" CACHE STRING "preferred path to GSL (gsl-config)")
FIND_PROGRAM(GSL_CONFIG gsl-config
${GSL_CONFIG_PREFER_PATH}
/usr/local/bin/
/usr/bin/
)
# MESSAGE("DBG GSL_CONFIG ${GSL_CONFIG}")
Expand Down

0 comments on commit 880a93a

Please sign in to comment.