Added Windows-specific configuration lookup for linker paths

This commit is contained in:
hbristow 2013-08-05 14:49:12 +10:00
parent dfda79e673
commit ecb506842b
3 changed files with 4 additions and 9 deletions

View File

@ -56,7 +56,7 @@ set(HDR_PARSER_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../python/src2)
# set mex compiler options
prepend("-I" MEX_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
prepend("-L" MEX_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
prepend("-L" MEX_LIB_DIR ${LIBRARY_OUTPUT_PATH}/$(Configuration))
prepend("-l" MEX_LIBS opencv_core)
set(MEX_OPTS -largeArrayDims)

View File

@ -3,6 +3,7 @@ macro(listify OUT_LIST IN_STRING)
endmacro()
listify(MEX_INCLUDE_DIRS_LIST ${MEX_INCLUDE_DIRS})
listify(MEX_LIBS_LIST ${MEX_LIBS})
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_BINARY_DIR}/src/*.cpp")
foreach(SOURCE_FILE ${SOURCE_FILES})
# strip out the filename
@ -11,7 +12,7 @@ foreach(SOURCE_FILE ${SOURCE_FILES})
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/+cv/${FILENAME}.${MATLAB_MEXEXT})
execute_process(
COMMAND ${MATLAB_MEX_SCRIPT} ${MEX_OPTS} "CXXFLAGS=\$CXXFLAGS ${MEX_CXXFLAGS}" ${MEX_INCLUDE_DIRS_LIST}
${MEX_LIB_DIR} ${MEX_LIBS} ${SOURCE_FILE}
${MEX_LIB_DIR} ${MEX_LIBS_LIST} ${SOURCE_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+cv
OUTPUT_QUIET
ERROR_VARIABLE FAILED

View File

@ -144,19 +144,13 @@ namespace Matlab {
static const mxClassID ScalarType = mxDOUBLE_CLASS;
static std::string ToString() { return "double"; }
};
// size_t
template<> class Traits<size_t> {
public:
static const mxClassID ScalarType = (sizeof(size_t) == 4) ? mxUINT32_CLASS : mxUINT64_CLASS;
static std::string ToString() { return "size_t"; }
};
// char
template<> class Traits<char> {
public:
static const mxClassID ScalarType = mxCHAR_CLASS;
static std::string ToString() { return "char"; }
};
// char
// inherited type
template<> class Traits<Matlab::InheritType> {
public:
static std::string ToString() { return "Inherited type"; }