mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-31 05:03:22 +08:00
388d219f25
The way of including freetype headers is by using #include <ft2build.h> #include FT_FREETYPE_H along with $root/include/freetype which has $root/include/freetype/ft2build.h and then the rest of the headers under $root/include/freetype/freetype2/*.h. The portfile.cmake moves the headers one directory up into $root/include so that there's $root/include/ft2build.h and the rest of the headers under $root/include/freetype/. This in turn means that the above way of including header files requires $root/include to be in the include search path. That's not the case by default and the generated freetype-config.cmake also doesn't include that. Therefore the freetype config approach results in failing builds when applications wants to use it. This is easy to reproduce using find_package(Freetype CONFIG REQUIRED) ... target_link_libraries(foo PRIVATE freetype) As a remedy, this patch fixes the freetype-config.cmake file to add $root/include in the include search path.