Prechádzať zdrojové kódy

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

ambrop7 14 rokov pred
rodič
commit
79ad18a36a
1 zmenil súbory, kde vykonal 6 pridanie a 2 odobranie
  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)