Commit 3da61b25 authored by Davis King's avatar Davis King

Added install_target_output_folder option to matlab cmake scripts.

parent 1d8445cb
......@@ -7,6 +7,11 @@ include(cmake_mex_wrapper)
add_subdirectory(.. dlib_build)
# You can tell cmake where to put the mex files when you run 'make install' by
# setting this variable. The path is relative to this CMakeLists.txt file.
set(install_target_output_folder .)
# Compile the example_mex_function.cpp file and link it to dlib. Note
# that you can give a list of things to link to here. E.g.
# add_mex_function(some_other_mex_function pthread dlib fftw)
......
......@@ -93,7 +93,11 @@ MACRO(add_mex_function name )
endif()
set_target_properties(${name} PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(${name} ${MATLAB_LIBRARIES} ${ARGN})
install(TARGETS ${name} DESTINATION "${install_dir}")
if (install_target_output_folder)
install(TARGETS ${name} DESTINATION "${install_target_output_folder}")
else()
install(TARGETS ${name} DESTINATION "${install_dir}")
endif()
ENDMACRO()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment