From 7ca99fa0568169abf0390f6717fa534549454c7f Mon Sep 17 00:00:00 2001 From: Timofey Date: Thu, 29 Sep 2016 15:47:03 +0300 Subject: [PATCH] Making stats compile --- CMakeLists.txt | 1 + stats/CMakeLists.txt | 55 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 stats/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a0a5567d01..ee88936449 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,4 +130,5 @@ add_subdirectory(coding) add_subdirectory(geometry) add_subdirectory(platform) add_subdirectory(3party/opening_hours) +add_subdirectory(stats) #add_subdirectory(storage) diff --git a/stats/CMakeLists.txt b/stats/CMakeLists.txt new file mode 100644 index 0000000000..cbfb9b87f7 --- /dev/null +++ b/stats/CMakeLists.txt @@ -0,0 +1,55 @@ +include_directories(${OMIM_DIR} ${OMIM_DIR}/3party/Alohalytics/src) + +set( + SRC + ${OMIM_DIR}/3party/Alohalytics/src/cpp/alohalytics.cc + ${OMIM_DIR}/3party/Alohalytics/src/alohalytics.h + ${OMIM_DIR}/3party/Alohalytics/src/event_base.h + ${OMIM_DIR}/3party/Alohalytics/src/file_manager.h + ${OMIM_DIR}/3party/Alohalytics/src/http_client.h + ${OMIM_DIR}/3party/Alohalytics/src/logger.h +) + +if (${PL_WIN}) + set( + SRC + ${SRC} + ${OMIM_DIR}/3party/Alohalytics/src/windows/file_manager_windows_impl.cc + ) +else() + set( + SRC + ${SRC} + ${OMIM_DIR}/3party/Alohalytics/src/posix/file_manager_posix_impl.cc + ) +endif() + + +if (${PL_IPHONE} OR ${PL_MAC}) + set( + SRC + ${SRC} + ${OMIM_DIR}/3party/Alohalytics/src/alohalytics_objc.h + ${OMIM_DIR}/3party/Alohalytics/src/apple/http_client_apple.mm + ${OMIM_DIR}/3party/Alohalytics/src/apple/alohalytics_objc.mm + ) +elseif(${PL_LINUX} OR ${PL_WIN}) + set( + SRC + ${SRC} + ${OMIM_DIR}/3party/Alohalytics/src/posix/http_client_curl.cc + ) +elseif(${PL_ANDROID}) + set( + SRC + ${SRC} + ${OMIM_DIR}/3party/Alohalytics/src/android/jni/jni_alohalytics.cc + ) + +endif() + +add_library(stats_client ${SRC}) + +if (${PL_IPHONE} OR ${PL_MAC}) + target_compile_options(stats_client PUBLIC "-fobjc-arc") +endif()