On 6/5/2016 4:26 AM, Rolf Eike Beer wrote:
Am Samstag, 4. Juni 2016, 19:26:22 schrieb Stuart Mentzer:
On 6/4/2016 5:03 PM, Roger Leigh wrote:
On 04/06/2016 20:47, Stuart Mentzer wrote:
Hello,

FindFreetype.cmake is failing to find the debug library on Windows
because it is named freetype*d*.lib and freetyped isn't in the NAMES
list. Is there some variable I can set to get it found or can freetyped
get added to NAMES?
See how other modules handle this, e.g.

https://github.com/Kitware/CMake/blob/master/Modules/FindZLIB.cmake#L77

Note the separate searches for the release and debug libs on lines 88-89
and select_library_configurations on line 93.

If you adapt FindFreetype to use the same pattern, it will handle this
properly.
Thanks Roger. That looks the right way to do it. Seems odd that it is
handled for zlib but not for freetype. Is this something we can just ask
the developers to fix or would it be best for me to submit the fix to the
developers list?
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 ;-).

Stuart
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to