From ccd1341ac935d6ba479f3dc27b6041bff0c1c970 Mon Sep 17 00:00:00 2001 From: Jamie Snape Date: Thu, 22 Sep 2016 09:05:35 -0400 Subject: FindMatlab: Add SIMULINK component --- Modules/FindMatlab.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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) -- cgit v0.12