FreeType.cmake 877 B

1234567891011121314151617181920212223242526
  1. # -*- cmake -*-
  2. if (FREETYPE_CMAKE_INCLUDED)
  3. return()
  4. endif (FREETYPE_CMAKE_INCLUDED)
  5. set (FREETYPE_CMAKE_INCLUDED TRUE)
  6. include(Prebuilt)
  7. # NanoSVG is used to render SVG fonts with Freetype, so let's set its dependency
  8. # here. HB
  9. use_prebuilt_binary(nanosvg)
  10. # NOTE: we never use the system freetype2 library, because it would fail to
  11. # display out custom fonts.
  12. #if (USESYSTEMLIBS)
  13. # include(FindPkgConfig)
  14. # pkg_check_modules(FREETYPE2 REQUIRED freetype2)
  15. #else (USESYSTEMLIBS)
  16. use_prebuilt_binary(freetype)
  17. set(FREETYPE2_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/freetype ${LIBS_PREBUILT_DIR}/include/freetype2 ${LIBS_PREBUILT_DIR}/include/freetype2/freetype)
  18. set(FREETYPE2_LIBRARIES freetype)
  19. #endif (USESYSTEMLIBS)
  20. include_directories(SYSTEM ${FREETYPE2_INCLUDE_DIRS})
  21. link_directories(${FREETYPE2_LIBRARY_DIRS})
  22. add_definitions(${FREETYPE2_CFLAGS_OTHERS})