[CMake] Finding debug Qt libraries without CMAKE_BUILD_TYPE set to None

Tom Kacvinsky tom.kacvinsky at vectorcast.com
Fri Oct 23 10:01:41 EDT 2015


That was it, I had to replace

  MAP_IMPORTED_CONFIG_COVERAGE

with

  MAP_IMPORTED_CONFIG_NONE

as I have

  set(CMAKE_BUILD_TYPE NONE)

I hope this is useful to others.


On Fri, Oct 23, 2015 at 9:38 AM, Tom Kacvinsky <tom.kacvinsky at vectorcast.com
> wrote:

> Here is what I tried for Qt4 (that is what I am using), using cmake 3.3.2
> on Windows 7
>
>   find_package(Qt4 4.8.5 REQUIRED QtCore QtGui QtXml Qt3Support QtWebKit
> QtSql QtSvg QtNetwork QAxContainer)
>
>   set_target_properties(Qt4::QtCore PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtGui PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtXml PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::Qt3Support PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtWebKit PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtSql PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtSvg PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtNetwork PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QAxContainer PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>
>   set(QT_LIBS Qt4::QtCore Qt4::QtGui Qt4::QtXml Qt4::Qt3Support
> Qt4::QtWebKit Qt4::QtSql Qt4::QtSvg Qt4::QtNetwork Qt4::QAxContainer)
>
> But apparently the set_target_properties trick only works with the FindQt5
> module, as I am still getting the release version of the libraries.  Any
> idea what I can do?  I am guessing
>
>    MAP_IMPORTED_CONFIG_COVERAGE
>
> is not the target property I want to set.
>
> Thanks,
>
> Tom
>
>
> On Thu, Oct 22, 2015 at 1:40 PM, Tom Kacvinsky <
> tom.kacvinsky at vectorcast.com> wrote:
>
>> I have need to find the debug version of Qt libraries.  From the
>> documentation I read, the libraries found are based on the CMAKE_BUILD_TYPE
>> vale.  So it it is set to Release, the release versions are found, and if
>> set to DEBUG, the debug versions are found.  Unfortunately, due to use of
>> Ada support from PLPlot, I cannot set it to eitehr of those values as then
>> our Ada support craps out.
>>
>> So, how can I find the debug version of the libraries if CMAKE_BUILD_TYPE
>> is set to NONE?
>>
>> Thanks,
>>
>> Tom
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151023/17c0a641/attachment.html>


More information about the CMake mailing list