Skip to content
Permalink
Browse files
On Mac, search for util.h instead of pty.h
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6525 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Feb 5, 2007
1 parent 534b9a7 commit 5e3037e13ea959d9c174b708080ca3c66eaa15ed
Showing with 6 additions and 2 deletions.
  1. +6 −2 cmake/FindGRASS.cmake
@@ -70,15 +70,19 @@ IF (GRASS_FOUND)

# openpty is currently needed for GRASS shell
INCLUDE(CheckFunctionExists)
IF (APPLE)
SET (CMAKE_REQUIRED_INCLUDES util.h)
ELSE (APPLE)
SET (CMAKE_REQUIRED_INCLUDES pty.h)
SET (CMAKE_REQUIRED_LIBRARIES util)
ENDIF (APPLE)
CHECK_FUNCTION_EXISTS(openpty HAVE_OPENPTY)

# add 'util' library to the dependencies
IF (HAVE_OPENPTY)
IF (HAVE_OPENPTY AND NOT APPLE)
FIND_LIBRARY(OPENPTY_LIBRARY NAMES util PATHS /usr/local/lib /usr/lib c:/msys/local/lib)
SET (GRASS_LIBRARIES ${GRASS_LIBRARIES} ${OPENPTY_LIBRARY})
ENDIF (HAVE_OPENPTY)
ENDIF (HAVE_OPENPTY AND NOT APPLE)

ELSE (GRASS_FOUND)

0 comments on commit 5e3037e

Please sign in to comment.