summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-07-30 19:38:58 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-07-30 19:38:58 (GMT)
commit7762431bb05babf28a01151918f78fef4870459e (patch)
treececb4f3375e814d4eb9ef625affbd7b5281cf442 /Modules
parent9549a5f1dd5f94b5016653c59e67036147d1a2d5 (diff)
downloadCMake-7762431bb05babf28a01151918f78fef4870459e.zip
CMake-7762431bb05babf28a01151918f78fef4870459e.tar.gz
CMake-7762431bb05babf28a01151918f78fef4870459e.tar.bz2
ENH: when linking in QT, we should also link DL, since QT uses them
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt.cmake125
1 files changed, 64 insertions, 61 deletions
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake
index 2bcbc43..4b88e2d 100644
--- a/Modules/FindQt.cmake
+++ b/Modules/FindQt.cmake
@@ -18,40 +18,40 @@
FIND_PATH(QT_INCLUDE_DIR qt.h
- $ENV{QTDIR}/include
- /usr/local/qt/include
- /usr/local/include
- /usr/include/qt3
- /usr/include/qt
- /usr/include
- C:/Progra~1/qt/include
- )
+ $ENV{QTDIR}/include
+ /usr/local/qt/include
+ /usr/local/include
+ /usr/include/qt3
+ /usr/include/qt
+ /usr/include
+ C:/Progra~1/qt/include
+ )
FIND_LIBRARY(QT_QT_LIBRARY
- NAMES qt qt-mt
- PATHS
- $ENV{QTDIR}/lib
- /usr/local/qt/lib
- /usr/local/lib
- /usr/lib
- /usr/share/qt3/lib
- C:/Progra~1/qt/lib
- )
+ NAMES qt qt-mt
+ PATHS
+ $ENV{QTDIR}/lib
+ /usr/local/qt/lib
+ /usr/local/lib
+ /usr/lib
+ /usr/share/qt3/lib
+ C:/Progra~1/qt/lib
+ )
FIND_PROGRAM(QT_MOC_EXECUTABLE moc
- $ENV{QTDIR}/bin C:/Progra~1/qt/bin
- )
+ $ENV{QTDIR}/bin C:/Progra~1/qt/bin
+ )
FIND_PROGRAM(QT_UIC_EXECUTABLE uic
- $ENV{QTDIR}/bin C:/Progra~1/qt/bin
- )
+ $ENV{QTDIR}/bin C:/Progra~1/qt/bin
+ )
IF (WIN32)
FIND_LIBRARY(QT_QTMAIN_LIBRARY qtmain
$ENV{QTDIR}/lib C:/Progra~1/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)
@@ -64,50 +64,53 @@ IF (QT_UIC_EXECUTABLE)
ENDIF (QT_UIC_EXECUTABLE)
-IF(QT_INCLUDE_DIR)
+ IF(QT_INCLUDE_DIR)
IF(QT_QT_LIBRARY)
- SET( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} )
- SET( QT_FOUND "YES" )
- SET( QT_DEFINITIONS "")
-
- IF (WIN32)
- IF (QT_QTMAIN_LIBRARY)
- # for version 3
- SET (QT_DEFINITIONS -DQT_DLL)
- SET (QT_LIBRARIES imm32.lib ${QT_QT_LIBRARY} ${QT_QTMAIN_LIBRARY} )
- ELSE (QT_QTMAIN_LIBRARY)
- # for version 2
- SET (QT_LIBRARIES imm32.lib ws2_32.lib ${QT_QT_LIBRARY} )
- ENDIF (QT_QTMAIN_LIBRARY)
- ELSE (WIN32)
- SET (QT_LIBRARIES ${QT_QT_LIBRARY} )
- ENDIF (WIN32)
+SET( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} )
+ SET( QT_FOUND "YES" )
+ SET( QT_DEFINITIONS "")
+
+ IF (WIN32)
+IF (QT_QTMAIN_LIBRARY)
+# for version 3
+ SET (QT_DEFINITIONS -DQT_DLL)
+ SET (QT_LIBRARIES imm32.lib ${QT_QT_LIBRARY} ${QT_QTMAIN_LIBRARY} )
+ELSE (QT_QTMAIN_LIBRARY)
+# for version 2
+ SET (QT_LIBRARIES imm32.lib ws2_32.lib ${QT_QT_LIBRARY} )
+ ENDIF (QT_QTMAIN_LIBRARY)
+ ELSE (WIN32)
+ SET (QT_LIBRARIES ${QT_QT_LIBRARY} )
+ENDIF (WIN32)
# Backwards compatibility for CMake1.4 and 1.2
- SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
- SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
-
- IF(UNIX)
- INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake )
- IF (X11_FOUND)
- SET (QT_LIBRARIES ${QT_LIBRARIES} ${X11_LIBRARIES})
- ENDIF (X11_FOUND)
- ENDIF(UNIX)
- IF(QT_QT_LIBRARY MATCHES "qt-mt")
- INCLUDE( ${CMAKE_ROOT}/Modules/FindThreads.cmake )
- SET(QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
- ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
+ SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
+SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
+
+ IF(UNIX)
+ INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake )
+ IF (X11_FOUND)
+ SET (QT_LIBRARIES ${QT_LIBRARIES} ${X11_LIBRARIES})
+ ENDIF (X11_FOUND)
+ IF (CMAKE_DL_LIBS)
+ SET (QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_DL_LIBS})
+ ENDIF (CMAKE_DL_LIBS)
+ENDIF(UNIX)
+ IF(QT_QT_LIBRARY MATCHES "qt-mt")
+ INCLUDE( ${CMAKE_ROOT}/Modules/FindThreads.cmake )
+SET(QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+ ENDIF(QT_QT_LIBRARY MATCHES "qt-mt")
ENDIF(QT_QT_LIBRARY)
ENDIF(QT_INCLUDE_DIR)
-MARK_AS_ADVANCED(
- QT_INCLUDE_DIR
- QT_QT_LIBRARY
- QT_QTMAIN_LIBRARY
- QT_UIC_EXECUTABLE
- QT_MOC_EXECUTABLE
- QT_WRAP_CPP
- QT_WRAP_UI
-)
+ MARK_AS_ADVANCED(
+ QT_INCLUDE_DIR
+ QT_QT_LIBRARY
+ QT_QTMAIN_LIBRARY
+ QT_UIC_EXECUTABLE
+ QT_MOC_EXECUTABLE
+ QT_WRAP_CPP
+ QT_WRAP_UI
+ )