[CMake] FindFreetype.cmake doesn't find debug library freetyped.lib

Stuart Mentzer Stuart_Mentzer at objexx.com
Sun Jun 5 08:35:34 EDT 2016


On 6/5/2016 5:23 AM, Roger Leigh wrote:
> On 05/06/2016 09:14, Stuart Mentzer wrote:
>> On 6/5/2016 4:26 AM, Rolf Eike Beer wrote:
>>> It's a reasonable addition, so if you can't come up with a patch
>>> yourself I'll
>>> have a look if I can do one next week which you can test.
>>>
>>> Greetings,
>>>
>>> Eike
>> Thanks Eike. The simplest, least invasive patch is just:
>>
>> find_library(FREETYPE_LIBRARY
>>   NAMES
>>     freetype
>>     libfreetype
>>     freetype219
>>
>> to:
>>
>> find_library(FREETYPE_LIBRARY
>>   NAMES
>>     freetype
>>     freetyped
>>     libfreetype
>>     freetype219
>>
>> but I understand if you don't want to mix release and debug lib names
>> like that. If so let me know and I'll do it the way it is done for zlib.
>> Problem is that I don't know if freetype219 would also have a d suffix
>> since I'm not sure why that is in there ;-).
>
> This won't behave correctly though--you might end up selecting the debug variant for release builds under some circumstances (and vice versa) and end up with a broken build.  It really needs to be separate.  You can simply add the "d" suffix to all the variants in the current list to the debug list for good measure.
>
> Regards,
> Roger
OK. I assumed that doing debug and release builds in the same tree isn't normal or supported, esp. since on Linux they give the same library names so collision and all that. But I'll do it the proper way and post it here.

Stuart


More information about the CMake mailing list