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@6525 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Feb 5, 2007
1 parent a456530 commit df975a8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmake/FindGRASS.cmake
Original file line number Diff line number Diff line change
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 df975a8

Please sign in to comment.