Skip to content

Commit 4fcf299

Browse files
committed
Copy Analytics DLL from SDK directory.
1 parent 3916cb5 commit 4fcf299

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

analytics/integration_test/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,18 @@ else()
211211
)
212212
elseif(MSVC)
213213
set(ADDITIONAL_LIBS advapi32 ws2_32 crypt32)
214+
set(ANALYTICS_WINDOWS_DLL "${FIREBASE_CPP_SDK_DIR}/analytics/windows/analytics_win.dll")
215+
216+
# For Windows, check if the Analytics DLL exists, and copy it in if so.
217+
if (EXISTS "${ANALYTICS_WINDOWS_DLL}")
218+
add_custom_command(
219+
TARGET ${integration_test_target_name} POST_BUILD
220+
COMMAND ${CMAKE_COMMAND} -E copy
221+
"${ANALYTICS_WINDOWS_DLL}"
222+
$<TARGET_FILE_DIR:${integration_test_target_name}>)
223+
else()
224+
message(WARNING "Couldn't find ${ANALYTICS_WINDOWS_DLL}. Analytics will run in stub mode.")
225+
endif()
214226
else()
215227
set(ADDITIONAL_LIBS pthread)
216228
endif()

0 commit comments

Comments
 (0)