]> granicus.if.org Git - fortune-mod/commitdiff
win32 porting
authorShlomi Fish <shlomif@shlomifish.org>
Sat, 8 Jun 2019 17:35:31 +0000 (20:35 +0300)
committerShlomi Fish <shlomif@shlomifish.org>
Sat, 8 Jun 2019 17:35:31 +0000 (20:35 +0300)
fortune-mod/CMakeLists.txt

index 680615eaf914abe4c28987c62ab726cbaeeff8c7..c9e83a0c9cdf6123a086eb38f9e9ec910e5f0071 100644 (file)
@@ -111,6 +111,10 @@ MACRO(my_exe exe c_file dir)
         list(APPEND _files "util/getopt.c")
     endif()
     ADD_EXECUTABLE("${exe}" "${c_file}")
+    if (WIN32)
+        # See https://stackoverflow.com/questions/15119639/how-to-link-winsock-in-cmake
+        TARGET_LINK_LIBRARIES("${exe}" wsock32 ws2_32)
+    endif()
     INSTALL(TARGETS "${exe}" RUNTIME DESTINATION "${dir}")
 ENDMACRO()