summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorlains <lains@caramail.com>2019-08-20 17:06:27 +0200
committerPierre GRANDIN <pgrandin@users.noreply.github.com>2019-08-20 09:06:27 -0600
commite7a70e9dc04b94b47fb7786aab4edfd25132c70f (patch)
tree3b116eb756d018664a3673c574cb9bf3477750d9 /CMakeLists.txt
parentc2f9838f07a52cc64cb05e9cf95bb378261946d9 (diff)
downloadnavit-e7a70e9dc04b94b47fb7786aab4edfd25132c70f.tar.gz
Fix: Fix pkgconfig detection, and multiple subsequent build for Android (#833)
* Fixing lib detection based on build host for Android builds * Fixing workaround according to jandegr's proposal * Fixing subsequent Android builds (where rename fails because of pre-existing renamed files)
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt52
1 files changed, 29 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4890afa04..1ce8d4b41 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -154,31 +154,35 @@ INCLUDE (CheckSymbolExists)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules ( GMODULE gmodule-2.0 )
- if (GMODULE_FOUND)
- set(HAVE_GMODULE 1)
- include_directories(${GMODULE_INCLUDE_DIRS})
- list(APPEND NAVIT_LIBS ${GMODULE_LIBRARIES})
- endif(GMODULE_FOUND)
-
- pkg_check_modules (GLIB2 glib-2.0>=2.10)
- if (GLIB2_FOUND)
- set(HAVE_GLIB 1)
- include_directories(${GLIB2_INCLUDE_DIRS})
- list(APPEND NAVIT_LIBS ${GLIB2_LIBRARIES})
- else(GLIB2_FOUND)
- set_with_reason(support/glib "Glib not found" TRUE ${INTL_LIBS})
- endif(GLIB2_FOUND)
+ if (NOT ANDROID)
+ pkg_check_modules ( GMODULE gmodule-2.0 )
+ if (GMODULE_FOUND)
+ set(HAVE_GMODULE 1)
+ include_directories(${GMODULE_INCLUDE_DIRS})
+ list(APPEND NAVIT_LIBS ${GMODULE_LIBRARIES})
+ endif(GMODULE_FOUND)
+
+ pkg_check_modules (GLIB2 glib-2.0>=2.10)
+ if (GLIB2_FOUND)
+ set(HAVE_GLIB 1)
+ include_directories(${GLIB2_INCLUDE_DIRS})
+ list(APPEND NAVIT_LIBS ${GLIB2_LIBRARIES})
+ else(GLIB2_FOUND)
+ set_with_reason(support/glib "Glib not found" TRUE ${INTL_LIBS})
+ endif(GLIB2_FOUND)
+ endif(NOT ANDROID)
pkg_check_modules(FONTCONFIG "fontconfig >= 2.2.0")
- pkg_check_modules(DBUS "dbus-1 >= 1.4")
- pkg_check_modules(DBUSGLIB dbus-glib-1)
- if(DBUSGLIB_FOUND)
- include_directories(${DBUSGLIB_INCLUDE_DIRS})
- set_with_reason(binding/dbus "dbus-glib-1 found" TRUE ${DBUSGLIB_LIBRARIES})
- set_with_reason(speech/dbus "dbus-glib-1 found" TRUE ${DBUSGLIB_LIBRARIES})
- set_with_reason(vehicle/gpsd_dbus "dbus-glib-1 found" TRUE ${DBUSGLIB_LIBRARIES})
- endif()
+ if (NOT ANDROID)
+ pkg_check_modules(DBUS "dbus-1 >= 1.4")
+ pkg_check_modules(DBUSGLIB dbus-glib-1)
+ if(DBUSGLIB_FOUND)
+ include_directories(${DBUSGLIB_INCLUDE_DIRS})
+ set_with_reason(binding/dbus "dbus-glib-1 found" TRUE ${DBUSGLIB_LIBRARIES})
+ set_with_reason(speech/dbus "dbus-glib-1 found" TRUE ${DBUSGLIB_LIBRARIES})
+ set_with_reason(vehicle/gpsd_dbus "dbus-glib-1 found" TRUE ${DBUSGLIB_LIBRARIES})
+ endif(DBUSGLIB_FOUND)
+ endif(NOT ANDROID)
pkg_check_modules(LIBLOCATION liblocation)
pkg_check_modules(LIBOSSO libosso)
@@ -740,6 +744,8 @@ if(ANDROID)
set_with_reason(graphics/null "Android detected" FALSE)
set_with_reason(graphics/android "Android detected" TRUE)
set_with_reason(speech/android "Android detected" TRUE)
+ set_with_reason(support/ezxml "Android detected" TRUE)
+ set_with_reason(support/glib "Android detected" TRUE)
set_with_reason(traffic/traff_android "Android detected" TRUE)
set_with_reason(vehicle/android "Android detected" TRUE)
set_with_reason(vehicle/file "Android detected" FALSE)