Răsfoiți Sursa

CMakeLists.txt: don't try to build NCD on Windows, fix error message

ambrop7 14 ani în urmă
părinte
comite
79ad18a36a
1 a modificat fișierele cu 6 adăugiri și 2 ștergeri
  1. 6 2
      CMakeLists.txt

+ 6 - 2
CMakeLists.txt

@@ -29,10 +29,14 @@ build_switch(CLIENT 1)
 build_switch(FLOODER 1)
 build_switch(TUN2SOCKS 1)
 build_switch(UDPGW 1)
-build_switch(NCD 1)
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    build_switch(NCD 1)
+else ()
+    build_switch(NCD 0)
+endif ()
 
 if (BUILD_NCD AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Linux"))
-    message(FATAL_ERROR, "NCD is only available on Linux")
+    message(FATAL_ERROR "NCD is only available on Linux")
 endif ()
 
 if (BUILD_CLIENT OR BUILD_SERVER OR BUILD_NCD)