On Mac, search for util.h instead of pty.h

git-svn-id: http://svn.osgeo.org/qgis/trunk@6525 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
telwertowski 2007-02-05 01:13:20 +00:00
parent a456530777
commit df975a8d80

View File

@ -70,15 +70,19 @@ IF (GRASS_FOUND)
# openpty is currently needed for GRASS shell # openpty is currently needed for GRASS shell
INCLUDE(CheckFunctionExists) INCLUDE(CheckFunctionExists)
IF (APPLE)
SET (CMAKE_REQUIRED_INCLUDES util.h)
ELSE (APPLE)
SET (CMAKE_REQUIRED_INCLUDES pty.h) SET (CMAKE_REQUIRED_INCLUDES pty.h)
SET (CMAKE_REQUIRED_LIBRARIES util) SET (CMAKE_REQUIRED_LIBRARIES util)
ENDIF (APPLE)
CHECK_FUNCTION_EXISTS(openpty HAVE_OPENPTY) CHECK_FUNCTION_EXISTS(openpty HAVE_OPENPTY)
# add 'util' library to the dependencies # 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) FIND_LIBRARY(OPENPTY_LIBRARY NAMES util PATHS /usr/local/lib /usr/lib c:/msys/local/lib)
SET (GRASS_LIBRARIES ${GRASS_LIBRARIES} ${OPENPTY_LIBRARY}) SET (GRASS_LIBRARIES ${GRASS_LIBRARIES} ${OPENPTY_LIBRARY})
ENDIF (HAVE_OPENPTY) ENDIF (HAVE_OPENPTY AND NOT APPLE)
ELSE (GRASS_FOUND) ELSE (GRASS_FOUND)