aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/unicorn/fix-msvc-shared.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/unicorn/fix-msvc-shared.patch')
-rw-r--r--vcpkg/ports/unicorn/fix-msvc-shared.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/vcpkg/ports/unicorn/fix-msvc-shared.patch b/vcpkg/ports/unicorn/fix-msvc-shared.patch
new file mode 100644
index 0000000..b018db2
--- /dev/null
+++ b/vcpkg/ports/unicorn/fix-msvc-shared.patch
@@ -0,0 +1,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()