diff --git a/CMakeLists.txt b/CMakeLists.txt index c150a51..af1ad37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,6 +157,9 @@ if (NOT BUILD_JS) pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image) include_directories (${SDL2_IMAGE_INCLUDE_DIRS}) set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_IMAGE_STATIC_LIBRARIES}) + pkg_search_module (SDL2_TTF REQUIRED SDL2_ttf) + include_directories (${SDL2_TTF_INCLUDE_DIRS}) + set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_TTF_STATIC_LIBRARIES}) pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer) include_directories (${SDL2_MIXER_INCLUDE_DIRS}) set (planetblupi_DEPS ${planetblupi_DEPS} ${SDL2_MIXER_STATIC_LIBRARIES}) @@ -233,6 +236,7 @@ else () ${SDL2_LIBRARIES} ${SDL2_MIXER_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} + ${SDL2_TTF_LIBRARIES} ${CURL_LIBRARIES} ${SDLKitchensink_LIBRARIES} pthread diff --git a/src/blupi.cxx b/src/blupi.cxx index e9fe1ec..56f0b8d 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -32,6 +32,7 @@ #include #include +#include #include #ifdef USE_CURL #include @@ -801,6 +802,11 @@ DoInit (int argc, char * argv[], bool & exit) return EXIT_FAILURE; } + if (TTF_Init () < 0) { + SDL_Log ("Couldn't initialize TTF: %s", SDL_GetError ()); + return EXIT_FAILURE; + } + if (!(g_settingsOverload & SETTING_LEGACY)) Display::getDisplay ().readDisplaySize ();