vcpkg/ports/libssh/0002-mingw_for_Android.patch
Liu Chenxin 210240b399
[libssh] add static build support for MinGW subsystem (#19854)
* add MinGW subsystem support for nana

* update port version

* [nana] update versions

* format-manifest

* add static build support for MingW subsystem

Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
Co-authored-by: Jonliu1993 <13720414433@163.com>
2021-09-03 22:36:23 -07:00

17 lines
582 B
Diff

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ccf5a33..8e88494 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -361,9 +361,9 @@ if (WITH_VISIBILITY_HIDDEN)
set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-fvisibility=hidden")
endif (WITH_VISIBILITY_HIDDEN)
-if (MINGW)
+if (MINGW AND NOT ANDROID)
set_target_properties(ssh PROPERTIES LINK_FLAGS "-Wl,--enable-stdcall-fixup")
- set_target_properties(ssh PROPERTIES COMPILE_FLAGS "-D_POSIX_SOURCE")
+ set_property(TARGET ssh APPEND PROPERTY COMPILE_FLAGS "-D_POSIX_SOURCE")
endif ()