blob: 55606e7d5de29e59f4ea26a750a750f1a98a8a76 (
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
43
44
45
46
47
48
49
50
51
|
From 4bb19e77e95bc505d32e098190ffbf056810017c Mon Sep 17 00:00:00 2001
From: Nicole Mazzuca <mazzucan@outlook.com>
Date: Tue, 22 Sep 2020 15:44:42 -0700
Subject: [PATCH 4/5] support static build
---
lib/CMakeLists.txt | 2 +-
src/CMakeLists.txt | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
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..f066aea 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)
--
2.24.3 (Apple Git-128)
|