diff --git a/Application/CMakeLists.txt b/Application/CMakeLists.txt
index 51b895002b9ee877fcd07a3302cffc76f4642096..d9526fb28d2b7e6aaee90aa79c1ea44da84bf672 100644
--- a/Application/CMakeLists.txt
+++ b/Application/CMakeLists.txt
@@ -755,11 +755,17 @@ if(${TREX_BUILD_OPENCV})
     
     set(OPENCV_PREFIX_PATH ${png_install_dir} ${zlib_install_dir} ${CMAKE_PREFIX_PATH} )
     set(OPENCV_EXTRA_FLAGS_ ${OPENCV_EXTRA_FLAGS} 
-			"-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}"
-            "-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}"
-            "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
-            "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}"
-			"-DCMAKE_CXX_FLAGS=${ORIGINAL_CXX_FLAGS}"
+	"-DCMAKE_CXX_FLAGS_RELEASE=/MT"
+	"-DCMAKE_C_FLAGS_RELEASE=/MT"
+	"-DCMAKE_C_FLAGS_RELWITHDEBINFO=/MT"
+	"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=/MT"
+	"-DCMAKE_C_FLAGS_DEBUG=/MTd"
+	"-DCMAKE_CXX_FLAGS_DEBUG=/MTd"
+			#"-DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}"
+            #"-DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}"
+            #"-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}"
+            #"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}"
+			#"-DCMAKE_CXX_FLAGS=${ORIGINAL_CXX_FLAGS}"
             "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}")
             
     if(APPLE AND CMAKE_COMPILER_IS_GNUCXX)