<commit_before>IF(OSG_TEXT_USE_FONTCONFIG)
    find_package(Fontconfig MODULE)
ENDIF()

IF(DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSGTEXT_LIBRARY)
ELSE()
    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ENDIF()

SET(LIB_NAME osgText)
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
SET(TARGET_H
    ${HEADER_PATH}/Export
    ${HEADER_PATH}/Font
    ${HEADER_PATH}/Font3D
    ${HEADER_PATH}/FadeText
    ${HEADER_PATH}/Glyph
    ${HEADER_PATH}/KerningType
    ${HEADER_PATH}/String
    ${HEADER_PATH}/Style
    ${HEADER_PATH}/TextBase
    ${HEADER_PATH}/Text
    ${HEADER_PATH}/Text3D
    ${HEADER_PATH}/Version
)

# FIXME: For OS X, need flag for Framework or dylib
SET(TARGET_SRC
    DefaultFont.cpp
    DefaultFont.h
    GlyphGeometry.h
    GlyphGeometry.cpp
    Font.cpp
    FadeText.cpp
    Glyph.cpp
    String.cpp
    Style.cpp
    TextBase.cpp
    Text.cpp
    Text3D.cpp
    Version.cpp
    ${OPENSCENEGRAPH_VERSIONINFO_RC}
)

SET(TARGET_LIBRARIES
    osgDB
    osgUtil
    osg
    OpenThreads
)

SET(COMPONENT_PKGCONFIG_DESCRIPTION "Text rendering library for OpenSceneGraph")

if(OSG_TEXT_USE_FONTCONFIG AND Fontconfig_FOUND)
    MESSAGE(STATUS "osgText will be linked with FontConfig library")
    list(APPEND TARGET_LIBRARIES Fontconfig::Fontconfig)
    ADD_DEFINITIONS(-DWITH_FONTCONFIG)
else()
    MESSAGE(STATUS "osgText will not be linked with FontConfig library")
endif()
<commit_msg>Fontconfig should be external library.<commit_after>IF(OSG_TEXT_USE_FONTCONFIG)
    find_package(Fontconfig MODULE)
ENDIF()

IF(DYNAMIC_OPENSCENEGRAPH)
    ADD_DEFINITIONS(-DOSGTEXT_LIBRARY)
ELSE()
    ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC)
ENDIF()

SET(LIB_NAME osgText)
SET(HEADER_PATH ${OpenSceneGraph_SOURCE_DIR}/include/${LIB_NAME})
SET(TARGET_H
    ${HEADER_PATH}/Export
    ${HEADER_PATH}/Font
    ${HEADER_PATH}/Font3D
    ${HEADER_PATH}/FadeText
    ${HEADER_PATH}/Glyph
    ${HEADER_PATH}/KerningType
    ${HEADER_PATH}/String
    ${HEADER_PATH}/Style
    ${HEADER_PATH}/TextBase
    ${HEADER_PATH}/Text
    ${HEADER_PATH}/Text3D
    ${HEADER_PATH}/Version
)

# FIXME: For OS X, need flag for Framework or dylib
SET(TARGET_SRC
    DefaultFont.cpp
    DefaultFont.h
    GlyphGeometry.h
    GlyphGeometry.cpp
    Font.cpp
    FadeText.cpp
    Glyph.cpp
    String.cpp
    Style.cpp
    TextBase.cpp
    Text.cpp
    Text3D.cpp
    Version.cpp
    ${OPENSCENEGRAPH_VERSIONINFO_RC}
)

SET(TARGET_LIBRARIES
    osgDB
    osgUtil
    osg
    OpenThreads
)

SET(COMPONENT_PKGCONFIG_DESCRIPTION "Text rendering library for OpenSceneGraph")

if(OSG_TEXT_USE_FONTCONFIG AND Fontconfig_FOUND)
    MESSAGE(STATUS "osgText will be linked with FontConfig library")
    LIST(APPEND TARGET_EXTERNAL_LIBRARIES Fontconfig::Fontconfig)
    ADD_DEFINITIONS(-DWITH_FONTCONFIG)
else()
    MESSAGE(STATUS "osgText will not be linked with FontConfig library")
endif()

{'fraction_non_alphanumeric': 0.09157381615598886, 'fraction_numerical': 0.0020891364902506965, 'mean_word_length': 4.148745519713262, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5899725', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1011, 'n_words': 180}