function (minko_enable_plugin_ttf target)
    minko_plugin_link("ttf" ${target})
    target_compile_options(${target} PRIVATE "-DMINKO_PLUGIN_TTF")
    set(TTF_PATH "${MINKO_HOME}/plugin/ttf")
    target_include_directories(${target} PRIVATE "${TTF_PATH}/include")

    get_target_property(TARGET_TYPE ${target} TYPE)
    get_target_property(OUTPUT_PATH ${target} RUNTIME_OUTPUT_DIRECTORY)
    
    if (WIN32)
        target_compile_options(${target} PRIVATE "-DMINKO_PLUGIN_TTF_FREETYPE")
        target_link_libraries(${target} "${TTF_PATH}/lib/freetype/lib/windows${BITNESS}/freetype.lib")

        if (TARGET_TYPE STREQUAL "EXECUTABLE")
            if (DLL STREQUAL "ON")
                string(FIND ${target} "minko-plugin" TEST_PLUGIN)
                if (TEST_PLUGIN STREQUAL -1)
                    file (COPY "${TTF_PATH}/lib/freetype/lib/windows${BITNESS}/freetype.dll" DESTINATION "${OUTPUT_PATH}")
                endif ()
            else ()
                file (COPY "${TTF_PATH}/lib/freetype/lib/windows${BITNESS}/freetype.dll" DESTINATION "${OUTPUT_PATH}")
            endif ()
        endif ()
    endif ()
    
    if (LINUX)
        target_compile_options(${target} PRIVATE "-DMINKO_PLUGIN_TTF_FREETYPE")
        target_link_libraries(${target} "freetype")
    endif ()
endfunction ()