Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
On 6/17/2016 1:12 PM, Brad King wrote: On 06/17/2016 01:02 PM, Stuart Mentzer wrote: Thanks but a line was lost in translation at the bottom: mark_as_advanced( *FREETYPE_LIBRARY* FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build ) SLC handles mark_as_advanced for the _DEBUG and _RELEASE variables but I assume we still need the base variable handled in FindFreetype. I dropped it intentionally. We no longer add FREETYPE_LIBRARY to the cache, so we are not responsible for marking it as advanced. We only use the value if it was set by someone else. -Brad Ah, OK. This doesn't match the usage in FindZlib that I was using as a guide: mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
On 06/17/2016 01:02 PM, Stuart Mentzer wrote: > Thanks but a line was lost in translation at the bottom: > > mark_as_advanced( > *FREETYPE_LIBRARY* > FREETYPE_INCLUDE_DIR_freetype2 > FREETYPE_INCLUDE_DIR_ft2build > ) > > SLC handles mark_as_advanced for the _DEBUG and _RELEASE variables > but I assume we still need the base variable handled in FindFreetype. I dropped it intentionally. We no longer add FREETYPE_LIBRARY to the cache, so we are not responsible for marking it as advanced. We only use the value if it was set by someone else. -Brad -- 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
Am Freitag, 17. Juni 2016, 13:02:30 schrieb Stuart Mentzer: > On 6/17/2016 11:54 AM, Brad King wrote: > On 06/12/2016 01:52 PM, Stuart Mentzer wrote: > Looking at FindZlib.cmake I think the attached should be OK > Thanks. I've applied that as a patch here: > > FindFreetype: Find release and debug libraries separately > https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b213a7f6 > > -Brad > Thanks but a line was lost in translation at the bottom: > > mark_as_advanced( > FREETYPE_LIBRARY > FREETYPE_INCLUDE_DIR_freetype2 > FREETYPE_INCLUDE_DIR_ft2build > ) > > SLC handles mark_as_advanced for the _DEBUG and _RELEASE variables but I > assume we still need the base variable handled in FindFreetype. > > With that fix, if Eike is OK with this then it is done. No, this is actually correct. The things marked as advanced are cache variables. FREETYPE_LIBRARY is computed dynamically. The "advanced" thing is to hide these in the default view of cmake-gui. If Brad says the change of what is cached is ok I'm entirely fine with it. Eike signature.asc Description: This is a digitally signed message part. -- 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
On 6/17/2016 11:54 AM, Brad King wrote: On 06/12/2016 01:52 PM, Stuart Mentzer wrote: Looking at FindZlib.cmake I think the attached should be OK Thanks. I've applied that as a patch here: FindFreetype: Find release and debug libraries separately https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b213a7f6 -Brad Thanks but a line was lost in translation at the bottom: mark_as_advanced( FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build ) SLC handles mark_as_advanced for the _DEBUG and _RELEASE variables but I assume we still need the base variable handled in FindFreetype. With that fix, if Eike is OK with this then it is done. Thanks, 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
On 06/12/2016 01:52 PM, Stuart Mentzer wrote: > Looking at FindZlib.cmake I think the attached should be OK Thanks. I've applied that as a patch here: FindFreetype: Find release and debug libraries separately https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b213a7f6 -Brad -- 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
On 6/12/2016 12:33 PM, Rolf Eike Beer wrote: Am Freitag, 10. Juni 2016, 09:03:13 schrieb Brad King: On 06/10/2016 03:19 AM, Stuart Mentzer wrote: On 6/10/2016 2:45 AM, Rolf Eike Beer wrote: I'm sure I also wrote "you probably need to set/unset FREETYPE_LIBRARY_RELEASE around SLC so it still works", The point here is that you can't change the variable name that is used in find_library() as it would break compatibility. Is there someone who can just do what is needed and let us be done with this? Eike, IIRC what we've done for other modules is change the cache entries to use ${pkg}_LIBRARY_{RELEASE,DEBUG} and then provided compatibility with scripts that explicitly set ${pkg}_LIBRARY by using the value if set and skipping the search. See FindZLIB for an example of this. I'll hack something together, but that might take a day or two. Greetings, Eike Looking at FindZlib.cmake I think the attached should be OK and it is working for my use case. It goes back to setting up FREETYPE_LIBRARY_RELEASE variable and letting SLC set up FREETYPE_LIBRARY, as my first try and FindZlib do. It also lets SLC do the mark_as_advanced for the _RELEASE and _DEBUG vars. If that seems good to you both I'm willing to do another patch submission. Thanks, Stuart #.rst: # FindFreetype # # # Locate FreeType library # # This module defines # # :: # # FREETYPE_LIBRARIES, the library to link against # FREETYPE_FOUND, if false, do not try to link to FREETYPE # FREETYPE_INCLUDE_DIRS, where to find headers. # FREETYPE_VERSION_STRING, the version of freetype found (since CMake 2.8.8) # This is the concatenation of the paths: # FREETYPE_INCLUDE_DIR_ft2build # FREETYPE_INCLUDE_DIR_freetype2 # # # # $FREETYPE_DIR is an environment variable that would correspond to the # ./configure --prefix=$FREETYPE_DIR used in building FREETYPE. #= # Copyright 2007-2009 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) # Created by Eric Wing. # Modifications by Alexander Neundorf. # This file has been renamed to "FindFreetype.cmake" instead of the correct # "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. # Ugh, FreeType seems to use some #include trickery which # makes this harder than it should be. It looks like they # put ft2build.h in a common/easier-to-find location which # then contains a #include to a more specific header in a # more specific location (#include ). # Then from there, they need to set a bunch of #define's # so you can do something like: # #include FT_FREETYPE_H # Unfortunately, using CMake's mechanisms like include_directories() # wants explicit full paths and this trickery doesn't work too well. # I'm going to attempt to cut out the middleman and hope # everything still works. set(FREETYPE_FIND_ARGS HINTS ENV FREETYPE_DIR PATHS /usr/X11R6 /usr/local/X11R6 /usr/local/X11 /usr/freeware ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] ) find_path( FREETYPE_INCLUDE_DIR_ft2build ft2build.h ${FREETYPE_FIND_ARGS} PATH_SUFFIXES include/freetype2 include freetype2 ) find_path( FREETYPE_INCLUDE_DIR_freetype2 NAMES freetype/config/ftheader.h config/ftheader.h ${FREETYPE_FIND_ARGS} PATH_SUFFIXES include/freetype2 include freetype2 ) if(NOT FREETYPE_LIBRARY) find_library(FREETYPE_LIBRARY_RELEASE NAMES freetype libfreetype freetype219 ${FREETYPE_FIND_ARGS} PATH_SUFFIXES lib ) find_library(FREETYPE_LIBRARY_DEBUG NAMES freetyped libfreetyped freetype219d ${FREETYPE_FIND_ARGS} PATH_SUFFIXES lib ) include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) select_library_configurations(FREETYPE) endif() unset(FREETYPE_FIND_ARGS) # set the user variables if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) set(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") list(REMOVE_DUPLICATES FREETYPE_INCLUDE_DIRS) endif() set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") endif()
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
Am Freitag, 10. Juni 2016, 09:03:13 schrieb Brad King: > On 06/10/2016 03:19 AM, Stuart Mentzer wrote: > > On 6/10/2016 2:45 AM, Rolf Eike Beer wrote: > >> I'm sure I also wrote "you probably need to set/unset > >> FREETYPE_LIBRARY_RELEASE around SLC so it still works", > >> The point here is that you can't change the variable name > >> that is used in find_library() as it would break compatibility. > > > > Is there someone who can just do what is needed and let us be done with > > this? > Eike, IIRC what we've done for other modules is change the cache > entries to use ${pkg}_LIBRARY_{RELEASE,DEBUG} and then provided > compatibility with scripts that explicitly set ${pkg}_LIBRARY > by using the value if set and skipping the search. See FindZLIB > for an example of this. I'll hack something together, but that might take a day or two. Greetings, Eike signature.asc Description: This is a digitally signed message part. -- 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
On 06/10/2016 03:19 AM, Stuart Mentzer wrote: > On 6/10/2016 2:45 AM, Rolf Eike Beer wrote: >> I'm sure I also wrote "you probably need to set/unset >> FREETYPE_LIBRARY_RELEASE around SLC so it still works", >> The point here is that you can't change the variable name >> that is used in find_library() as it would break compatibility. > > Is there someone who can just do what is needed and let us be done with this? Eike, IIRC what we've done for other modules is change the cache entries to use ${pkg}_LIBRARY_{RELEASE,DEBUG} and then provided compatibility with scripts that explicitly set ${pkg}_LIBRARY by using the value if set and skipping the search. See FindZLIB for an example of this. -Brad -- 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
On 6/10/2016 2:45 AM, Rolf Eike Beer wrote: 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 Eike, Thanks for trying to help but really I don't know (or want to know) enough of CMake's internals to quickly resolve this. My only build example that uses FindFreetype builds debug and release separately and it would take some work to try to do them together. At this point I need some help or I have to move on and give up here. Is there someone who can just do what is needed and let us be done with this? Thanks, 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
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. Greetings, Eike 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. Thanks, 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
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. Greetings, Eike -- 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-developers
Re: [cmake-developers] FindFreetype patch for Windows debug lib naming
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 -Brad -- 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-developers
[cmake-developers] FindFreetype patch for Windows debug lib naming
Hello, Here is a little patch that lets FindFreetype find the debug library on Windows, where it is named with a d suffix. Much thanks to Rolf Eike Beer for help on this. Cheers, Stuart From 93576b26f52017eb9b60705c123be1956a512a77 Mon Sep 17 00:00:00 2001 From: Stuart MentzerDate: Wed, 8 Jun 2016 00:26:31 -0400 Subject: [PATCH] FindFreetype updates for debug library name on Windows with d suffix --- Help/release/dev/FindFreetype-debug-libs.rst | 5 +++ Modules/FindFreetype.cmake | 47 ++-- 2 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 Help/release/dev/FindFreetype-debug-libs.rst diff --git a/Help/release/dev/FindFreetype-debug-libs.rst b/Help/release/dev/FindFreetype-debug-libs.rst new file mode 100644 index 000..2637fb0 --- /dev/null +++ b/Help/release/dev/FindFreetype-debug-libs.rst @@ -0,0 +1,5 @@ +FindFreetype-debug-libs +-- + +* The :module:`FindFreetype` module now finds the debug library on +Windows where it is named with a d suffix. diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 7d46d15..9db34d5 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -51,9 +51,8 @@ # wants explicit full paths and this trickery doesn't work too well. # I'm going to attempt to cut out the middleman and hope # everything still works. -find_path( - FREETYPE_INCLUDE_DIR_ft2build - ft2build.h + +set(FREETYPE_FIND_ARGS HINTS ENV FREETYPE_DIR PATHS @@ -64,6 +63,12 @@ find_path( ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] +) + +find_path( + FREETYPE_INCLUDE_DIR_ft2build + ft2build.h + ${FREETYPE_FIND_ARGS} PATH_SUFFIXES include/freetype2 include @@ -75,16 +80,7 @@ find_path( NAMES freetype/config/ftheader.h config/ftheader.h - HINTS -ENV FREETYPE_DIR - PATHS -/usr/X11R6 -/usr/local/X11R6 -/usr/local/X11 -/usr/freeware -ENV GTKMM_BASEPATH -[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] -[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + ${FREETYPE_FIND_ARGS} PATH_SUFFIXES include/freetype2 include @@ -96,19 +92,23 @@ find_library(FREETYPE_LIBRARY freetype libfreetype freetype219 - HINTS -ENV FREETYPE_DIR - PATHS -/usr/X11R6 -/usr/local/X11R6 -/usr/local/X11 -/usr/freeware -ENV GTKMM_BASEPATH -[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] -[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] + ${FREETYPE_FIND_ARGS} + PATH_SUFFIXES +lib +) +find_library(FREETYPE_LIBRARY_DEBUG + NAMES +freetyped +libfreetyped +freetype219d + ${FREETYPE_FIND_ARGS} PATH_SUFFIXES lib ) +include(SelectLibraryConfigurations) +select_library_configurations(FREETYPE) + +unset(FREETYPE_FIND_ARGS) # set the user variables if(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) @@ -159,6 +159,7 @@ find_package_handle_standard_args( mark_as_advanced( FREETYPE_LIBRARY + FREETYPE_LIBRARY_DEBUG FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build ) -- 2.8.3.windows.1 -- 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-developers