Skip to content

Commit

Permalink
cmake: add fontconfig to support static builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaldron committed Oct 11, 2024
1 parent 2b51920 commit daba71f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ endif()
find_package(OpenGL REQUIRED)
find_package(OpenSceneGraph REQUIRED COMPONENTS osgManipulator osgShadow osgSim osgViewer osgGA osgUtil osgText osgDB osg OpenThreads)

# For static builds we need to link with Fontconfig directly.
# There is an unknown issue where the Fc symbols are not found when linking executables statically.
find_package(Fontconfig QUIET)
if (Fontconfig_FOUND)
list(APPEND OPENSCENEGRAPH_LIBRARIES Fontconfig::Fontconfig)
endif()

# integrated profiling with tracy?
if(OSGEARTH_ENABLE_PROFILING)
find_package(Tracy)
Expand Down

0 comments on commit daba71f

Please sign in to comment.