<div dir="ltr">On Wed, May 21, 2014 at 6:50 PM, Taylor Holberton <span dir="ltr"><<a href="mailto:taylorcholberton@gmail.com" target="_blank">taylorcholberton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">I've noticed that the FindFreetype module doesn't search standard Unix and Windows paths. Can I add these to the find module?<br clear="all"><div><br></div><div>As it currently stands, the module won't find Freetype in either Windows or Linux (despite it being installed in very standard locations). It can be overridden by creating an environment variable called FREETYPE_DIR, but I think adding a search to standard installation paths would be preferable for most.</div>
<span class=""><font color="#888888"></font></span></div></blockquote><div>Freetype include files have been found in the wild under</div><div> include/freetype2/config (My recent mingw installation) and also include/freetype2/freetype/config;</div>
<div class="gmail_extra">In the first case, current cmake Findfreetype won't ever be satisfied because it wants</div><div class="gmail_extra">to find  "freetype/config/ftheader.h" <br></div><div class="gmail_extra">
I think it gets built these days with the second form, with ft2build.h in include/ and ftheader.h</div><div class="gmail_extra">under config - ft2build simply includes ftheader relative to itself.</div><div class="gmail_extra">
 cmake looks for both files in the second case; it needs to find both (even if you may not be referencing them in code).</div><div class="gmail_extra">If you are built that way you should be good (under unix only; see code below), FREETYPE_DIR would help if you have re-located it.</div>
<div class="gmail_extra">I (just) found that the variable CMAKE_SYSTEM_PREFIX_PATH can be used to guide the search;  also CMAKE_PREFIX_PATH as the documentation says.  It worked for me when I set this variable under MSYS generator.  </div>
<div class="gmail_extra">You can also use <span style="color:rgb(0,0,0)">CMAKE_SYSTEM_INCLUDE_PATH and </span><span style="color:rgb(0,0,0)">CMAKE_INCLUDE_PATH as environment variables.</span></div><div class="gmail_extra">
<div class="gmail_extra"><br></div><div class="gmail_extra">find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h</div><div class="gmail_extra">  HINTS</div><div class="gmail_extra">    ENV FREETYPE_DIR</div><div class="gmail_extra">
  PATHS</div><div class="gmail_extra">    /usr/X11R6</div><div class="gmail_extra">    /usr/local/X11R6</div><div class="gmail_extra">    /usr/local/X11</div><div class="gmail_extra">    /usr/freeware</div><div class="gmail_extra">
    ENV GTKMM_BASEPATH</div><div class="gmail_extra">    [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]</div><div class="gmail_extra">    [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]</div><div class="gmail_extra">  PATH_SUFFIXES include/freetype2 include</div>
<div class="gmail_extra">)</div><div class="gmail_extra"><br></div><div class="gmail_extra">find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h</div><div class="gmail_extra">  HINTS</div><div class="gmail_extra">
    ENV FREETYPE_DIR</div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<span class=""><font color="#888888"><div><br></div></font></span></div></blockquote></div></div></div>