diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbf4e46d239054e862b2ee27c50ca538140f76e0..dee65667342f0fcead36990e575eba4e9014eab7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,7 +49,7 @@ endif()
 
 if(WIN32)
     add_definitions(-DCLI_PATH="cellframe-node-cli.exe")
-    add_executable(${PROJECT_NAME}
+    add_executable(${PROJECT_NAME} WIN32
         ./CellframeNodeDiagtool/DiagnosticWorker.cpp
         ./CellframeNodeDiagtool/AbstractDiagnostic.cpp
         ./CellframeNodeDiagtool/registry.c