[CMake] FindQt4.cmake returns too much irrelevant information

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Thu May 7 16:45:44 EDT 2009


Alan W. Irwin schrieb:
> I have just discovered that for -DCMAKE_BUILD_TYPE=Debug, the
> combination of
> FindQt4.cmake and UseQt4.cmake inserts the keywords debug, optimized, AND
> general into the QT_LIBRARIES list to divide the list into three sections.
> But only the debug section of that list is used by target_link_libraries
> for
> the -DCMAKE_BUILD_TYPE=Debug case.
> 
> Could we have a cleaner design that doesn't specify the
> target_link_libraries keywords and which simply returns in QT_LIBRARIES
> whatever is relevant for the CMAKE_BUILD_TYPE that is specified?
> 
CMAKE_BUILD_TYPE is not set for MSVC and other IDE generators so this
will not work. This would also mean that you can't change the buildtype
without doing a complete research of the existing libraries.
And CMAKE_BUILD_TYPE isn't use for some generators + is not set when you
run cmake on a clean builddir without any options.


Christian


More information about the CMake mailing list