FindQt3¶
This module finds Qt3, a cross-platform application development framework for creating graphical user interfaces and applications.
Note
This module is for Qt version 3. As of Qt version 5, the Qt upstream also
provides an exported configuration to find Qt. New code should follow the
cmake-qt(7) instead of using this module.
Result Variables¶
This module sets the following variables:
Qt3_FOUNDTrue if Qt3 has been found.
QT_FOUNDTrue if Qt3 has been found. This variable is for compatibility with other Qt find modules.
QT_VERSION_STRINGThe version of Qt3 that was found.
QT_LIBRARIESLibraries needed to link against for using Qt3.
QT_DEFINITIONSA list of compile definitions to use when compiling code that uses Qt3.
Cache Variables¶
The following cache variables may also be set:
QT_INCLUDE_DIRThe directory containing
qt.hand other Qt3 header files.
The following cache variables may also be set but are not meant for general use:
QT_MOC_EXECUTABLEPath to the
moctool.QT_UIC_EXECUTABLEPath to the
uictool.QT_QT_LIBRARYPath to the Qt3 library.
QT_QTMAIN_LIBRARYPath to the
qtmainlibrary. This is only required by Qt3 on Windows.
Hints¶
QT_MT_REQUIREDTo search for the multithreaded version of Qt3, set this variable to
TRUEbefore looking for Qt3.
Examples¶
Finding Qt3 on the system:
find_package(Qt3)
if(Qt3_FOUND)
target_link_libraries(foo PRIVATE ${QT_LIBRARIES})
target_include_directories(foo PRIVATE ${QT_INCLUDE_DIR})
target_compile_definitions(foo PRIVATE ${QT_DEFINITIONS})
endif()
Looking for the multithreaded version of Qt3:
set(QT_MT_REQUIRED TRUE)
find_package(Qt3)