From ad5bebdd0cfa0fed3905b5e87e29a49a29273d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D1=80=D0=B5=D1=88=D0=B8=D0=BB=D0=BE=D0=B2=20=D0=92?= =?UTF-8?q?=D1=8F=D1=87=D0=B5=D1=81=D0=BB=D0=B0=D0=B2?= Date: Wed, 25 Oct 2017 18:57:25 +0300 Subject: [PATCH] Fabulous android CMake fix. --- 3party/jansson/CMakeLists.txt | 2 +- 3party/minizip/CMakeLists.txt | 4 + CMakeLists.txt | 39 +++++--- android/jni/CMakeLists.txt | 97 +++++++++++++++++++ android/jni/com/mapswithme/core/logging.cpp | 8 +- .../mapswithme/maps/DisplayedCategories.cpp | 4 +- .../maps/DownloadResourcesLegacyActivity.cpp | 2 +- android/jni/com/mapswithme/maps/Framework.cpp | 14 +-- .../jni/com/mapswithme/maps/LocationState.cpp | 4 +- .../jni/com/mapswithme/maps/MapFragment.cpp | 4 +- .../jni/com/mapswithme/maps/MapManager.cpp | 2 +- .../jni/com/mapswithme/maps/SearchEngine.cpp | 6 +- .../jni/com/mapswithme/maps/SearchRecents.cpp | 2 +- android/jni/com/mapswithme/maps/Sponsored.cpp | 4 +- .../jni/com/mapswithme/maps/TrafficState.cpp | 4 +- .../com/mapswithme/maps/UserMarkHelper.hpp | 4 +- .../jni/com/mapswithme/maps/VideoTimer.cpp | 5 +- .../maps/bookmarks/data/Bookmark.cpp | 4 +- .../maps/bookmarks/data/BookmarkCategory.cpp | 6 +- .../maps/bookmarks/data/BookmarkManager.cpp | 6 +- .../jni/com/mapswithme/maps/editor/Editor.cpp | 4 +- .../mapswithme/maps/editor/OpeningHours.cpp | 2 +- .../com/mapswithme/maps/editor/OsmOAuth.cpp | 4 +- .../mapswithme/maps/settings/UnitLocale.cpp | 2 +- android/jni/com/mapswithme/maps/sound/tts.cpp | 4 +- .../com/mapswithme/maps/taxi/TaxiManager.cpp | 4 +- android/jni/com/mapswithme/maps/ugc/UGC.cpp | 4 +- .../opengl/androidoglcontextfactory.cpp | 2 +- .../opengl/androidoglcontextfactory.hpp | 2 +- .../com/mapswithme/platform/HttpThread.cpp | 2 +- .../jni/com/mapswithme/platform/Language.cpp | 2 +- .../jni/com/mapswithme/platform/Language.hpp | 2 +- .../com/mapswithme/platform/PThreadImpl.cpp | 2 +- .../com/mapswithme/platform/SocketImpl.cpp | 2 +- android/jni/com/mapswithme/util/Config.cpp | 4 +- .../jni/com/mapswithme/util/HttpClient.cpp | 6 +- .../jni/com/mapswithme/util/LoggerFactory.cpp | 2 +- .../jni/com/mapswithme/util/NetworkPolicy.cpp | 2 +- .../jni/com/mapswithme/util/StringUtils.cpp | 2 +- .../util/statistics/PushwooshHelper.cpp | 2 +- map/CMakeLists.txt | 2 +- 41 files changed, 197 insertions(+), 82 deletions(-) create mode 100644 android/jni/CMakeLists.txt diff --git a/3party/jansson/CMakeLists.txt b/3party/jansson/CMakeLists.txt index 17b20e92ee..c2369c3d4a 100644 --- a/3party/jansson/CMakeLists.txt +++ b/3party/jansson/CMakeLists.txt @@ -2,7 +2,7 @@ project(jansson) include_directories(src ../../) -append(CMAKE_CXX_FLAGS "-std=c++11") +set (CMAKE_CXX_STANDARD 11) set( diff --git a/3party/minizip/CMakeLists.txt b/3party/minizip/CMakeLists.txt index 728f1f5a55..22d6ffd0eb 100644 --- a/3party/minizip/CMakeLists.txt +++ b/3party/minizip/CMakeLists.txt @@ -2,6 +2,10 @@ project(minizip) add_definitions(-DUSE_FILE32API -DNOCRYPT) +if (PLATFORM_ANDROID AND (${OS} MATCHES "mac")) + add_definitions(-D__APPLE__) +endif() + add_clang_compile_options("-Wno-unused-value") set( diff --git a/CMakeLists.txt b/CMakeLists.txt index c55692ff00..12eda7cfde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,18 +31,19 @@ function(omim_set_platform_var PLATFORM_VAR pattern) endif() endfunction() -omim_set_platform_var(PLATFORM_IPHONE "iphone-.*") -omim_set_platform_var(PLATFORM_ANDROID "android-.*") -omim_set_platform_var(PLATFORM_MAC "macx-.*" ${APPLE}) -omim_set_platform_var(PLATFORM_WIN "win32-.*" ${WIN32}) - -if (UNIX AND (NOT PLATFORM_MAC)) - set(LINUX_DETECTED TRUE) -else() - set(LINUX_DETECTED FALSE) +if (CMAKE_SYSTEM_NAME MATCHES "linux") + set(LINUX TRUE) endif() -omim_set_platform_var(PLATFORM_LINUX "linux-.*" ${LINUX_DETECTED}) +if (CMAKE_SYSTEM MATCHES "Android") + set(ANDROID TRUE) +endif() + +omim_set_platform_var(PLATFORM_IPHONE "iphone-.*") +omim_set_platform_var(PLATFORM_ANDROID "android-.*" ${ANDROID}) +omim_set_platform_var(PLATFORM_MAC "macx-.*" ${APPLE}) +omim_set_platform_var(PLATFORM_WIN "win32-.*" ${WIN32}) +omim_set_platform_var(PLATFORM_LINUX "linux-.*" ${LINUX}) if (PLATFORM_LINUX OR PLATFORM_MAC OR PLATFORM_WIN) set(PLATFORM_DESKTOP TRUE) @@ -123,6 +124,17 @@ endif() find_package(Boost 1.54) +if (NOT Boost_FOUND) + if (DEFINED ENV{BOOST_ROOT}) + set(Boost_INCLUDE_DIR "$ENV{BOOST_ROOT}/include") + set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/lib") + find_package(Boost 1.54) + else() + message("Please set BOOST_ROOT environment variable (path to Boost dirs 'include, lib')") + message("Note that for Android Boost version must be less than 1.6.*") + endif() +endif() + if (PYBINDINGS) if (PYTHON_VERSION VERSION_GREATER 3.0) set(_Boost_PYTHON3_HEADERS "boost/python.hpp") @@ -314,9 +326,10 @@ endif() add_compile_options( "-Wall" - "-std=c++11" ) +set (CMAKE_CXX_STANDARD 11) + add_clang_compile_options("-Wshorten-64-to-32") if (USE_ASAN) @@ -383,3 +396,7 @@ omim_add_test_subdirectory(3party/gmock) if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID AND NOT SKIP_DESKTOP) add_subdirectory(qt) endif() + +if (PLATFORM_ANDROID) + add_subdirectory(android/jni) +endif() diff --git a/android/jni/CMakeLists.txt b/android/jni/CMakeLists.txt new file mode 100644 index 0000000000..64bf350a9f --- /dev/null +++ b/android/jni/CMakeLists.txt @@ -0,0 +1,97 @@ +cmake_minimum_required(VERSION 3.2) + +project(mapswithme C CXX) + +include_directories( + ${OMIM_ROOT}/3party/jansson/src + ${OMIM_ROOT}/3party/boost + ${OMIM_ROOT}/3party/protobuf/protobuf/src + ${OMIM_ROOT}/3party/glm + ${OMIM_ROOT}/3party/osrm/osrm-backend/include + ${OMIM_ROOT}/3party/succinct + ${OMIM_ROOT}/3party/agg + ${OMIM_ROOT}/3party/icu/common + ${OMIM_ROOT}/3party/icu/i18n + ${OMIM_ROOT}/3party/stb_image + ${OMIM_ROOT}/3party/sdf_image +) + +set( + SRC + # JNI headers + ../../private.h + com/mapswithme/core/jni_helper.hpp + com/mapswithme/core/logging.hpp + com/mapswithme/core/ScopedEnv.hpp + com/mapswithme/core/ScopedLocalRef.hpp + com/mapswithme/maps/Framework.hpp + com/mapswithme/opengl/android_gl_utils.hpp + com/mapswithme/opengl/androidoglcontext.hpp + com/mapswithme/opengl/androidoglcontextfactory.hpp + com/mapswithme/opengl/gl3stub.h + com/mapswithme/platform/GuiThread.hpp + com/mapswithme/platform/Platform.hpp + + # JNI sources + com/mapswithme/core/jni_helper.cpp + com/mapswithme/core/logging.cpp + com/mapswithme/maps/bookmarks/data/Bookmark.cpp + com/mapswithme/maps/bookmarks/data/BookmarkManager.cpp + com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp + com/mapswithme/maps/cian/Cian.cpp + com/mapswithme/maps/DisplayedCategories.cpp + com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp + com/mapswithme/maps/editor/OpeningHours.cpp + com/mapswithme/maps/editor/Editor.cpp + com/mapswithme/maps/editor/OsmOAuth.cpp + com/mapswithme/maps/Framework.cpp + com/mapswithme/maps/LocationState.cpp + com/mapswithme/maps/LocationHelper.cpp + com/mapswithme/maps/MapFragment.cpp + com/mapswithme/maps/MapManager.cpp + com/mapswithme/maps/MwmApplication.cpp + com/mapswithme/maps/PrivateVariables.cpp + com/mapswithme/maps/SearchEngine.cpp + com/mapswithme/maps/SearchRecents.cpp + com/mapswithme/maps/settings/UnitLocale.cpp + com/mapswithme/maps/sound/tts.cpp + com/mapswithme/maps/Sponsored.cpp + com/mapswithme/maps/taxi/TaxiManager.cpp + com/mapswithme/maps/TrackRecorder.cpp + com/mapswithme/maps/TrafficState.cpp + com/mapswithme/maps/ugc/UGC.cpp + com/mapswithme/maps/UserMarkHelper.cpp + com/mapswithme/maps/viator/Viator.cpp + com/mapswithme/opengl/android_gl_utils.cpp + com/mapswithme/opengl/androidoglcontext.cpp + com/mapswithme/opengl/androidoglcontextfactory.cpp + com/mapswithme/opengl/gl3stub.c + com/mapswithme/platform/HttpThread.cpp + com/mapswithme/platform/GuiThread.cpp + com/mapswithme/platform/Language.cpp + com/mapswithme/platform/MarketingService.cpp + com/mapswithme/platform/Platform.cpp + com/mapswithme/platform/PThreadImpl.cpp + com/mapswithme/platform/SecureStorage.cpp + com/mapswithme/platform/SocketImpl.cpp + com/mapswithme/util/Config.cpp + com/mapswithme/util/HttpClient.cpp + com/mapswithme/util/LoggerFactory.cpp + com/mapswithme/util/NetworkPolicy.cpp + com/mapswithme/util/StringUtils.cpp + com/mapswithme/util/statistics/PushwooshHelper.cpp +) + +add_library(mapswithme SHARED ${SRC}) + +target_link_libraries(mapswithme + # Android libs + log android EGL GLESv2 atomic z + # MapsWithMe libs + map tracking routing traffic routing_common + drape_frontend search storage ugc indexer drape + platform editor partners_api local_ads mwm_diff bsdiff + geometry coding base opening_hours pugixml oauthcpp expat + freetype minizip jansson protobuf osrm stats_client + succinct stb_image sdf_image icu agg + ) diff --git a/android/jni/com/mapswithme/core/logging.cpp b/android/jni/com/mapswithme/core/logging.cpp index 32ec3a5aba..9ca2faf579 100644 --- a/android/jni/com/mapswithme/core/logging.cpp +++ b/android/jni/com/mapswithme/core/logging.cpp @@ -3,10 +3,10 @@ #include "base/exception.hpp" #include "base/logging.hpp" -#include "com/mapswithme/core/jni_helper.hpp" -#include "com/mapswithme/core/logging.hpp" -#include "com/mapswithme/core/ScopedEnv.hpp" -#include "com/mapswithme/util/crashlytics.h" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/logging.hpp" +#include "android/jni/com/mapswithme/core/ScopedEnv.hpp" +#include "android/jni/com/mapswithme/util/crashlytics.h" #include #include diff --git a/android/jni/com/mapswithme/maps/DisplayedCategories.cpp b/android/jni/com/mapswithme/maps/DisplayedCategories.cpp index 56d88ef84a..ab9ce9503b 100644 --- a/android/jni/com/mapswithme/maps/DisplayedCategories.cpp +++ b/android/jni/com/mapswithme/maps/DisplayedCategories.cpp @@ -1,5 +1,5 @@ -#include "com/mapswithme/maps/Framework.hpp" -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "search/displayed_categories.hpp" diff --git a/android/jni/com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp b/android/jni/com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp index c6e700fd00..57979ef0b3 100644 --- a/android/jni/com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp +++ b/android/jni/com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp @@ -14,7 +14,7 @@ #include "base/logging.hpp" #include "base/string_utils.hpp" -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include #include diff --git a/android/jni/com/mapswithme/maps/Framework.cpp b/android/jni/com/mapswithme/maps/Framework.cpp index ee4b435834..faea1353c2 100644 --- a/android/jni/com/mapswithme/maps/Framework.cpp +++ b/android/jni/com/mapswithme/maps/Framework.cpp @@ -1,10 +1,10 @@ -#include "com/mapswithme/maps/Framework.hpp" -#include "com/mapswithme/core/jni_helper.hpp" -#include "com/mapswithme/maps/UserMarkHelper.hpp" -#include "com/mapswithme/maps/bookmarks/data/BookmarkManager.hpp" -#include "com/mapswithme/opengl/androidoglcontextfactory.hpp" -#include "com/mapswithme/platform/Platform.hpp" -#include "com/mapswithme/util/NetworkPolicy.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/UserMarkHelper.hpp" +#include "android/jni/com/mapswithme/maps/bookmarks/data/BookmarkManager.hpp" +#include "android/jni/com/mapswithme/opengl/androidoglcontextfactory.hpp" +#include "android/jni/com/mapswithme/platform/Platform.hpp" +#include "android/jni/com/mapswithme/util/NetworkPolicy.hpp" #include "map/chart_generator.hpp" #include "map/user_mark.hpp" diff --git a/android/jni/com/mapswithme/maps/LocationState.cpp b/android/jni/com/mapswithme/maps/LocationState.cpp index 5556915a35..1c4ac3085b 100644 --- a/android/jni/com/mapswithme/maps/LocationState.cpp +++ b/android/jni/com/mapswithme/maps/LocationState.cpp @@ -1,8 +1,8 @@ #include "Framework.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" -#include "../platform/Platform.hpp" +#include "android/jni/com/mapswithme/platform/Platform.hpp" extern "C" { diff --git a/android/jni/com/mapswithme/maps/MapFragment.cpp b/android/jni/com/mapswithme/maps/MapFragment.cpp index 20debd2850..78e3a3adec 100644 --- a/android/jni/com/mapswithme/maps/MapFragment.cpp +++ b/android/jni/com/mapswithme/maps/MapFragment.cpp @@ -1,8 +1,8 @@ #include "Framework.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" -#include "../platform/Platform.hpp" +#include "android/jni/com/mapswithme/platform/Platform.hpp" #include "storage/index.hpp" diff --git a/android/jni/com/mapswithme/maps/MapManager.cpp b/android/jni/com/mapswithme/maps/MapManager.cpp index 7199912564..8ddc70c3e7 100644 --- a/android/jni/com/mapswithme/maps/MapManager.cpp +++ b/android/jni/com/mapswithme/maps/MapManager.cpp @@ -1,6 +1,6 @@ #include "Framework.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "coding/internal/file_data.hpp" diff --git a/android/jni/com/mapswithme/maps/SearchEngine.cpp b/android/jni/com/mapswithme/maps/SearchEngine.cpp index 32ef619608..9c792ef232 100644 --- a/android/jni/com/mapswithme/maps/SearchEngine.cpp +++ b/android/jni/com/mapswithme/maps/SearchEngine.cpp @@ -9,9 +9,9 @@ #include "base/assert.hpp" #include "base/logging.hpp" -#include "../core/jni_helper.hpp" -#include "../platform/Language.hpp" -#include "../platform/Platform.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/platform/Language.hpp" +#include "android/jni/com/mapswithme/platform/Platform.hpp" #include #include diff --git a/android/jni/com/mapswithme/maps/SearchRecents.cpp b/android/jni/com/mapswithme/maps/SearchRecents.cpp index cf899f596b..3eef9e0cf1 100644 --- a/android/jni/com/mapswithme/maps/SearchRecents.cpp +++ b/android/jni/com/mapswithme/maps/SearchRecents.cpp @@ -2,7 +2,7 @@ #include "search/result.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" using TSearchRequest = search::QuerySaver::TSearchRequest; diff --git a/android/jni/com/mapswithme/maps/Sponsored.cpp b/android/jni/com/mapswithme/maps/Sponsored.cpp index d448cae692..066a37123c 100644 --- a/android/jni/com/mapswithme/maps/Sponsored.cpp +++ b/android/jni/com/mapswithme/maps/Sponsored.cpp @@ -1,7 +1,7 @@ #include "Framework.hpp" -#include "../core/jni_helper.hpp" -#include "../platform/Platform.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/platform/Platform.hpp" #include "map/place_page_info.hpp" #include "partners_api/booking_api.hpp" diff --git a/android/jni/com/mapswithme/maps/TrafficState.cpp b/android/jni/com/mapswithme/maps/TrafficState.cpp index fe421012bb..96a9493550 100644 --- a/android/jni/com/mapswithme/maps/TrafficState.cpp +++ b/android/jni/com/mapswithme/maps/TrafficState.cpp @@ -1,8 +1,8 @@ #include "Framework.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" -#include "../platform/Platform.hpp" +#include "android/jni/com/mapswithme/platform/Platform.hpp" extern "C" { diff --git a/android/jni/com/mapswithme/maps/UserMarkHelper.hpp b/android/jni/com/mapswithme/maps/UserMarkHelper.hpp index c67c2e5dd5..e5851875b7 100644 --- a/android/jni/com/mapswithme/maps/UserMarkHelper.hpp +++ b/android/jni/com/mapswithme/maps/UserMarkHelper.hpp @@ -2,8 +2,8 @@ #include -#include "com/mapswithme/core/jni_helper.hpp" -#include "com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" namespace place_page { diff --git a/android/jni/com/mapswithme/maps/VideoTimer.cpp b/android/jni/com/mapswithme/maps/VideoTimer.cpp index 023db73e87..097ef920f3 100644 --- a/android/jni/com/mapswithme/maps/VideoTimer.cpp +++ b/android/jni/com/mapswithme/maps/VideoTimer.cpp @@ -1,6 +1,6 @@ #include "VideoTimer.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "base/assert.hpp" #include "base/logging.hpp" @@ -82,6 +82,3 @@ extern "C" g_timer->SetParentObject(thiz); } } - - - diff --git a/android/jni/com/mapswithme/maps/bookmarks/data/Bookmark.cpp b/android/jni/com/mapswithme/maps/bookmarks/data/Bookmark.cpp index d577efda8a..997e7fbea0 100644 --- a/android/jni/com/mapswithme/maps/bookmarks/data/Bookmark.cpp +++ b/android/jni/com/mapswithme/maps/bookmarks/data/Bookmark.cpp @@ -1,6 +1,6 @@ -#include "../../Framework.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" -#include "../../../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" namespace diff --git a/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp b/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp index 61ee05131a..24f2a6a378 100644 --- a/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp +++ b/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp @@ -1,6 +1,6 @@ -#include "com/mapswithme/maps/Framework.hpp" -#include "com/mapswithme/maps/UserMarkHelper.hpp" -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/maps/UserMarkHelper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "map/place_page_info.hpp" #include "platform/measurement_utils.hpp" diff --git a/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkManager.cpp b/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkManager.cpp index bd5225a739..84e7502450 100644 --- a/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkManager.cpp +++ b/android/jni/com/mapswithme/maps/bookmarks/data/BookmarkManager.cpp @@ -1,8 +1,8 @@ #include "BookmarkManager.hpp" -#include "com/mapswithme/core/jni_helper.hpp" -#include "com/mapswithme/maps/Framework.hpp" -#include "com/mapswithme/maps/UserMarkHelper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/maps/UserMarkHelper.hpp" #include "coding/zip_creator.hpp" #include "map/place_page_info.hpp" diff --git a/android/jni/com/mapswithme/maps/editor/Editor.cpp b/android/jni/com/mapswithme/maps/editor/Editor.cpp index 5fd037b5d0..235d0f60e4 100644 --- a/android/jni/com/mapswithme/maps/editor/Editor.cpp +++ b/android/jni/com/mapswithme/maps/editor/Editor.cpp @@ -1,7 +1,7 @@ #include -#include "com/mapswithme/core/jni_helper.hpp" -#include "com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" #include "coding/multilang_utf8_string.hpp" diff --git a/android/jni/com/mapswithme/maps/editor/OpeningHours.cpp b/android/jni/com/mapswithme/maps/editor/OpeningHours.cpp index 55faa9f909..d605bf463e 100644 --- a/android/jni/com/mapswithme/maps/editor/OpeningHours.cpp +++ b/android/jni/com/mapswithme/maps/editor/OpeningHours.cpp @@ -1,6 +1,6 @@ #include -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "editor/opening_hours_ui.hpp" #include "editor/ui2oh.hpp" diff --git a/android/jni/com/mapswithme/maps/editor/OsmOAuth.cpp b/android/jni/com/mapswithme/maps/editor/OsmOAuth.cpp index 452a624bb1..16931e7d62 100644 --- a/android/jni/com/mapswithme/maps/editor/OsmOAuth.cpp +++ b/android/jni/com/mapswithme/maps/editor/OsmOAuth.cpp @@ -1,7 +1,7 @@ #include -#include "com/mapswithme/core/jni_helper.hpp" -#include "com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" #include "base/logging.hpp" #include "base/string_utils.hpp" diff --git a/android/jni/com/mapswithme/maps/settings/UnitLocale.cpp b/android/jni/com/mapswithme/maps/settings/UnitLocale.cpp index ad129e09ac..aeeb008425 100644 --- a/android/jni/com/mapswithme/maps/settings/UnitLocale.cpp +++ b/android/jni/com/mapswithme/maps/settings/UnitLocale.cpp @@ -1,4 +1,4 @@ -#include "../Framework.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" #include "platform/measurement_utils.hpp" #include "platform/settings.hpp" diff --git a/android/jni/com/mapswithme/maps/sound/tts.cpp b/android/jni/com/mapswithme/maps/sound/tts.cpp index ae923fbeec..92d8902904 100644 --- a/android/jni/com/mapswithme/maps/sound/tts.cpp +++ b/android/jni/com/mapswithme/maps/sound/tts.cpp @@ -1,6 +1,6 @@ -#include "../Framework.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" -#include "../../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" namespace diff --git a/android/jni/com/mapswithme/maps/taxi/TaxiManager.cpp b/android/jni/com/mapswithme/maps/taxi/TaxiManager.cpp index f132469d90..e9c13b0175 100644 --- a/android/jni/com/mapswithme/maps/taxi/TaxiManager.cpp +++ b/android/jni/com/mapswithme/maps/taxi/TaxiManager.cpp @@ -1,5 +1,5 @@ -#include "com/mapswithme/maps/Framework.hpp" -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "partners_api/taxi_provider.hpp" diff --git a/android/jni/com/mapswithme/maps/ugc/UGC.cpp b/android/jni/com/mapswithme/maps/ugc/UGC.cpp index 0ce4f93da3..78a9569356 100644 --- a/android/jni/com/mapswithme/maps/ugc/UGC.cpp +++ b/android/jni/com/mapswithme/maps/ugc/UGC.cpp @@ -1,5 +1,5 @@ -#include "com/mapswithme/maps/Framework.hpp" -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "map/place_page_info.hpp" diff --git a/android/jni/com/mapswithme/opengl/androidoglcontextfactory.cpp b/android/jni/com/mapswithme/opengl/androidoglcontextfactory.cpp index 7cf45b8792..8b240c02d0 100644 --- a/android/jni/com/mapswithme/opengl/androidoglcontextfactory.cpp +++ b/android/jni/com/mapswithme/opengl/androidoglcontextfactory.cpp @@ -1,7 +1,7 @@ #include "androidoglcontextfactory.hpp" #include "android_gl_utils.hpp" -#include "../platform/Platform.hpp" +#include "android/jni/com/mapswithme/platform/Platform.hpp" #include "base/assert.hpp" #include "base/logging.hpp" diff --git a/android/jni/com/mapswithme/opengl/androidoglcontextfactory.hpp b/android/jni/com/mapswithme/opengl/androidoglcontextfactory.hpp index 43209d1fad..f679cc7dfd 100644 --- a/android/jni/com/mapswithme/opengl/androidoglcontextfactory.hpp +++ b/android/jni/com/mapswithme/opengl/androidoglcontextfactory.hpp @@ -1,6 +1,6 @@ #pragma once -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "androidoglcontext.hpp" #include "drape/oglcontextfactory.hpp" diff --git a/android/jni/com/mapswithme/platform/HttpThread.cpp b/android/jni/com/mapswithme/platform/HttpThread.cpp index 5abe243057..90db2127c3 100644 --- a/android/jni/com/mapswithme/platform/HttpThread.cpp +++ b/android/jni/com/mapswithme/platform/HttpThread.cpp @@ -1,5 +1,5 @@ #include "Platform.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "base/logging.hpp" #include "platform/http_thread_callback.hpp" diff --git a/android/jni/com/mapswithme/platform/Language.cpp b/android/jni/com/mapswithme/platform/Language.cpp index 1c0550062e..6dd36f1b43 100644 --- a/android/jni/com/mapswithme/platform/Language.cpp +++ b/android/jni/com/mapswithme/platform/Language.cpp @@ -1,6 +1,6 @@ #include "Language.hpp" -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "base/assert.hpp" #include "base/logging.hpp" diff --git a/android/jni/com/mapswithme/platform/Language.hpp b/android/jni/com/mapswithme/platform/Language.hpp index 0ab49bc313..24259e2359 100644 --- a/android/jni/com/mapswithme/platform/Language.hpp +++ b/android/jni/com/mapswithme/platform/Language.hpp @@ -1,6 +1,6 @@ #pragma once -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include diff --git a/android/jni/com/mapswithme/platform/PThreadImpl.cpp b/android/jni/com/mapswithme/platform/PThreadImpl.cpp index e068f9b2aa..c7ceb88e28 100644 --- a/android/jni/com/mapswithme/platform/PThreadImpl.cpp +++ b/android/jni/com/mapswithme/platform/PThreadImpl.cpp @@ -1,4 +1,4 @@ -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" /// Implements bodies of base/thread.hpp functions for Android diff --git a/android/jni/com/mapswithme/platform/SocketImpl.cpp b/android/jni/com/mapswithme/platform/SocketImpl.cpp index 9c81a0f95d..5485602079 100644 --- a/android/jni/com/mapswithme/platform/SocketImpl.cpp +++ b/android/jni/com/mapswithme/platform/SocketImpl.cpp @@ -1,4 +1,4 @@ -#include "../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "platform/socket.hpp" diff --git a/android/jni/com/mapswithme/util/Config.cpp b/android/jni/com/mapswithme/util/Config.cpp index deb30b2f0a..9a1bd78cfa 100644 --- a/android/jni/com/mapswithme/util/Config.cpp +++ b/android/jni/com/mapswithme/util/Config.cpp @@ -1,5 +1,5 @@ -#include "../core/jni_helper.hpp" -#include "../maps/Framework.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/maps/Framework.hpp" #include "platform/settings.hpp" namespace diff --git a/android/jni/com/mapswithme/util/HttpClient.cpp b/android/jni/com/mapswithme/util/HttpClient.cpp index e4a1f2a31f..3539b565b8 100644 --- a/android/jni/com/mapswithme/util/HttpClient.cpp +++ b/android/jni/com/mapswithme/util/HttpClient.cpp @@ -23,9 +23,9 @@ SOFTWARE. *******************************************************************************/ #include -#include "../core/jni_helper.hpp" -#include "../core/ScopedEnv.hpp" -#include "../core/ScopedLocalRef.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/ScopedEnv.hpp" +#include "android/jni/com/mapswithme/core/ScopedLocalRef.hpp" #include "platform/http_client.hpp" diff --git a/android/jni/com/mapswithme/util/LoggerFactory.cpp b/android/jni/com/mapswithme/util/LoggerFactory.cpp index 2bd0dd168e..04726949e6 100644 --- a/android/jni/com/mapswithme/util/LoggerFactory.cpp +++ b/android/jni/com/mapswithme/util/LoggerFactory.cpp @@ -1,5 +1,5 @@ #include -#include "com/mapswithme/core/logging.hpp" +#include "android/jni/com/mapswithme/core/logging.hpp" extern "C" { JNIEXPORT void JNICALL diff --git a/android/jni/com/mapswithme/util/NetworkPolicy.cpp b/android/jni/com/mapswithme/util/NetworkPolicy.cpp index de8588cbd9..d73d2add80 100644 --- a/android/jni/com/mapswithme/util/NetworkPolicy.cpp +++ b/android/jni/com/mapswithme/util/NetworkPolicy.cpp @@ -1,4 +1,4 @@ -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" namespace network_policy { diff --git a/android/jni/com/mapswithme/util/StringUtils.cpp b/android/jni/com/mapswithme/util/StringUtils.cpp index c743e44f5c..ade44e9a49 100644 --- a/android/jni/com/mapswithme/util/StringUtils.cpp +++ b/android/jni/com/mapswithme/util/StringUtils.cpp @@ -1,4 +1,4 @@ -#include "com/mapswithme/core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "indexer/search_string_utils.hpp" diff --git a/android/jni/com/mapswithme/util/statistics/PushwooshHelper.cpp b/android/jni/com/mapswithme/util/statistics/PushwooshHelper.cpp index f59efab62a..6bd6c3638f 100644 --- a/android/jni/com/mapswithme/util/statistics/PushwooshHelper.cpp +++ b/android/jni/com/mapswithme/util/statistics/PushwooshHelper.cpp @@ -1,4 +1,4 @@ -#include "../../core/jni_helper.hpp" +#include "android/jni/com/mapswithme/core/jni_helper.hpp" #include "platform/platform.hpp" diff --git a/map/CMakeLists.txt b/map/CMakeLists.txt index 2c885f95b4..daf2694d2c 100644 --- a/map/CMakeLists.txt +++ b/map/CMakeLists.txt @@ -7,7 +7,7 @@ include_directories( ${OMIM_ROOT}/3party/glm ) -append(CMAKE_CXX_FLAGS "-std=c++11") +set (CMAKE_CXX_STANDARD 11) set( SRC