2010-07-12 15:19:30 -04:00
|
|
|
$OpenBSD: patch-Modules_FindQt4_cmake,v 1.8 2010/07/12 19:19:30 dcoppa Exp $
|
|
|
|
--- Modules/FindQt4.cmake.orig Mon Jun 28 17:15:57 2010
|
|
|
|
+++ Modules/FindQt4.cmake Mon Jul 5 11:23:18 2010
|
|
|
|
@@ -364,13 +364,20 @@ GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRE
|
2007-03-20 07:23:10 -04:00
|
|
|
# check for qmake
|
2010-05-28 16:21:48 -04:00
|
|
|
# Debian uses qmake-qt4
|
|
|
|
# macports' Qt uses qmake-mac
|
|
|
|
-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
|
2010-07-12 15:19:30 -04:00
|
|
|
- "[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"
|
|
|
|
- $ENV{QTDIR}/bin
|
|
|
|
- DOC "The qmake executable for the Qt installation to use"
|
|
|
|
-)
|
2010-05-28 16:21:48 -04:00
|
|
|
+IF(CMAKE_SYSTEM MATCHES "OpenBSD*")
|
|
|
|
+ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 PATHS
|
|
|
|
+ $ENV{QTDIR}/bin
|
2010-07-12 15:19:30 -04:00
|
|
|
+ DOC "The qmake executable for the Qt installation to use"
|
2010-05-28 16:21:48 -04:00
|
|
|
+ )
|
|
|
|
+ELSE(CMAKE_SYSTEM MATCHES "OpenBSD*")
|
|
|
|
+ FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS
|
2010-07-12 15:19:30 -04:00
|
|
|
+ "[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"
|
|
|
|
+ $ENV{QTDIR}/bin
|
|
|
|
+ DOC "The qmake executable for the Qt installation to use"
|
|
|
|
+ )
|
2010-05-28 16:21:48 -04:00
|
|
|
+ENDIF(CMAKE_SYSTEM MATCHES "OpenBSD*")
|
|
|
|
|
|
|
|
IF (QT_QMAKE_EXECUTABLE)
|
|
|
|
|
2010-07-12 15:19:30 -04:00
|
|
|
@@ -957,6 +964,12 @@ IF (QT4_QMAKE_FOUND)
|
2010-05-28 16:21:48 -04:00
|
|
|
_QT4_ADJUST_LIB_VARS(QAxServer)
|
|
|
|
_QT4_ADJUST_LIB_VARS(QAxContainer)
|
|
|
|
ENDIF(WIN32)
|
|
|
|
+ # qt on OpenBSD needs to be linked with -pthread
|
|
|
|
+ IF(CMAKE_SYSTEM MATCHES "OpenBSD*")
|
2008-02-04 17:31:20 -05:00
|
|
|
+ FIND_PACKAGE(Threads)
|
2010-05-28 16:21:48 -04:00
|
|
|
+ SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY}
|
|
|
|
+ ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
+ ENDIF(CMAKE_SYSTEM MATCHES "OpenBSD*")
|
|
|
|
|
|
|
|
# If Qt is installed as a framework, we need to add QT_QTCORE_LIBRARY here (which
|
|
|
|
# is the framework directory in that case), since this will make the cmake include_directories()
|
2010-07-12 15:19:30 -04:00
|
|
|
@@ -991,13 +1004,13 @@ IF (QT4_QMAKE_FOUND)
|
2010-05-28 16:21:48 -04:00
|
|
|
ENDIF(QT_QMAKE_CHANGED)
|
|
|
|
|
|
|
|
FIND_PROGRAM(QT_MOC_EXECUTABLE
|
|
|
|
- NAMES moc-qt4 moc
|
|
|
|
+ NAMES moc-qt4 moc4 moc
|
|
|
|
PATHS ${QT_BINARY_DIR}
|
|
|
|
NO_DEFAULT_PATH
|
|
|
|
)
|
2008-02-04 17:31:20 -05:00
|
|
|
|
2010-05-28 16:21:48 -04:00
|
|
|
FIND_PROGRAM(QT_UIC_EXECUTABLE
|
|
|
|
- NAMES uic-qt4 uic
|
|
|
|
+ NAMES uic-qt4 uic4 uic
|
|
|
|
PATHS ${QT_BINARY_DIR}
|
|
|
|
NO_DEFAULT_PATH
|
|
|
|
)
|