FREEIMAGE_STATIC_LIBRARIES seems to have problems, replace with FREEIMAGE_LIBRARIES.