CMake fabulous fix #3

This commit is contained in:
Грешилов Вячеслав 2017-10-27 18:12:34 +03:00 committed by Yuri Gorshenin
parent 9476d8ad17
commit 312c147442
3 changed files with 15 additions and 9 deletions

View file

@ -2,12 +2,8 @@ project(minizip)
add_definitions(-DUSE_FILE32API -DNOCRYPT)
if (ANDROID_DETECTED)
if (DARWIN)
add_definitions(-D__APPLE__)
elseif(UNIX)
add_definitions(-DIOAPI_NO_64)
endif()
if (ANDROID_DETECTED AND X32)
add_definitions(-DIOAPI_NO_64)
endif()
add_clang_compile_options("-Wno-unused-value")

View file

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.2)
project(omim C CXX)
set (CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 11)
# Options
option(BUILD_DESIGNER "Build application as design tool" OFF)
@ -33,12 +33,21 @@ function(omim_set_platform_var PLATFORM_VAR pattern)
endif()
endfunction()
function(omim_set_up_android ABI_VAR OS_VAR)
set(ANDROID_DETECTED TRUE PARENT_SCOPE)
if ("${ABI_VAR}" MATCHES "^(armeabi-v7a|x86)$")
set(X32 TRUE PARENT_SCOPE)
else()
set(X32 FALSE PARENT_SCOPE)
endif()
endfunction()
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(LINUX_DETECTED TRUE)
endif()
if (CMAKE_SYSTEM_NAME MATCHES "Android")
set(ANDROID_DETECTED TRUE)
omim_set_up_android(${ANDROID_ABI} ${OS})
endif()
if (ANDROID_DETECTED AND (${OS} MATCHES "mac"))

View file

@ -1,5 +1,7 @@
project(generator_tests)
find_package(sqlite3)
set(
SRC
altitude_test.cpp
@ -65,7 +67,6 @@ omim_link_libraries(
opening_hours
stb_image
sdf_image
# TODO(syershov): Use FindPackage.
sqlite3
${LIBZ}
)