[cmake-developers] FindFreetype patch for Windows debug lib naming
Rolf Eike Beer
eike at sf-mail.de
Fri Jun 10 02:45:12 EDT 2016
Am 2016-06-09 23:35, schrieb Stuart Mentzer:
> On 6/9/2016 9:33 AM, Rolf Eike Beer wrote:
>> Am 2016-06-09 15:00, schrieb Brad King:
>>> On 06/08/2016 12:33 AM, Stuart Mentzer wrote:
>>>> Here is a little patch that lets FindFreetype find the debug
>>>> library on Windows, where it is named with a d suffix.
>>>
>>> Thanks. I split the patch into two and applied:
>>>
>>> FindFreetype: Factor out common find command arguments
>>> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=746a4245
>>>
>>> FindFreetype: Search for a separate debug library
>>> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6085b855
>>
>> This will probably not work: SLC will look for
>> FREETYPE_LIBRARY_RELEASE, which is never set. So you will have to
>>
>> set(FREETYPE_LIBRARY_RELEASE ${FREETYPE_LIBRARY})
>> SLC()
>> unset(FREETYPE_LIBRARY_RELEASE)
>>
>> or something like that.
> I'm a little confused here. Eike, you suggested that I shouldn't name
> the release variable FREETYPE_LIBRARY_RELEASE, so I changed it to
> FREETYPE_LIBRARY, but looking at SLC code it seems that would both
> work and get FREETYPE_LIBRARY set. I guess doing it the way you
> suggest above would also achieve the same thing but it seemed and
> seems more symmetric to name the release variable with _RELEASE and
> let SLC do its job. Anyway, I'm happy to submit the second part of the
> patch once it is clear what is best.
Hi,
I'm sure I also wrote "you probably need to set/unset
FREETYPE_LIBRARY_RELEASE around SLC so it still works", although I can't
find the mail where I said that (besides the above, of course). In the
end you can test it easily: if both libraries are found, but only one
ends up in FREETYPE_LIBRARIES then something went wrong.
The point here is that you can't change the variable name that is used
in find_library() as it would break compatibility.
Greetings,
Eike
More information about the cmake-developers
mailing list