Skip to content

Commit 06b941c

Browse files
author
telwertowski
committedFeb 12, 2007
On Mac, search for util.h instead of pty.h (same as r6525 in trunk)
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6574 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7c48ce2 commit 06b941c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎cmake/FindGRASS.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,19 @@ IF (GRASS_FOUND)
7070

7171
# openpty is currently needed for GRASS shell
7272
INCLUDE(CheckFunctionExists)
73+
IF (APPLE)
74+
SET (CMAKE_REQUIRED_INCLUDES util.h)
75+
ELSE (APPLE)
7376
SET (CMAKE_REQUIRED_INCLUDES pty.h)
7477
SET (CMAKE_REQUIRED_LIBRARIES util)
78+
ENDIF (APPLE)
7579
CHECK_FUNCTION_EXISTS(openpty HAVE_OPENPTY)
7680

7781
# add 'util' library to the dependencies
78-
IF (HAVE_OPENPTY)
82+
IF (HAVE_OPENPTY AND NOT APPLE)
7983
FIND_LIBRARY(OPENPTY_LIBRARY NAMES util PATHS /usr/local/lib /usr/lib c:/msys/local/lib)
8084
SET (GRASS_LIBRARIES ${GRASS_LIBRARIES} ${OPENPTY_LIBRARY})
81-
ENDIF (HAVE_OPENPTY)
85+
ENDIF (HAVE_OPENPTY AND NOT APPLE)
8286

8387
ELSE (GRASS_FOUND)
8488

0 commit comments

Comments
 (0)
Please sign in to comment.