Fix #29469: Latest motion tracking not working.
[blender.git] / extern / libmv / CMakeLists.txt
index 6f0d5f3d126cd67b02922cc3beb39fc02a571918..0349ad7200033b8f17047b74ebd6d090a25acf4f 100644 (file)
@@ -175,9 +175,9 @@ if(WIN32)
 
        if(MSVC)
                set(MSVC_OFLAGS O1 O2 Ox)
-               foreach(FLAG )
-                       string(REPLACE "" "Od" CMAKE_CXX_FLAGS_RELEASE "")
-                       string(REPLACE "" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "")
+               foreach(FLAG ${MSVC_OFLAGS})
+                       string(REPLACE "${FLAG}" "Od" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+                       string(REPLACE "${FLAG}" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
                endforeach()
        endif()
 else(WIN32)