title: Compiled FreeImage from source. #include FreeImage.h not found
body: <p>I have compiled FreeImage 3.10.0 from source at <strong>/lib/FreeImage</strong> on Mac OS X 10.6.</p>
  
  <p>I can see that after compilation these files were copied:</p>
  
  <pre><code>/usr/local/lib/libfreeimage-3.10.0.dylib
  /usr/local/lib/libfreeimage.a
  /usr/local/include/FreeImage.h
  </code></pre>
  
  <p>CMake cannot find FreeImage, but I cannot even do</p>
  
  <pre><code>#include &lt;FreeImage.h&gt;  // not found
  </code></pre>
  
  <p>I am assuming I need to add FreeImage.h to the Mac OS X environment path, except I don't know which path is the right one as there are a few different files which store environment path variables.</p>
  
  <p>What do I need to do to get FreeImage header to be found by my C++ app or CMake?</p>
  
  <p>Here is the first part of my <code>Makefile.osx</code> is this helps:</p>
  
  <pre><code># -*- Makefile -*-
  # Mac OSX makefile for FreeImage
  
  # This file can be generated by ./gensrclist.sh
  include Makefile.srcs
  
  # General configuration variables:
  CC_PPC = gcc-4.0
  CC_I386 = gcc-4.0
  CPP_PPC = g++-4.0
  CPP_I386 = g++-4.0
  COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden
  COMPILERFLAGS_PPC = -arch ppc
  COMPILERFLAGS_I386 = -arch i386
  COMPILERPPFLAGS = -Wno-ctor-dtor-privacy
  INCLUDE += 
  INCLUDE_PPC = -isysroot /Developer/SDKs/MacOSX10.6.sdk
  INCLUDE_I386 = -isysroot /Developer/SDKs/MacOSX10.6.sdk
  CFLAGS_PPC = $(COMPILERFLAGS) $(COMPILERFLAGS_PPC) $(INCLUDE) $(INCLUDE_PPC)
  CFLAGS_I386 = $(COMPILERFLAGS) $(COMPILERFLAGS_I386) $(INCLUDE) $(INCLUDE_I386)
  CPPFLAGS_PPC = $(COMPILERPPFLAGS) $(CFLAGS_PPC)
  CPPFLAGS_I386 = $(COMPILERPPFLAGS) $(CFLAGS_I386)
  LIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.6.sdk
  LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.6.sdk
  LIBTOOL = libtool
  LIPO = lipo
  </code></pre>
  
  <p><strong>Update:</strong> I added these lines into my Makefile as per Nicholas' instructions, then rebuilt but this didn't work:</p>
  
  <pre><code>CFLAGS = -I/usr/local/include
  LDFLAGS = -L/usr/local/lib
  </code></pre>