From bc056727af1df41ffd24d1609eb0722595d17c51 Mon Sep 17 00:00:00 2001 From: lazymio Date: Mon, 2 May 2022 17:51:03 +0200 Subject: [PATCH] Fix MSVC build --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2835bd8..42f7fe80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1360,7 +1360,12 @@ endif() # Black magic for generating static archives... if (BUILD_SHARED_LIBS) - bundle_static_library(unicorn_static unicorn_archive unicorn) + if (MSVC) + # Avoid the import lib built by MVSC clash with our archive. + set_target_properties(unicorn PROPERTIES OUTPUT_NAME "unicorn-import") + endif() + bundle_static_library(unicorn_static unicorn_archive unicorn) + endif() else() # Rename the "static" lib to avoid filename clash. set_target_properties(unicorn PROPERTIES OUTPUT_NAME "unicorn-static")