Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
316099a9
Commit
316099a9
authored
Jan 22, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the search for the installed matlab a little more robust.
parent
e0995a67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
cmake_mex_wrapper
dlib/matlab/cmake_mex_wrapper
+17
-5
No files found.
dlib/matlab/cmake_mex_wrapper
View file @
316099a9
...
...
@@ -20,6 +20,14 @@ set(MATLAB_LIB_FOLDERS
"${MATLAB_HOME}/extern/lib/win64/microsoft"
"${MATLAB_HOME}/bin/glnxa64"
)
# If there is a MATLAB_HOME environment variable then look there as well.
if (DEFINED ENV{MATLAB_HOME})
set(MATLAB_LIB_FOLDERS
"$ENV{MATLAB_HOME}/extern/lib/win64/microsoft"
"$ENV{MATLAB_HOME}/bin/glnxa64"
${MATLAB_LIB_FOLDERS}
)
endif()
# Find the MATLAB libraries that need to get linked into the mex file
if (WIN32)
find_library(MATLAB_MEX_LIBRARY libmex PATHS ${MATLAB_LIB_FOLDERS} )
...
...
@@ -31,14 +39,18 @@ else()
find_library(MATLAB_ENG_LIBRARY eng PATHS ${MATLAB_LIB_FOLDERS} )
endif()
set(MATLAB_LIBRARIES ${MATLAB_MEX_LIBRARY} ${MATLAB_MX_LIBRARY} ${MATLAB_ENG_LIBRARY})
INCLUDE_DIRECTORIES("${MATLAB_HOME}/extern/include")
# Figure out the path to MATLAB's mex.h so we can add it to the include search path.
find_path(mex_header_path mex.h
PATHS "$ENV{MATLAB_HOME}/extern/include"
"${MATLAB_HOME}/extern/include"
)
INCLUDE_DIRECTORIES(${mex_header_path})
# Determine the path to cmake_mex_wrapper file so we can add it to the include search path..
string(REGEX REPLACE "cmake_mex_wrapper$" "" dlib_matlab_binding_path ${CMAKE_CURRENT_LIST_FILE})
INCLUDE_DIRECTORIES("${dlib_matlab_binding_path}")
# Determine the path to dlib so we can add it to the include search path.
string(REGEX REPLACE "cmake_mex_wrapper$" "" dlib_path ${CMAKE_CURRENT_LIST_FILE})
INCLUDE_DIRECTORIES(${dlib_path}/../..)
# Also add dlib to the include search path
INCLUDE_DIRECTORIES(${dlib_matlab_binding_path}/../..)
ADD_DEFINITIONS(-DMATLAB_MEX_FILE)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment