Improved finding Matlab on Windows machines. Needs testing on computers that have multiple version installed
This commit is contained in:
@@ -99,7 +99,6 @@ if (NOT MEX_WORKS)
|
||||
# attempt to generate a gateway for a function
|
||||
message(STATUS "Trying to generate Matlab code")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/test/trigger.cpp
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/generator/gen_matlab.py ${HDR_PARSER_PATH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test/test_generator.hpp ${CMAKE_BINARY_DIR}/junk
|
||||
|
||||
@@ -9,8 +9,13 @@ class MatlabWrapperGenerator(object):
|
||||
ns = {}
|
||||
for file in input_files:
|
||||
# get the file name
|
||||
name = re.findall('include/opencv2/([^./]+)', file)[0]
|
||||
#name = os.path.splitext(os.path.basename(file))[0]
|
||||
# TODO: Is there a cleaner way to do this?
|
||||
try:
|
||||
name = re.findall('include/opencv2/([^./]+)', file)[0]
|
||||
except:
|
||||
name = os.path.splitext(os.path.basename(file))[0]
|
||||
|
||||
# add the file to the namespace
|
||||
try:
|
||||
ns[name] = ns[name] + parser.parse(file)
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user