Skip to content

Commit 8f00ae3

Browse files
author
jef
committed
fix link problem on some linuxes (namely RH)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12317 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3c62c2c commit 8f00ae3

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,21 @@ ENDIF (NOT BISON_EXECUTABLE)
110110
# we don't use cblas
111111
SET(DONT_LINK_CBLAS TRUE)
112112

113+
IF(NOT WIN32)
114+
INCLUDE(CheckFunctionExists)
115+
CHECK_FUNCTION_EXISTS(openpty OPENPTY_IN_LIBC)
116+
IF(NOT OPENPTY_IN_LIBC)
117+
SET(CMAKE_REQUIRED_INCLUDES util.h)
118+
SET(CMAKE_REQUIRED_LIBRARIES util)
119+
CHECK_FUNCTION_EXISTS(openpty NEED_LIBUTIL)
120+
IF(NEED_LIBUTIL)
121+
SET(OPENPTY_LIBRARY util)
122+
ELSE(NEED_LIBUTIL)
123+
MESSAGE (SEND_ERROR "openpty not found!")
124+
ENDIF(NEED_LIBUTIL)
125+
ENDIF(NOT OPENPTY_IN_LIBC)
126+
ENDIF(NOT WIN32)
127+
113128
# required
114129
FIND_PACKAGE(Proj)
115130
FIND_PACKAGE(Expat) # GPS importer plugin

src/plugins/grass/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ INCLUDE_DIRECTORIES(
150150
TARGET_LINK_LIBRARIES(grassplugin
151151
qgisgrass
152152
qgis_gui
153+
${OPENPTY_LIBRARY}
153154
)
154155

155156

src/python/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ SET_TARGET_PROPERTIES(qgispython PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSIO
2727
TARGET_LINK_LIBRARIES(qgispython
2828
qgis_core
2929
${PYTHON_LIBRARY}
30+
${OPENPTY_LIBRARY}
3031
)
3132

3233
IF (APPLE)

0 commit comments

Comments
 (0)