aboutsummaryrefslogtreecommitdiff
path: root/ports/mosquitto/0004-support-static-build.patch
blob: bd3e44d030b05ab9603fc02d9ffa2c70cbe040e9 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
diff --git a/apps/mosquitto_passwd/CMakeLists.txt b/apps/mosquitto_passwd/CMakeLists.txt
index 13a7d826..31069306 100644
--- a/apps/mosquitto_passwd/CMakeLists.txt
+++ b/apps/mosquitto_passwd/CMakeLists.txt
@@ -13,6 +13,10 @@ if (WITH_TLS)
 		)
 
 
-	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)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 5da221dc..c3e9fce0 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -69,7 +69,7 @@ if (UNIX AND NOT APPLE AND NOT ANDROID)
 endif (UNIX AND NOT APPLE AND NOT ANDROID)
 
 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 9380a046..62ce99e5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -189,7 +189,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)