Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CMakeLists.txt « platform - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 02a0f7168c3f3460955afc08c4178e4327a2f8cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
project(platform)

include_directories(${OMIM_ROOT}/3party/jansson/src ${OMIM_ROOT}/platform)

set(CMAKE_AUTOMOC ON)

set(
  SRC
  battery_tracker.cpp
  battery_tracker.hpp
  chunks_download_strategy.cpp
  chunks_download_strategy.hpp
  constants.hpp
  country_defines.cpp
  country_defines.hpp
  country_file.cpp
  country_file.hpp
  downloader_defines.hpp
  downloader_utils.cpp
  downloader_utils.hpp
  file_logging.cpp
  file_logging.hpp
  get_text_by_id.cpp
  get_text_by_id.hpp
  gui_thread.hpp
  http_client.cpp
  http_client.hpp
  http_payload.cpp
  http_payload.hpp
  http_request.cpp
  http_request.hpp
  http_thread_callback.hpp
  http_uploader.hpp
  http_uploader_background.hpp
  http_user_agent.cpp
  http_user_agent.hpp
  local_country_file.cpp
  local_country_file.hpp
  local_country_file_utils.cpp
  local_country_file_utils.hpp
  locale.hpp
  localization.cpp
  localization.hpp
  location.hpp
  marketing_service.cpp
  marketing_service.hpp
  measurement_utils.cpp
  measurement_utils.hpp
  mwm_traits.cpp
  mwm_traits.hpp
  mwm_version.cpp
  mwm_version.hpp
  platform.cpp
  platform.hpp
  preferred_languages.cpp
  preferred_languages.hpp
  remote_file.cpp
  remote_file.hpp
  secure_storage.hpp
  servers_list.cpp
  servers_list.hpp
  settings.cpp
  settings.hpp
  socket.hpp
  string_storage_base.cpp
  string_storage_base.hpp
  utils.hpp
)

if(${PLATFORM_IPHONE})
  append(
    SRC
    background_downloader_ios.h
    background_downloader_ios.mm
    gui_thread_apple.mm
    http_thread_apple.h
    http_thread_apple.mm
    http_client_apple.mm
    http_uploader_apple.mm
    http_user_agent_ios.mm
    localization.mm
    locale.mm
    marketing_service_ios.mm
    network_policy_ios.h
    network_policy_ios.mm
    platform_ios.mm
    platform_unix_impl.cpp
    platform_unix_impl.hpp
    secure_storage_ios.mm
    socket_apple.mm
    utils.mm
  )
elseif(${PLATFORM_ANDROID})
  append(
    SRC
    platform_android.cpp
    platform_unix_impl.cpp
    platform_unix_impl.hpp
  )
else() # neither iPhone nor Android
  append(
    SRC
    http_user_agent_dummy.cpp
    localization_dummy.cpp
    location_service.cpp
    location_service.hpp
    marketing_service_dummy.cpp
    network_policy_dummy.cpp
    platform_qt.cpp
    wifi_info.hpp
    wifi_location_service.cpp
  )

  if (${PLATFORM_WIN})
    append(
      SRC
      http_client_curl.cpp
      http_user_agent_dummy.cpp
      http_thread_qt.cpp
      http_thread_qt.hpp
      http_uploader_background_dummy.cpp
      http_uploader_dummy.cpp
      marketing_service_dummy.cpp
      platform_win.cpp
      secure_storage_dummy.cpp
      wifi_info_windows.cpp
    )
  elseif(${PLATFORM_MAC})
    append(
      SRC
      apple_location_service.mm
      gui_thread_apple.mm
      http_client_apple.mm
      http_thread_apple.h
      http_thread_apple.mm
      http_uploader_apple.mm
      http_uploader_background_dummy.cpp
      http_user_agent_dummy.cpp
      locale.mm
      marketing_service_dummy.cpp
      platform_mac.mm
      platform_unix_impl.cpp
      platform_unix_impl.hpp
      secure_storage_qt.cpp
      socket_apple.mm
      http_session_manager.mm
      utils.cpp
    )
  elseif(${PLATFORM_LINUX})
    append(
      SRC
      gui_thread_linux.cpp
      http_client_curl.cpp
      http_thread_qt.cpp
      http_thread_qt.hpp
      http_uploader_dummy.cpp
      http_uploader_background_dummy.cpp
      http_user_agent_dummy.cpp
      locale_linux.cpp
      marketing_service_dummy.cpp
      platform_linux.cpp
      platform_unix_impl.cpp
      platform_unix_impl.hpp
      secure_storage_qt.cpp
      utils.cpp
    )
  endif()
endif()

add_subdirectory(platform_tests_support)

omim_add_library(${PROJECT_NAME} ${SRC})

if (APPLE)
  target_compile_options(${PROJECT_NAME} PUBLIC "-fobjc-arc")
endif()

if (PLATFORM_LINUX)
  link_qt5_network(${PROJECT_NAME})
endif()

omim_add_test_subdirectory(platform_tests)