From e67142db1d8fca6b0f407bd435fd665d52036cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 3 Feb 2013 14:38:33 +0100 Subject: [PATCH] Properly check (and document) dependencies for Text library. --- CMakeLists.txt | 2 +- modules/FindMagnum.cmake | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba6c5a807..b24e7f526 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_dependent_option(WITH_PRIMITIVES "Builf Primitives library" OFF "NOT WITH_ cmake_dependent_option(WITH_SCENEGRAPH "Build SceneGraph library" OFF "NOT WITH_EVERYTHING;NOT WITH_DEBUGTOOLS" ON) cmake_dependent_option(WITH_SHADERS "Build Shaders library" OFF "NOT WITH_EVERYTHING;NOT WITH_DEBUGTOOLS" ON) cmake_dependent_option(WITH_TEXT "Build Text library" OFF "NOT WITH_EVERYTHING" ON) -cmake_dependent_option(WITH_TEXTURETOOLS "Build TextureTools library" OFF "NOT WITH_EVERYTHING" ON) +cmake_dependent_option(WITH_TEXTURETOOLS "Build TextureTools library" OFF "NOT WITH_EVERYTHING;NOT WITH_TEXT" ON) cmake_dependent_option(WITH_MAGNUMINFO "Build magnum-info utility" OFF "NOT WITH_EVERYTHING" ON) diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index 8a5ed0983..0774bc391 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -22,7 +22,8 @@ # Primitives - Library with stock geometric primitives (static) # SceneGraph - Scene graph library # Shaders - Library with stock shaders -# Text - Text rendering library +# Text - Text rendering library (depends on TextureTools component, +# HarfBuzz and FreeType library) # TextureTools - TextureTools library # GlxApplication - GLX application (depends on X11 libraries) # XEglApplication - X/EGL application (depends on EGL and X11 libraries) @@ -208,6 +209,13 @@ foreach(component ${Magnum_FIND_COMPONENTS}) # Text library if(${component} STREQUAL Text) set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Font.h) + + # Dependencies + find_package(FreeType) + find_package(HarfBuzz) + if(NOT FREETYPE_FOUND OR NOT HARFBUZZ_FOUND) + unset(MAGNUM_${_COMPONENT}_LIBRARY) + endif() endif() # TextureTools library