[CMake] Qt4 -> Problems with QtCLucene

Andreas Pakulat apaku at gmx.de
Thu Nov 24 12:14:53 EST 2011


On 24.11.11 17:19:53, Mathemaster wrote:
> Hello everyone,
> 
> since cmake 2.8.5 I do have a problem with the following lines:
> 
> ----------
> 132 find_package(Qt4 COMPONENTS QtCore QtGui QtHelp QtCLucene)
> 133 if (NOT QT4_FOUND)
> 134     message (FATAL_ERROR *** QT not found. ***)
> 135 endif(NOT QT4_FOUND)
> ----------
> 
> since cmake 2.8.5 I receive the following message:
> ----------
> -- Could NOT find Qt4 (missing:  QT_QTCLUCENE_INCLUDE_DIR) (found
> version "4.7.4")
> CMake Error at qt_a4/CMakeLists.txt:134 (message):
>   ***QTnotfound.***
> ----------
> 
> This is some how ok:
> QtCLucene doesn't have a include directory, this is "only" a library
> without any include dir. It contains the search-Engine for the help.

If there are no headers, what are you trying to do with it in a cmake
project? You shouldn't need to link against QtCLucene to be able to use
QtHelp since your own code does not use any QtCLucene symbols itself.
That being said, the FindQt4 module already searches for the CLucense
library and adds it to the QT_QTHELP_LIBRARIES variable so linking
shouldn't be an issue anyway. The QtCLucene is not to be considered a Qt
module, its merely a helper library.

The module checks that for each component an include-dir and a library
is found, this probably changed between the two cmake versions, but it
makes complete sense since the only way to use a module is to have lib
and header available.

Andreas



More information about the CMake mailing list