Make it possible to build poppler on Android without fontconfig
Didn't manage to make fontconfig build, still nice to have poppler
available.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index efa6c3f..e2ebc44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,10 +89,13 @@
if(WIN32)
set(_default_fontconfiguration "win32")
+elseif(ANDROID)
+ # on android we don't have fontconfig and we don't want window-specific code
+ set(_default_fontconfiguration "generic")
else()
set(_default_fontconfiguration "fontconfig")
endif()
-set(FONT_CONFIGURATION "${_default_fontconfiguration}" CACHE STRING "The font configuration backend (win32|fontconfig).")
+set(FONT_CONFIGURATION "${_default_fontconfiguration}" CACHE STRING "The font configuration backend (win32|generic|fontconfig).")
string(TOLOWER "${FONT_CONFIGURATION}" font_configuration)
set(WITH_FONTCONFIGURATION_WIN32 OFF)
set(WITH_FONTCONFIGURATION_FONTCONFIG OFF)
@@ -100,6 +103,8 @@
set(WITH_FONTCONFIGURATION_WIN32 ON)
elseif(font_configuration STREQUAL "fontconfig")
set(WITH_FONTCONFIGURATION_FONTCONFIG ON)
+elseif(font_configuration STREQUAL "generic")
+ message(STATUS "no fontconfig or win32 specific code")
else()
message(FATAL_ERROR "Invalid font configuration setting: ${FONT_CONFIGURATION}")
endif()