diff --git a/GUI/coregui/CMakeLists.txt b/GUI/coregui/CMakeLists.txt
index 707ec0694c420604cbb5dbb940030abad618b9ac..db995c508df03da09a6f4b4eb13afdeed4a44b3c 100644
--- a/GUI/coregui/CMakeLists.txt
+++ b/GUI/coregui/CMakeLists.txt
@@ -77,7 +77,7 @@ if(BORNAGAIN_CRASHHANDLER)
 endif()
 
 if(WIN32)
-    string(APPEND CMAKE_CXX_FLAGS  -DBA_CORE_BUILD_DLL)
+    string(APPEND CMAKE_CXX_FLAGS " -DBA_CORE_BUILD_DLL")
 endif()