openbsd-ports/devel/cmake/patches/patch-Modules_FindQt4_cmake

61 lines
2.5 KiB
Plaintext

$OpenBSD: patch-Modules_FindQt4_cmake,v 1.5 2008/01/26 21:26:32 espie Exp $
--- Modules/FindQt4.cmake.orig Mon Jan 21 19:59:51 2008
+++ Modules/FindQt4.cmake Sat Jan 26 20:48:28 2008
@@ -250,7 +250,7 @@ ENDMACRO(QT_QUERY_QMAKE)
GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
# check for qmake
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 PATHS
+FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake qmake4 qmake-qt4 PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
@@ -1129,7 +1129,8 @@ IF (QT4_QMAKE_FOUND)
###############################################
SET(QT_GUI_LIB_DEPENDENCIES "")
- SET(QT_CORE_LIB_DEPENDENCIES "")
+ SET(QT_CORE_LIB_DEPENDENCIES "-pthread")
+ SET(QT_DBUS_LIB_DEPENDENCIES "")
# shared build needs -DQT_SHARED
IF(NOT QT_CONFIG MATCHES "static")
@@ -1144,7 +1145,37 @@ IF (QT4_QMAKE_FOUND)
FIND_LIBRARY(QT_PNG_LIBRARY NAMES png)
SET(QT_GUI_LIB_DEPENDENCIES ${QT_GUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY})
MARK_AS_ADVANCED(QT_PNG_LIBRARY)
+ FIND_PATH(QT_PNG_INCLUDE_DIR png.h
+ /usr/local/include
+ /usr/include
+ /usr/local/include/libpng # OpenBSD
+ )
+ MARK_AS_ADVANCED(QT_PNG_INCLUDE_DIR)
+ SET(QT_INCLUDES ${QT_INCLUDES} ${QT_PNG_INCLUDE_DIR})
+
ENDIF(QT_QCONFIG MATCHES "system-png")
+
+ IF(QT_QCONFIG MATCHES "glib")
+ FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0)
+ FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0)
+ MARK_AS_ADVANCED(QT_GLIB_LIBRARY)
+ MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY)
+ SET(QT_GUI_LIB_DEPENDENCIES ${QT_GUI_LIB_DEPENDENCIES} ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY})
+ ENDIF(QT_QCONFIG MATCHES "glib")
+
+ IF(QT_QCONFIG MATCHES "gnu-libiconv")
+ FIND_LIBRARY(QT_LIBINTL NAMES intl)
+ FIND_LIBRARY(QT_LIBICONV NAMES iconv)
+ MARK_AS_ADVANCED(QT_LIBICONV)
+ MARK_AS_ADVANCED(QT_LIBINTL)
+ SET(QT_CORE_LIB_DEPENDENCIES ${QT_CORE_LIB_DEPENDENCIES} ${QT_LIBICONV} ${QT_LIBICONV})
+ ENDIF(QT_QCONFIG MATCHES "gnu-libiconv")
+
+ IF(QT_QCONFIG MATCHES "qdbus")
+ FIND_LIBRARY(QT_DBUS NAMES dbus-1)
+ MARK_AS_ADVANCED(QT_DBUS)
+ SET(QT_DBUS_LIB_DEPENDENCIES ${QT_DBUS_LIB_DEPENDENCIES} ${QT_DBUS})
+ ENDIF(QT_QCONFIG MATCHES "qdbus")
# for X11, get X11 library directory
IF(Q_WS_X11)