Fix #29469: Latest motion tracking not working.
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 1 Dec 2011 10:25:16 +0000 (10:25 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 1 Dec 2011 10:25:16 +0000 (10:25 +0000)
It was error in CMakeLists.txt caused by automatic bundling script which
expanded variables instead of substituting them as-is.

Fixed both of bundling script and CMakeLists.txt

extern/libmv/CMakeLists.txt
extern/libmv/bundle.sh

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)
index 690f78df387ac098e106d53f0784121d5a17546d..fb336c66d610b4db49e5711fb57ab6387564c2ed 100755 (executable)
@@ -183,9 +183,9 @@ IF(WIN32)
 
        IF(MSVC)
                set(MSVC_OFLAGS O1 O2 Ox)
-               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}")
+               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(MSVC)
 ELSE(WIN32)