aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindMsgpack.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindMsgpack.cmake')
-rw-r--r--cmake/FindMsgpack.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/FindMsgpack.cmake b/cmake/FindMsgpack.cmake
index 015737d658..8881a34332 100644
--- a/cmake/FindMsgpack.cmake
+++ b/cmake/FindMsgpack.cmake
@@ -42,7 +42,12 @@ if(MSGPACK_USE_STATIC)
"${CMAKE_STATIC_LIBRARY_PREFIX}msgpack${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()
-list(APPEND MSGPACK_NAMES msgpackc msgpack)
+if(MSVC)
+ # The import library for the msgpack DLL has a different name
+ list(APPEND MSGPACK_NAMES msgpack_import)
+else()
+ list(APPEND MSGPACK_NAMES msgpackc msgpack)
+endif()
find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES}
# Check each directory for all names to avoid using headers/libraries from