openbsd-ports/devel/cmake/patches/patch-Modules_FindQt4_cmake
dcoppa 9e78ddaf2d Append "/usr/X11R6/include" to ${QT_INCLUDES} to unbreak the build
in some circumstances (i.e. QtOpenGL not finding GL/gl.h)
2012-11-22 13:21:49 +00:00

90 lines
2.8 KiB
Plaintext

$OpenBSD: patch-Modules_FindQt4_cmake,v 1.17 2012/11/22 13:21:49 dcoppa Exp $
--- Modules/FindQt4.cmake.orig Tue Nov 6 20:41:36 2012
+++ Modules/FindQt4.cmake Thu Nov 22 13:36:47 2012
@@ -497,13 +497,22 @@ get_filename_component(qt_install_version "[HKEY_CURRE
# check for qmake
# Debian uses qmake-qt4
# macports' Qt uses qmake-mac
-find_program(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac
- PATHS
- ENV QTDIR
- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
- PATH_SUFFIXES bin
- DOC "The qmake executable for the Qt installation to use"
-)
+if(CMAKE_SYSTEM MATCHES "OpenBSD*")
+ find_program(QT_QMAKE_EXECUTABLE NAMES qmake4
+ PATHS
+ ENV QTDIR
+ PATH_SUFFIXES bin
+ DOC "The qmake executable for the Qt installation to use"
+ )
+else(CMAKE_SYSTEM MATCHES "OpenBSD*")
+ find_program(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac
+ PATHS
+ ENV QTDIR
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]"
+ PATH_SUFFIXES bin
+ DOC "The qmake executable for the Qt installation to use"
+ )
+endif(CMAKE_SYSTEM MATCHES "OpenBSD*")
# double check that it was a Qt4 qmake, if not, re-find with different names
if (QT_QMAKE_EXECUTABLE)
@@ -678,6 +687,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
# Set QT_INCLUDES
set( QT_INCLUDES ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
+ list(APPEND QT_INCLUDES "${X11BASE}/include")
# ask qmake for the documentation directory
@@ -982,13 +992,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
endif()
find_program(QT_MOC_EXECUTABLE
- NAMES moc-qt4 moc
+ NAMES moc4 moc-qt4 moc
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_UIC_EXECUTABLE
- NAMES uic-qt4 uic
+ NAMES uic4 uic-qt4 uic
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1018,13 +1028,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_LUPDATE_EXECUTABLE
- NAMES lupdate-qt4 lupdate
+ NAMES lupdate4 lupdate-qt4 lupdate
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LRELEASE_EXECUTABLE
- NAMES lrelease-qt4 lrelease
+ NAMES lrelease4 lrelease-qt4 lrelease
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
@@ -1036,13 +1046,13 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
)
find_program(QT_DESIGNER_EXECUTABLE
- NAMES designer-qt4 designer
+ NAMES designer4 designer-qt4 designer
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)
find_program(QT_LINGUIST_EXECUTABLE
- NAMES linguist-qt4 linguist
+ NAMES linguist4 linguist-qt4 linguist
PATHS ${QT_BINARY_DIR}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
)