Circular dependencies between harfbuzz and freetype causes issues on some system with ENABLE_freetype to ON
When enabling freetype, the produced libfreetype is linked with the system's libharfbuzz, wich depends on the system's libfreetype. There is a circular dependencies between these libs.
Of course, this can easily break if the system's libfreetype and superbuild's libfreetype does not expose the same symbols.
I would suggest adding harfbuzz as a superbuild project.
The failure is as follows :
[ 63%] Performing build step for 'fontconfig'
Making all in fontconfig
Making all in fc-blanks
Making all in fc-case
Making all in fc-lang
Making all in fc-glyphname
Making all in src
Making all in fc-cache
CCLD fc-cache
/usr/bin/ld: /lib/libharfbuzz.so: undefined reference to `FT_Done_MM_Var'
collect2: error: ld returned 1 exit status
make[5]: *** [Makefile:495: fc-cache] Error 1
make[4]: *** [Makefile:581: all-recursive] Error 1
make[3]: *** [Makefile:465: all] Error 2
CMake Error at /home/glow/work/paraview/paraviewSuperbuild/paraview-superbuild_build2/superbuild/sb-fontconfig-build.cmake:47 (message):
Failed with exit code 2
make[2]: *** [superbuild/CMakeFiles/fontconfig.dir/build.make:120: superbuild/fontconfig/stamp/fontconfig-build] Error 1
make[1]: *** [CMakeFiles/Makefile2:1824: superbuild/CMakeFiles/fontconfig.dir/all] Error 2
make: *** [Makefile:130: all] Error 2