2001-10-16 23:32:38 +04:00
|
|
|
# Locate Qt include paths and libraries
|
|
|
|
|
|
|
|
# This module defines
|
2002-09-02 15:03:43 +04:00
|
|
|
# QT_INCLUDE_DIR, where to find qt.h, etc.
|
|
|
|
# QT_LIBRARIES, the libraries to link against to use Qt.
|
|
|
|
# QT_DEFINITIONS, definitions to use when compiling code that uses Qt.
|
|
|
|
# QT_WRAP_CPP, If false, don't use QT_WRAP_CPP command.
|
|
|
|
# QT_WRAP_UI, If false, don't use QT_WRAP_UI command.
|
2002-09-03 00:59:47 +04:00
|
|
|
# QT_FOUND, If false, don't try to use Qt.
|
2002-09-02 15:03:43 +04:00
|
|
|
|
|
|
|
# also defined, but not for general use are
|
|
|
|
# QT_MOC_EXECUTABLE, where to find the moc tool.
|
|
|
|
# QT_UIC_EXECUTABLE, where to find the uic tool.
|
|
|
|
# QT_QT_LIBRARY, where to find the Qt library.
|
|
|
|
# QT_QTMAIN_LIBRARY, where to find the qtmain library. This is only required by Qt3 on Windows.
|
2001-10-16 23:32:38 +04:00
|
|
|
|
2002-09-13 13:39:42 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
2003-01-28 23:44:45 +03:00
|
|
|
FIND_PATH(QT_INCLUDE_DIR qt.h
|
2002-09-13 13:39:42 +04:00
|
|
|
$ENV{QTDIR}/include
|
2001-10-16 23:32:38 +04:00
|
|
|
/usr/local/qt/include
|
|
|
|
/usr/local/include
|
2003-01-28 23:44:45 +03:00
|
|
|
/usr/include
|
|
|
|
C:/Progra~1/qt/include
|
2001-10-16 23:32:38 +04:00
|
|
|
)
|
|
|
|
|
2003-01-28 23:44:45 +03:00
|
|
|
FIND_LIBRARY(QT_QT_LIBRARY qt
|
2002-09-13 13:39:42 +04:00
|
|
|
$ENV{QTDIR}/lib
|
2001-10-16 23:32:38 +04:00
|
|
|
/usr/local/qt/lib
|
|
|
|
/usr/local/lib
|
|
|
|
/usr/lib
|
2003-01-28 23:44:45 +03:00
|
|
|
C:/Progra~1/qt/lib
|
2001-10-16 23:32:38 +04:00
|
|
|
)
|
|
|
|
|
2003-01-28 23:44:45 +03:00
|
|
|
FIND_PROGRAM(QT_MOC_EXECUTABLE moc
|
|
|
|
$ENV{QTDIR}/bin C:/Progra~1/qt/bin
|
2001-10-16 23:32:38 +04:00
|
|
|
)
|
|
|
|
|
2003-01-28 23:44:45 +03:00
|
|
|
FIND_PROGRAM(QT_UIC_EXECUTABLE uic
|
|
|
|
$ENV{QTDIR}/bin C:/Progra~1/qt/bin
|
2001-11-09 20:08:50 +03:00
|
|
|
)
|
|
|
|
|
2001-10-16 23:32:38 +04:00
|
|
|
|
|
|
|
IF (WIN32)
|
2002-09-02 15:03:43 +04:00
|
|
|
FIND_LIBRARY(QT_QTMAIN_LIBRARY qtmain
|
2002-09-13 13:39:42 +04:00
|
|
|
$ENV{QTDIR}/lib C:/Progra~1/qt/lib
|
2002-09-02 20:05:40 +04:00
|
|
|
DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
|
|
|
|
)
|
2002-09-02 15:03:43 +04:00
|
|
|
ENDIF (WIN32)
|
2001-11-09 20:08:50 +03:00
|
|
|
|
2001-10-16 23:32:38 +04:00
|
|
|
|
2002-09-02 15:03:43 +04:00
|
|
|
IF (QT_MOC_EXECUTABLE)
|
|
|
|
SET ( QT_WRAP_CPP "YES")
|
|
|
|
ENDIF (QT_MOC_EXECUTABLE)
|
|
|
|
|
|
|
|
IF (QT_UIC_EXECUTABLE)
|
|
|
|
SET ( QT_WRAP_UI "YES")
|
|
|
|
ENDIF (QT_UIC_EXECUTABLE)
|
|
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
# Backwards compatibility for CMake1.4 and 1.2
|
|
|
|
SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} )
|
|
|
|
SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} )
|
|
|
|
|
|
|
|
ENDIF(QT_QT_LIBRARY)
|
|
|
|
ENDIF(QT_INCLUDE_DIR)
|
2002-09-13 17:49:35 +04:00
|
|
|
|
|
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
QT_INCLUDE_DIR
|
|
|
|
QT_QT_LIBRARY
|
|
|
|
QT_QTMAIN_LIBRARY
|
|
|
|
QT_UIC_EXECUTABLE
|
|
|
|
QT_MOC_EXECUTABLE
|
2003-01-13 18:11:23 +03:00
|
|
|
QT_WRAP_CPP
|
|
|
|
QT_WRAP_UI
|
2002-09-13 17:49:35 +04:00
|
|
|
)
|