Skip to content

Commit

Permalink
On Mac, search for util.h instead of pty.h
Browse files Browse the repository at this point in the history
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 5e3037e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/FindGRASS.cmake
Expand Up @@ -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)

Expand Down

0 comments on commit 5e3037e

Please sign in to comment.