diff options
author | Dmitry Marakasov <amdmi3@amdmi3.ru> | 2015-04-08 00:32:09 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2015-04-08 00:37:27 -0400 |
commit | d2fc98e4a689288a04d07da49b673f39ffabf64b (patch) | |
tree | 884a4622fe52f885e9176d62797fd9c0cf0ba4e3 /src/CMakeLists.txt | |
parent | 0df736173e60df06a7a7162c285b9c5731a07c20 (diff) | |
download | minetest-d2fc98e4a689288a04d07da49b673f39ffabf64b.tar.gz minetest-d2fc98e4a689288a04d07da49b673f39ffabf64b.tar.bz2 minetest-d2fc98e4a689288a04d07da49b673f39ffabf64b.zip |
Fix freetype detection
Don't reinvent freetype detection, use working one from cmake.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ff700257c..88ab995ba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -111,23 +111,30 @@ option(ENABLE_FREETYPE "Enable FreeType2 (TrueType fonts and basic unicode suppo set(USE_FREETYPE FALSE) if(ENABLE_FREETYPE) - if(UNIX) - include(FindPkgConfig) - if(PKG_CONFIG_FOUND) - pkg_check_modules(FREETYPE QUIET freetype2) - if(FREETYPE_FOUND) - SET(FREETYPE_PKGCONFIG_FOUND TRUE) - SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) - # Because CMake is idiotic - string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS}) - string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS}) - endif(FREETYPE_FOUND) - endif(PKG_CONFIG_FOUND) - endif(UNIX) - if(NOT FREETYPE_FOUND) - find_package(Freetype) - endif() +## +## Note: FindFreetype.cmake seems to have been fixed in recent versions of +## CMake. If issues persist, re-enable this workaround specificially for the +## failing platforms. +## +# if(UNIX) +# include(FindPkgConfig) +# if(PKG_CONFIG_FOUND) +# pkg_check_modules(FREETYPE QUIET freetype2) +# if(FREETYPE_FOUND) +# SET(FREETYPE_PKGCONFIG_FOUND TRUE) +# SET(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) +# # Because CMake is idiotic +# string(REPLACE ";" " " FREETYPE_CFLAGS_STR ${FREETYPE_CFLAGS}) +# string(REPLACE ";" " " FREETYPE_LDFLAGS_STR ${FREETYPE_LDFLAGS}) +# endif(FREETYPE_FOUND) +# endif(PKG_CONFIG_FOUND) +# endif(UNIX) +# if(NOT FREETYPE_FOUND) +# find_package(Freetype) +# endif() + find_package(Freetype) if(FREETYPE_FOUND) + message(STATUS "Freetype enabled.") set(USE_FREETYPE TRUE) set(CGUITTFONT_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cguittfont") set(CGUITTFONT_LIBRARY cguittfont) |