From a659562c369920d856d67af1f91f84041163ea32 Mon Sep 17 00:00:00 2001 From: hbristow Date: Thu, 8 Aug 2013 05:26:56 +1000 Subject: [PATCH] Changed command-line separator from module:file to module=file so that it works cross-platform --- modules/matlab/CMakeLists.txt | 6 +++--- modules/matlab/generator/gen_matlab.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/matlab/CMakeLists.txt b/modules/matlab/CMakeLists.txt index ce42c2fbc1..261dcf259e 100644 --- a/modules/matlab/CMakeLists.txt +++ b/modules/matlab/CMakeLists.txt @@ -76,7 +76,7 @@ ocv_add_module(matlab BINDINGS # get the commit information execute_process(COMMAND git log -1 --pretty=%H OUTPUT_VARIABLE GIT_COMMIT ERROR_QUIET) -string(REGEX REPLACE "(\r?\n)+$" "" GIT_COMMIT ${GIT_COMMIT}) +string(REGEX REPLACE "(\r?\n)+$" "" GIT_COMMIT "${GIT_COMMIT}") # set the path to the C++ header and doc parser set(HDR_PARSER_PATH ${CMAKE_SOURCE_DIR}/modules/python/src2) @@ -109,7 +109,7 @@ foreach(opencv_module ${MATLAB_DEPS}) endforeach() # add extra headers by hand -list(APPEND opencv_extra_hdrs "core:${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/base.hpp") +list(APPEND opencv_extra_hdrs "core=${OPENCV_MODULE_opencv_core_LOCATION}/include/opencv2/core/base.hpp") # pass the OPENCV_CXX_EXTRA_FLAGS through to the mex compiler # remove the visibility modifiers, so the mex gateway is visible @@ -131,7 +131,7 @@ if (NOT MEX_WORKS) ${CMAKE_CURRENT_SOURCE_DIR}/generator/gen_matlab.py --hdrparser ${HDR_PARSER_PATH} --rstparser ${RST_PARSER_PATH} - --extra "test:${CMAKE_CURRENT_SOURCE_DIR}/test/test_generator.hpp" + --extra "test=${CMAKE_CURRENT_SOURCE_DIR}/test/test_generator.hpp" --outdir ${CMAKE_BINARY_DIR}/junk ERROR_VARIABLE GEN_ERROR OUTPUT_QUIET diff --git a/modules/matlab/generator/gen_matlab.py b/modules/matlab/generator/gen_matlab.py index 1e41c306cf..86c5ff6d9f 100644 --- a/modules/matlab/generator/gen_matlab.py +++ b/modules/matlab/generator/gen_matlab.py @@ -27,8 +27,8 @@ class MatlabWrapperGenerator(object): rst.definitions = {} for extra in extras: - module = extra.split(":")[0] - header = extra.split(":")[1] + module = extra.split("=")[0] + header = extra.split("=")[1] ns[module] = ns[module] + parser.parse(header) if module in ns else parser.parse(header) # cleanify the parser output