diff --git a/apps/hello-cpp/CMakeLists.txt b/apps/hello-cpp/CMakeLists.txt index 5e1664dad..0b96fae34 100644 --- a/apps/hello-cpp/CMakeLists.txt +++ b/apps/hello-cpp/CMakeLists.txt @@ -12,4 +12,4 @@ set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) add_executable(hello-cpp main.cpp) -target_link_libraries(hello-cpp PRIVATE launchdarkly::client launchdarkly::sse launchdarkly::common Threads::Threads) +target_link_libraries(hello-cpp PRIVATE launchdarkly::client Threads::Threads) diff --git a/apps/hello-cpp/main.cpp b/apps/hello-cpp/main.cpp index b1ba30043..3e7cfa32d 100644 --- a/apps/hello-cpp/main.cpp +++ b/apps/hello-cpp/main.cpp @@ -126,27 +126,6 @@ int main() { std::cout << "Reason was: " << *reason << std::endl; } - // Identify a series of contexts. - for (auto context_index = 0; context_index < 4; context_index++) { - std::cout << "Identifying user: " - << "ryan" << context_index << std::endl; - auto future = client.IdentifyAsync( - ContextBuilder() - .kind("user", "ryan" + std::to_string(context_index)) - .build()); - auto before_ident = - client.BoolVariationDetail("my-boolean-flag", false); - future.get(); - auto after_ident = client.BoolVariationDetail("my-boolean-flag", false); - - std::cout << "For: " - << "ryan" << context_index << ": " - << "Before ident complete: " << *before_init - << " After: " << *after_ident << std::endl; - - sleep(1); - } - // Sit around. std::cout << "Press enter to exit" << std::endl << std::endl; std::cin.get(); diff --git a/libs/client-sdk/src/CMakeLists.txt b/libs/client-sdk/src/CMakeLists.txt index e962671e0..30a940f4b 100644 --- a/libs/client-sdk/src/CMakeLists.txt +++ b/libs/client-sdk/src/CMakeLists.txt @@ -49,6 +49,10 @@ target_link_libraries(${LIBNAME} add_library(launchdarkly::client ALIAS ${LIBNAME}) + +set_property(TARGET ${LIBNAME} PROPERTY + MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + install(TARGETS ${LIBNAME}) # Using PUBLIC_HEADERS would flatten the include. # This will preserve it, but dependencies must do the same. diff --git a/libs/common/src/CMakeLists.txt b/libs/common/src/CMakeLists.txt index 7103bceb2..86568521c 100644 --- a/libs/common/src/CMakeLists.txt +++ b/libs/common/src/CMakeLists.txt @@ -53,6 +53,9 @@ add_library(${LIBNAME} OBJECT add_library(launchdarkly::common ALIAS ${LIBNAME}) +set_property(TARGET ${LIBNAME} PROPERTY + MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + install(TARGETS ${LIBNAME}) # Using PUBLIC_HEADERS would flatten the include. diff --git a/libs/internal/src/CMakeLists.txt b/libs/internal/src/CMakeLists.txt index b9becb148..d8768e0b7 100644 --- a/libs/internal/src/CMakeLists.txt +++ b/libs/internal/src/CMakeLists.txt @@ -36,6 +36,10 @@ add_library(${LIBNAME} OBJECT add_library(launchdarkly::internal ALIAS ${LIBNAME}) + +set_property(TARGET ${LIBNAME} PROPERTY + MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + install(TARGETS ${LIBNAME}) message(STATUS "LaunchDarklyInternalSdk_SOURCE_DIR=${LaunchDarklyInternalSdk_SOURCE_DIR}") diff --git a/libs/server-sent-events/src/CMakeLists.txt b/libs/server-sent-events/src/CMakeLists.txt index cd393830a..28f13452f 100644 --- a/libs/server-sent-events/src/CMakeLists.txt +++ b/libs/server-sent-events/src/CMakeLists.txt @@ -18,6 +18,10 @@ target_link_libraries(${LIBNAME} add_library(launchdarkly::sse ALIAS ${LIBNAME}) + +set_property(TARGET ${LIBNAME} PROPERTY + MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + install(TARGETS ${LIBNAME}) # Need the public headers to build.