ogre icon indicating copy to clipboard operation
ogre copied to clipboard

FreeImage considered found while path is wrong

Open yildiz-online opened this issue 6 years ago • 1 comments

System Information

  • Ogre Version: :1.12
  • Operating System / Platform: :linux ubuntu 18.04 mingw build
  • RenderSystem: :N/A

Detailled description

When building using freeimage, the cmake script consider it found as soon as the env variables are specified, no matter if the path is correct or not

example: -DFreeImage_INCLUDE_DIR="NotExistingPath" -> result in build will fail only when need Freeimage.h

... -- Found FreeImage: test/libFreeImage.a ... [ 70%] Building CXX object PlugIns/FreeImageCodec/CMakeFiles/Codec_FreeImage.dir/src/OgreFreeImageCodec.cpp.o /src/src/main/c++/PlugIns/FreeImageCodec/src/OgreFreeImageCodec.cpp:31:10: fatal error: FreeImage.h: No such file or directory #include <FreeImage.h>

-DFreeImage_LIBRARY="test/libFreeImage.a" -> build will fail only when linking codec_freeimage

... -- Found FreeImage: test/libFreeImage.a ... [ 70%] Linking CXX shared library ../../lib/Codec_FreeImage.so /usr/bin/ld: cannot find -ltest/libFreeImage.a ...

Build logs

Full build logs:

Include not found: https://travis-ci.org/yildiz-online/component-native-ogre3d/builds/564837841 Static lib not found: https://travis-ci.org/yildiz-online/component-native-ogre3d/builds/564836359

yildiz-online avatar Jul 29 '19 07:07 yildiz-online

FreeImage is also forced to always link as static library (line 14 in the Plugins/FreeImageCodec/CMakeLists.txt). To link it dynamically the FREEIMAGE_LIB define must not exist.

SNiLD avatar Oct 07 '19 12:10 SNiLD