summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJamie Snape <jamie.snape@kitware.com>2016-09-22 13:05:35 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-23 13:28:18 (GMT)
commitccd1341ac935d6ba479f3dc27b6041bff0c1c970 (patch)
tree848953866192387426a4a07cc571e5a07997838f /Modules
parentaaf4014c28d0d0bf5180dffd5c4a628406a5e7a1 (diff)
downloadCMake-ccd1341ac935d6ba479f3dc27b6041bff0c1c970.zip
CMake-ccd1341ac935d6ba479f3dc27b6041bff0c1c970.tar.gz
CMake-ccd1341ac935d6ba479f3dc27b6041bff0c1c970.tar.bz2
FindMatlab: Add SIMULINK component
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindMatlab.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index c8dd612..548d298 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -19,6 +19,7 @@
# ENG and MAT libraries of Matlab
# * ``MAIN_PROGRAM`` the Matlab binary program.
# * ``MEX_COMPILER`` the MEX compiler.
+# * ``SIMULINK`` the Simulink environment.
#
# .. note::
#
@@ -1464,6 +1465,21 @@ if(_matlab_find_mat GREATER -1)
endif()
unset(_matlab_find_mat)
+# Component Simulink
+list(FIND Matlab_FIND_COMPONENTS SIMULINK _matlab_find_simulink)
+if(_matlab_find_simulink GREATER -1)
+ find_path(
+ Matlab_SIMULINK_INCLUDE_DIR
+ simstruc.h
+ PATHS "${Matlab_ROOT_DIR}/simulink/include"
+ NO_DEFAULT_PATH
+ )
+ if(Matlab_SIMULINK_INCLUDE_DIR)
+ set(Matlab_SIMULINK_FOUND TRUE)
+ list(APPEND Matlab_INCLUDE_DIRS "${Matlab_SIMULINK_INCLUDE_DIR}")
+ endif()
+endif()
+unset(_matlab_find_simulink)
unset(_matlab_lib_dir_for_search)