diff options
-rw-r--r-- | CMakeLists.txt | 13 | ||||
-rw-r--r-- | android/build.gradle | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b3f0946aa..9b0179edb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,8 @@ if (ANDROID_DETECTED AND (${OS} MATCHES "mac")) set(DARWIN TRUE) endif() +message(${OS}) + omim_set_platform_var(PLATFORM_IPHONE "iphone-.*") omim_set_platform_var(PLATFORM_ANDROID "android-.*" ${ANDROID_DETECTED}) omim_set_platform_var(PLATFORM_MAC "macx-.*" ${APPLE}) @@ -119,6 +121,8 @@ endif() # Find installed packages +get_filename_component(OMIM_ROOT . ABSOLUTE) + find_package(Threads) set(Boost_USE_MULTITHREADED ON) @@ -140,10 +144,11 @@ if (NOT Boost_FOUND) set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/libs") endif() 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() +else() + set(Boost_INCLUDE_DIR "${OMIM_ROOT}/3party/boost") + set(Boost_LIBRARY_DIR "${OMIM_ROOT}/3party/boost/libs") + find_package(Boost 1.54) endif() if (PYBINDINGS) @@ -196,8 +201,6 @@ else() include_directories(${DEVELOPER_FRAMEWORKS_DIR}) endif() -get_filename_component(OMIM_ROOT . ABSOLUTE) - include_directories( ${CMAKE_HOME_DIRECTORY} ${Qt5Core_INCLUDE_DIRS} diff --git a/android/build.gradle b/android/build.gradle index cbe1eeedda..4bc9c5d3b4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -137,10 +137,9 @@ android { externalNativeBuild { cmake { abiFilters 'armeabi-v7a', 'x86' - cppFlags '-fexceptions', '-frtti' - cFlags '-ffunction-sections', '-fdata-sections', '-Wno-extern-c-compat' - arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static', - "-DOS=$osName" + cppFlags '-fexceptions', '-frtti', '-m32' + cFlags '-ffunction-sections', '-fdata-sections', '-Wno-extern-c-compat', '-m32' + arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static', "-DOS=$osName" } } |