summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindQt3.cmake29
-rw-r--r--Modules/FindQt4.cmake16
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Tests/Wrapping/CMakeLists.txt3
4 files changed, 43 insertions, 7 deletions
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index beefc7c..15bd16f 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -19,12 +19,13 @@
# QT_WRAP_CPP, set true if QT_MOC_EXECUTABLE is found
# QT_WRAP_UI set true if QT_UIC_EXECUTABLE is found
-
+FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/)
FIND_PATH(QT_INCLUDE_DIR qt.h
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
$ENV{QTDIR}/include
+ ${GLOB_PATHS_BIN}
/usr/local/qt/include
/usr/local/include
/usr/lib/qt/include
@@ -48,7 +49,7 @@ IF(QT_INCLUDE_DIR)
ELSE(QT_INCLUDE_DIR)
ENDIF(QT_INCLUDE_DIR)
-
+FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/)
IF (QT_MT_REQUIRED)
FIND_LIBRARY(QT_QT_LIBRARY
NAMES qt-mt qt-mt${qt_version_str_lib} qt-mtedu${qt_version_str_lib} qt-mt230nc
@@ -57,6 +58,7 @@ IF (QT_MT_REQUIRED)
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
$ENV{QTDIR}/lib
+ ${GLOB_PATHS_LIB}
/usr/local/qt/lib
/usr/local/lib
/usr/lib/qt/lib
@@ -70,7 +72,11 @@ ELSE (QT_MT_REQUIRED)
FIND_LIBRARY(QT_QT_LIBRARY
NAMES qt qt-${qt_version_str_lib} qt-edu${qt_version_str_lib} qt-mt qt-mt230nc
PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
$ENV{QTDIR}/lib
+ ${GLOB_PATHS_LIB}
/usr/local/qt/lib
/usr/local/lib
/usr/lib/qt/lib
@@ -89,7 +95,11 @@ ENDIF(QT_QT_LIBRARY)
FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
NAMES qassistantclient
PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
$ENV{QTDIR}/lib
+ ${GLOB_PATHS_LIB}
/usr/local/qt/lib
/usr/local/lib
/usr/lib
@@ -100,8 +110,12 @@ FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY
FIND_PROGRAM(QT_MOC_EXECUTABLE
NAMES moc moc-qt3
- PATHS
+ PATHS
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
$ENV{QTDIR}/bin
+ ${GLOB_PATHS_BIN}
/usr/local/qt/bin
/usr/lib/qt/bin
/usr/share/qt3/bin
@@ -115,7 +129,11 @@ ELSE(QT_MOC_EXECUTABLE)
ENDIF(QT_MOC_EXECUTABLE)
FIND_PROGRAM(QT_UIC_EXECUTABLE uic
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
$ENV{QTDIR}/bin
+ ${GLOB_PATHS_BIN}
/usr/local/qt/bin
/usr/lib/qt/bin
/usr/share/qt3/bin
@@ -130,7 +148,10 @@ ENDIF(QT_UIC_EXECUTABLE)
IF (WIN32)
FIND_LIBRARY(QT_QTMAIN_LIBRARY qtmain
- $ENV{QTDIR}/lib C:/Progra~1/qt/lib
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib"
+ "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib"
+ $ENV{QTDIR}/lib "C:/Program Files/qt/lib"
DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
)
ENDIF (WIN32)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 3ef7c65..59cc2d1 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -115,10 +115,21 @@ IF (WIN32)
SET(QT_DEFINITIONS -DQT_DLL)
ENDIF(WIN32)
+FILE(GLOB GLOB_TEMP_VAR /usr/local/Trolltech/Qt-4*/)
+SET(GLOB_TEMP_VAR)
+IF(GLOB_TEMP_VAR)
+ SET(QT4_PATHS ${QT4_PATHS} ${GLOB_TEMP_VAR})
+ENDIF(GLOB_TEMP_VAR)
+SET(GLOB_TEMP_VAR)
+FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/)
+IF(GLOB_TEMP_VAR)
+ SET(QT4_PATHS ${QT4_PATHS} ${GLOB_TEMP_VAR})
+ENDIF(GLOB_TEMP_VAR)
# check for qmake
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake PATHS
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
$ENV{QTDIR}/bin
+ ${QT4_PATHS}
)
IF(QT_QMAKE_EXECUTABLE)
EXEC_PROGRAM(${QMAKE_PATH} ARGS "-query QT_VERSION"
@@ -162,8 +173,13 @@ IF(QT4_QMAKE_FOUND)
SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "")
ENDIF(QT_QMAKE_EXECUTABLE)
ENDIF (NOT QT_HEADERS_DIR)
+ FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-3*/include/Qt/)
+ SET(QT_PATH_INCLUDE ${GLOB_TEMP_VAR})
+ FILE(GLOB GLOB_TEMP_VAR /usr/local/Trolltech/Qt-4*/include/Qt/)
+ SET(QT_PATH_INCLUDE ${GLOB_TEMP_VAR})
FIND_PATH( QT_QT_INCLUDE_DIR qglobal.h
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/include/Qt"
+ ${QT_PATH_INCLUDE}
${QT_HEADERS_DIR}/Qt
${QT_LIBRARY_DIR}/QtCore.framework/Headers
$ENV{QTDIR}/include/Qt
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 58b5fe3..3a4ad97 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -546,7 +546,7 @@ IF(BUILD_TESTING)
--test-command wrapping
)
- INCLUDE ( ${CMAKE_ROOT}/Modules/FindQt.cmake )
+ INCLUDE (FindQt3)
MARK_AS_ADVANCED(
QT_INCLUDE_PATH
QT_MOC_EXE
diff --git a/Tests/Wrapping/CMakeLists.txt b/Tests/Wrapping/CMakeLists.txt
index f1b66fa..6395982 100644
--- a/Tests/Wrapping/CMakeLists.txt
+++ b/Tests/Wrapping/CMakeLists.txt
@@ -99,8 +99,7 @@ ADD_CUSTOM_TARGET(wraplibJava ALL
SET (QT_WRAP_CPP "On")
SET (QT_MOC_EXE "echo")
-SET(DESIRED_QT_VERSION 3)
-INCLUDE( ${CMAKE_ROOT}/Modules/FindQt.cmake )
+INCLUDE( FindQt3 )
IF (QT_FOUND AND QT_UIC_EXECUTABLE)