[CMake] FindQt4.cmake returns too much irrelevant information

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu May 7 15:40:03 EDT 2009


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?

A clean design matters in a practical sense because QT_LIBRARIES has other
uses than just for target_link_libraries.  For example, in PLplot, we use
QT_LIBRARIES to configure a *.pc file containing pkg-config information for
PLplot users. Therefore, I am going to have to write a parsing routine to
dump all the irrelevant information from QT_LIBRARIES for whatever
CMAKE_BUILD_TYPE is specified.  I am stuck with this task regardless since
some of our users still have cmake-2.6.0.  Neverthess, I thought I would
plea for a clean design of the combination of FindQt4.cmake and UseQt4.cmake
here for the ultimate benefit of users of later CMake versions.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list