Skip to content

Commit

Permalink
fix link problem on some linuxes (namely RH)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12317 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 3, 2009
1 parent 1ca3647 commit 8c4573c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,21 @@ ENDIF (NOT BISON_EXECUTABLE)
# we don't use cblas
SET(DONT_LINK_CBLAS TRUE)

IF(NOT WIN32)
INCLUDE(CheckFunctionExists)
CHECK_FUNCTION_EXISTS(openpty OPENPTY_IN_LIBC)
IF(NOT OPENPTY_IN_LIBC)
SET(CMAKE_REQUIRED_INCLUDES util.h)
SET(CMAKE_REQUIRED_LIBRARIES util)
CHECK_FUNCTION_EXISTS(openpty NEED_LIBUTIL)
IF(NEED_LIBUTIL)
SET(OPENPTY_LIBRARY util)
ELSE(NEED_LIBUTIL)
MESSAGE (SEND_ERROR "openpty not found!")
ENDIF(NEED_LIBUTIL)
ENDIF(NOT OPENPTY_IN_LIBC)
ENDIF(NOT WIN32)

# required
FIND_PACKAGE(Proj)
FIND_PACKAGE(Expat) # GPS importer plugin
Expand Down
1 change: 1 addition & 0 deletions src/plugins/grass/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(grassplugin
qgisgrass
qgis_gui
${OPENPTY_LIBRARY}
)


Expand Down
1 change: 1 addition & 0 deletions src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ SET_TARGET_PROPERTIES(qgispython PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSIO
TARGET_LINK_LIBRARIES(qgispython
qgis_core
${PYTHON_LIBRARY}
${OPENPTY_LIBRARY}
)

IF (APPLE)
Expand Down

0 comments on commit 8c4573c

Please sign in to comment.