Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
573fce15
Commit
573fce15
authored
Feb 01, 2016
by
Davis King
Browse files
Improved building of mex files with cmake.
parent
37c1055a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
dlib/cmake_find_blas.txt
dlib/cmake_find_blas.txt
+5
-1
dlib/matlab/cmake_mex_wrapper
dlib/matlab/cmake_mex_wrapper
+8
-0
No files found.
dlib/cmake_find_blas.txt
View file @
573fce15
...
@@ -107,7 +107,11 @@ if (UNIX)
...
@@ -107,7 +107,11 @@ if (UNIX)
INCLUDE (CheckFunctionExists)
INCLUDE (CheckFunctionExists)
if (NOT blas_found)
if (NOT blas_found)
find_library(cblas_lib openblas PATHS ${extra_paths})
if (BUILDING_MATLAB_MEX_FILE)
find_library(cblas_lib libopenblas.a PATHS ${extra_paths})
else()
find_library(cblas_lib openblas PATHS ${extra_paths})
endif()
if (cblas_lib)
if (cblas_lib)
set(blas_libraries ${cblas_lib})
set(blas_libraries ${cblas_lib})
set(blas_found 1)
set(blas_found 1)
...
...
dlib/matlab/cmake_mex_wrapper
View file @
573fce15
...
@@ -67,6 +67,14 @@ INCLUDE(InstallRequiredSystemLibraries)
...
@@ -67,6 +67,14 @@ INCLUDE(InstallRequiredSystemLibraries)
MACRO(add_mex_function name )
MACRO(add_mex_function name )
ADD_LIBRARY(${name} MODULE ${name}.cpp )
ADD_LIBRARY(${name} MODULE ${name}.cpp )
if (UNIX)
if (DEFINED ENV{MATLAB_HOME})
set_target_properties(${name} PROPERTIES LINK_FLAGS "-Wl,--version-script,$ENV{MATLAB_HOME}/extern/lib/glnxa64/mexFunction.map")
else()
set_target_properties(${name} PROPERTIES LINK_FLAGS "-Wl,--version-script,${MATLAB_HOME}/extern/lib/glnxa64/mexFunction.map")
endif()
endif()
# Change the output file extension to a mex extension.
# Change the output file extension to a mex extension.
if (WIN32)
if (WIN32)
set_target_properties(${name} PROPERTIES SUFFIX ".mexw64")
set_target_properties(${name} PROPERTIES SUFFIX ".mexw64")
...
...
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