From 79fd550de524fcf7259ec69d4a39f3b9757ff7bb Mon Sep 17 00:00:00 2001 From: Patrick Urbanke Date: Fri, 26 Jan 2024 06:14:59 +0100 Subject: [PATCH] Linking for MSVC --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49aebe0c..90d8179e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,11 @@ if (REFLECTCPP_BSON) endif () if (REFLECTCPP_CBOR) - target_link_libraries(reflectcpp PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libtinycbor${CMAKE_STATIC_LIBRARY_SUFFIX}") + if (MSVC) + target_link_libraries(reflectcpp PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/tinycbor${CMAKE_STATIC_LIBRARY_SUFFIX}") + else + target_link_libraries(reflectcpp PRIVATE "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libtinycbor${CMAKE_STATIC_LIBRARY_SUFFIX}") + endif endif () if (REFLECTCPP_FLEXBUFFERS)