]> granicus.if.org Git - libevent/commitdiff
cmake: fix building dns-example under win32 (missing getopt)
authorAzat Khuzhin <a3at.mail@gmail.com>
Mon, 11 Jan 2016 22:57:07 +0000 (01:57 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Thu, 14 Jan 2016 08:58:39 +0000 (11:58 +0300)
CMakeLists.txt

index 4acb99612f69952dcb3dc2f0253e6a42f3ab2461..708f8a1bfab6735796400427e0a9c03bd91e08df 100644 (file)
@@ -889,6 +889,12 @@ if (NOT EVENT__DISABLE_SAMPLES)
 
         add_dependencies(${SAMPLE} event_extra)
     endforeach()
+
+    if (WIN32)
+        target_sources(dns-example PUBLIC
+                       WIN32-Code/getopt.c
+                       WIN32-Code/getopt_long.c)
+    endif()
 endif()
 
 if (NOT EVENT__DISABLE_BENCHMARK)