Skip to content

Commit 5e3037e

Browse files
author
telwertowski
committed
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
1 parent 534b9a7 commit 5e3037e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmake/FindGRASS.cmake

+6-2
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)