title: CMake FIND_LIBRARY returns wrong path
body: <p>In my project I use differend 3rd libraries, which has been prebuild and added to external-debs subdirectory. I use multiple FindXXX CMake scripts to locate those requirements.</p>
  
  <p>When I try to locate a FreeImage prebuild, CMake find the library successfully but returns always the wrong path lib/libfreeimage.a instead of ./external-debs/freeimage/lib/windows/x64/libfreeimage.a</p>
  
  <p>This is my search operation:</p>
  
  <pre><code>FIND_LIBRARY(FREE_IMAGE_LIBRARY 
               NAMES ${LIB_PREFIX}freeimage.${LIB_POSTFIX}
               HINTS ${FREE_IMAGE_LIBRARY_DIR}
  )
  </code></pre>
  
  <p>And this are my predefintions:</p>
  
  <pre><code># Determine platform architecture
  IF (CMAKE_SIZEOF_VOID_P EQUAL 8 )
    SET(ARCHITECTURE "x64")
  ELSE()
    SET(ARCHITECTURE "x86")
  ENDIF()
  
  #Determine platform specific include and library 
  #paths settings.
  IF (WIN32)
     IF (MINGW)
        SET (LIB_PREFIX "lib")
        SET (LIB_POSTFIX "a")
     ELSEIF (MSVC)
        SET (LIB_POSTFIX "lib")
     ENDIF(MINGW)   
  
     SET (PLATFORM "windows")   
  ELSE (UNIX)
     SET (LIB_PREFIX "lib")
     SET (LIB_POSTFIX "a")
     SET (PLATFORM "linux") 
  ENDIF (WIN32)
  
  SET(FREE_IMAGE_INCLUDE_DIR  ${CMAKE_SOURCE_DIR}/external-deps/freeimage/include) 
  SET(FREE_IMAGE_LIBRARY_DIR  ${CMAKE_SOURCE_DIR}/external-deps/freeimage/lib/${PLATFORM}/${ARCHITECTURE})
  </code></pre>
  
  <p>I use this same code to locate an other pre-build 3rd libary dependency (jsoncpp) located in same external-deps subfolder without any issue. </p>
  
  <pre><code>Execute: FindJSON.cmake
  -- [INFO]: Find JSON include: ./external-deps/jsoncpp/include
  -- [INFO]: Find JSON lib: ./external-deps/jsoncpp/lib/windows/x64/libjsoncpp.a
  Execute: FindFreeImage.cmake
  -- [INFO]: Find FreeImage include: ./external-deps/freeimage/include
  -- [INFO]: Find FreeImage lib: /lib/libfreeimage.a
  </code></pre>
  
  <p>I'am using CMake 2.8.x on windows platform.
  Has anyone an idea why CMake sometimes return a wrong library path?</p>