Kreijstal commited on
Commit
334a75d
·
unverified ·
1 Parent(s): b3cea90

cmake : Fix bug in httplib.h for mingw (#1615)

Browse files

Fix bug in httlib.h for mingw, please see https://github.com/yhirose/cpp-httplib/issues/1669

Files changed (1) hide show
  1. examples/server/CMakeLists.txt +6 -0
examples/server/CMakeLists.txt CHANGED
@@ -4,3 +4,9 @@ add_executable(${TARGET} server.cpp httplib.h json.hpp)
4
  include(DefaultTargetOptions)
5
 
6
  target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})
 
 
 
 
 
 
 
4
  include(DefaultTargetOptions)
5
 
6
  target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})
7
+
8
+ # Check if the compiler is MinGW
9
+ if(MINGW)
10
+ # Link the necessary libraries for SSL and Winsock
11
+ target_link_libraries(${TARGET} PRIVATE -lcrypt32 -lssl -lcrypto -lws2_32)
12
+ endif()