The CMakeLists.txt:
cmake_minimum_required(VERSION 3.1)
project(mat2lmdb_cpp)
include_directories(/Applications/MATLAB_R2015a.app/extern/include)
link_directories(/Applications/MATLAB_R2015a.app/bin/maci64)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lmx -lmat")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
set(SOURCE_FILES convert_mat.cpp)
add_executable(mat2lmdb_cpp ${SOURCE_FILES})
Before you run, add the following:
export MATLAB="/Applications/MATLAB_R2015a.app"
export DYLD_LIBRARY_PATH=$MATLAB/bin/maci64/:DYLD_LIBRARY_PATH
No comments:
Post a Comment