aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/unicorn/fix-msvc-shared.patch
blob: b018db2cd021446af90fe60f996980d292b929ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa94074..3471cc4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1447,9 +1447,8 @@ if (UNICORN_LEGACY_STATIC_ARCHIVE)
     if (BUILD_SHARED_LIBS)
         if (MSVC)
             # Avoid the import lib built by MVSC clash with our archive.
-            set_target_properties(unicorn PROPERTIES ARCHIVE_OUTPUT_NAME "unicorn-import")
+            set_target_properties(unicorn PROPERTIES ARCHIVE_OUTPUT_NAME "unicorn")
         endif()
-        bundle_static_library(unicorn_static unicorn_archive unicorn)
     else()
         # Rename the "static" lib to avoid filename clash.
         set_target_properties(unicorn PROPERTIES OUTPUT_NAME "unicorn-static")
@@ -1517,7 +1517,7 @@ if(UNICORN_INSTALL)
             LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
         )
     endif()
-    if (UNICORN_LEGACY_STATIC_ARCHIVE)
+    if (NOT(BUILD_SHARED_LIBS))
         install(FILES $<TARGET_FILE:unicorn_archive> DESTINATION ${CMAKE_INSTALL_LIBDIR})
         install(FILES $<TARGET_FILE_DIR:unicorn_archive>/$<TARGET_PROPERTY:unicorn_archive,SYMLINK_NAME> DESTINATION ${CMAKE_INSTALL_LIBDIR})
     endif()