summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjandegr <jandegr@users.noreply.github.com>2018-05-02 21:22:17 +0200
committerGitHub <noreply@github.com>2018-05-02 21:22:17 +0200
commitc6e644ec7702dbe80712e775f59215ce2df0dedc (patch)
treed6bf5460b26e44009482296a0b62cdf69b666fe5 /CMakeLists.txt
parent3de4a6cccf934cbd169e8189b782f440b3dd04d0 (diff)
downloadnavit-c6e644ec7702dbe80712e775f59215ce2df0dedc.tar.gz
rework:android:Move build system from ant to grandle (#553)
rework:android:Move build system from ant to grandle
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt39
1 files changed, 23 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f4ce4cc97..03a2fd004 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -682,27 +682,34 @@ if (HAS_IFADDRS)
endif(HAS_IFADDRS)
if(ANDROID)
- find_program(ANDROID_LOCATION NAMES android android.bat)
- find_program(ANT_LOCATION NAMES ant)
- if (NOT ANT_LOCATION)
- message_error("Could not find ant. Please install ant and add it to the search path.")
- else()
- execute_process(COMMAND ${ANT_LOCATION} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake RESULT_VARIABLE ANT_VERSION_OK OUTPUT_QUIET ERROR_QUIET)
- if(ANT_VERSION_OK GREATER 0)
- message(WARNING "Old ant version detected. If you need crash reporter, update to at least ant 1.8")
+ message(STATUS "Using generator "${CMAKE_GENERATOR})
+ if (NOT ${CMAKE_GENERATOR} STREQUAL Ninja)
+ find_program(ANDROID_LOCATION NAMES android android.bat)
+ find_program(ANT_LOCATION NAMES ant)
+ if (NOT ANT_LOCATION)
+ message_error("Could not find ant. Please install ant and add it to the search path.")
+ else()
+ execute_process(COMMAND ${ANT_LOCATION} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake RESULT_VARIABLE ANT_VERSION_OK OUTPUT_QUIET ERROR_QUIET)
+ if(ANT_VERSION_OK GREATER 0)
+ message(WARNING "Old ant version detected. If you need crash reporter, update to at least ant 1.8")
+ endif()
endif()
- endif()
- if (NOT ANDROID_LOCATION)
- message_error( "Could not find 'Android SDK and AVD Manager'. Please install the android sdk and add the <android-sdk>/tools directory to the search path.")
- endif()
- set(XSLTS "android;${XSLTS}" CACHE STRING "define a semicolon seperated list of XSLTs to process")
+ if (NOT ANDROID_LOCATION)
+ message_error( "Could not find 'Android SDK and AVD Manager'. Please install the android sdk and add the <android-sdk>/tools directory to the search path.")
+ endif()
+ set(XSLTS "android;${XSLTS}" CACHE STRING "define a semicolon seperated list of XSLTs to process")
+ endif (NOT ${CMAKE_GENERATOR} STREQUAL Ninja)
list(APPEND NAVIT_LIBS log)
set(HAVE_API_ANDROID 1)
set_with_reason(speech/cmdline "Android detected" FALSE)
set_with_reason(graphics/null "Android detected" FALSE)
- set_with_reason(graphics/android "Android detected, NDK:${ANDROID_NDK_API_VERSION}, API:${ANDROID_API_VERSION}" TRUE)
- set_with_reason(speech/android "Android detected, NDK:${ANDROID_NDK_API_VERSION}, API:${ANDROID_API_VERSION}" TRUE)
- set_with_reason(vehicle/android "Android detected, NDK:${ANDROID_NDK_API_VERSION}, API:${ANDROID_API_VERSION}" TRUE)
+ set_with_reason(graphics/android "Android detected" TRUE)
+ set_with_reason(speech/android "Android detected" TRUE)
+ set_with_reason(vehicle/android "Android detected" TRUE)
+ set_with_reason(vehicle/file "Android detected" FALSE)
+ set_with_reason(map/filter "Android detected" FALSE)
+ set_with_reason(USE_NATIVE_LANGUAGE_SUPPORT "Android detected" TRUE)
+# set_with_reason(plugin/pedestrian "Android detected" TRUE)
set(SHARED_LIBNAVIT TRUE)
add_feature(XPM2PNG "Android detected" TRUE)