diff options
| author | NancyLi1013 <lirui09@beyondsoft.com> | 2020-03-31 19:39:03 -0700 |
|---|---|---|
| committer | NancyLi1013 <lirui09@beyondsoft.com> | 2020-03-31 19:40:20 -0700 |
| commit | fed53f577120b98949dc1cf61b4a0cee9ac1eb16 (patch) | |
| tree | 94a82808c3d202acdedfa12bb6fdd9cdaf261da9 /ports/mosquitto/support-static-build.patch | |
| parent | b79f7675aaa82eb6c5a96ae764fb1ce379a9d5d6 (diff) | |
| download | vcpkg-fed53f577120b98949dc1cf61b4a0cee9ac1eb16.tar.gz vcpkg-fed53f577120b98949dc1cf61b4a0cee9ac1eb16.zip | |
[mosquitto] Add support for static build
Diffstat (limited to 'ports/mosquitto/support-static-build.patch')
| -rw-r--r-- | ports/mosquitto/support-static-build.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ports/mosquitto/support-static-build.patch b/ports/mosquitto/support-static-build.patch new file mode 100644 index 000000000..28d7d779a --- /dev/null +++ b/ports/mosquitto/support-static-build.patch @@ -0,0 +1,38 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
+index bd60b75..cc01a2a 100644
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -60,7 +60,7 @@ if (UNIX AND NOT APPLE)
+ endif (UNIX AND NOT APPLE)
+
+ if (WIN32)
+- set (LIBRARIES ${LIBRARIES} ws2_32)
++ set (LIBRARIES ${LIBRARIES} ws2_32 crypt32)
+ endif (WIN32)
+
+ if (WITH_SRV)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 7898ff5..23b3fe8 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -158,7 +158,7 @@ if (UNIX)
+ endif (UNIX)
+
+ if (WIN32)
+- set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32)
++ set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32 crypt32)
+ endif (WIN32)
+
+ if (WITH_WEBSOCKETS)
+@@ -189,6 +189,10 @@ install(FILES mosquitto_broker.h mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL
+
+ if (WITH_TLS)
+ add_executable(mosquitto_passwd mosquitto_passwd.c)
+- target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES})
++ if(WIN32)
++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES} ws2_32 crypt32)
++ else()
++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES})
++ endif()
+ install(TARGETS mosquitto_passwd RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ endif (WITH_TLS)
|
