[CMake] Choosing between debug and release variants of third-party
libraries
Bill Hoffman
bill.hoffman at kitware.com
Fri Nov 9 21:14:37 EST 2007
Philip Lowman wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Philip Lowman wrote:
>> So you can't do something like this?
>>
>> FIND_LIBRARY(qtmain_release qtmain
>> PATHS "C:/lang/qt/3.3.4r/lib" NO_DEFAULT_PATH)
>> FIND_LIBRARY(qtmain_debug qtmain
>> PATHS "C:/lang/qt/3.3.4/lib" NO_DEFAULT_PATH)
>>
>> # declare your targets.....
>>
>> TARGET_LINK_LIBRARIES(foo release ${qtmain_release})
>> TARGET_LINK_LIBRARIES(food debug ${qtmain_debug})
>
> Sorry, what I meant was
>
> TARGET_LINK_LIBRARIES(foo release ${qtmain_release})
> TARGET_LINK_LIBRARIES(foo debug ${qtmain_debug})
>
The module FindQt4.cmake handles debug and release qtmain already. See
Modules/FindQt4.cmake and Modules/UseQt4.cmake for more information.
-Bill
More information about the CMake
mailing list