Skip to content

Static freetype library in x64 windows triplet of vcpkg

pradeep edited this page Jun 21, 2018 · 1 revision

This page details the steps involved in building/installing static freetype while the rest of the dependecies of forge are dynamic libraries.

Replace the content of <vcpkg>/triplets/x64-windows with the following.

set(VCPKG_TARGET_ARCHITECTURE x64)

if(PORT STREQUAL "freetype")
    set(VCPKG_CRT_LINKAGE static)
    set(VCPKG_LIBRARY_LINKAGE static)
else()
    set(VCPKG_CRT_LINKAGE dynamic)
    set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()

Post above edit, install freetype as usually using the below command.

vcpkg install freetype:x64-windows

This command will build and install a static version of freetype unlike earlier.

Clone this wiki locally