Skip to content
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion analytics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ set(ios_SRCS
set(stub_SRCS
src/analytics_stub.cc)

# Source files used by the stub implementation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we delete the stub_SRCS above? And/or, update the comment? Do we want to do stuff here to strip out src/windows for Mac/Linux, or leave it up to the file?

set(desktop_SRCS
src/analytics_desktop.cc
src/windows/analytics_dynamic.c)

if(ANDROID)
set(analytics_platform_SRCS
"${android_SRCS}")
Expand All @@ -86,7 +91,7 @@ elseif(IOS)
"${ios_SRCS}")
else()
set(analytics_platform_SRCS
"${stub_SRCS}")
"${desktop_SRCS}")
endif()

add_library(firebase_analytics STATIC
Expand Down
12 changes: 12 additions & 0 deletions analytics/integration_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ else()
)
elseif(MSVC)
set(ADDITIONAL_LIBS advapi32 ws2_32 crypt32)
set(ANALYTICS_WINDOWS_DLL "${FIREBASE_CPP_SDK_DIR}/analytics/windows/analytics_win.dll")

# For Windows, check if the Analytics DLL exists, and copy it in if so.
if (EXISTS "${ANALYTICS_WINDOWS_DLL}")
add_custom_command(
TARGET ${integration_test_target_name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${ANALYTICS_WINDOWS_DLL}"
$<TARGET_FILE_DIR:${integration_test_target_name}>)
else()
message(WARNING "Couldn't find ${ANALYTICS_WINDOWS_DLL}. Analytics will run in stub mode.")
endif()
else()
set(ADDITIONAL_LIBS pthread)
endif()
Expand Down
Loading
Loading