summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-10 16:36:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-03-10 16:36:28 (GMT)
commit845c8c72deefe76f768eb71cb3fe1fcca2ed18f8 (patch)
tree2d64ca7de354e6450e4b460ffe2c2edd24eb2e7c
parent791338359f7a78032209a255d16a613360f5430a (diff)
parent5ba1f4b6ee4a926216877efd1576f618dda8c05d (diff)
downloadCMake-845c8c72deefe76f768eb71cb3fe1fcca2ed18f8.zip
CMake-845c8c72deefe76f768eb71cb3fe1fcca2ed18f8.tar.gz
CMake-845c8c72deefe76f768eb71cb3fe1fcca2ed18f8.tar.bz2
Merge topic 'FindMatlab-MCR-vars' into release-3.20
5ba1f4b6ee FindMatlab: Fix Matlab_LIBRARIES for MCR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5896
-rw-r--r--Modules/FindMatlab.cmake11
1 files changed, 9 insertions, 2 deletions
diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake
index ec163e8..efe871b 100644
--- a/Modules/FindMatlab.cmake
+++ b/Modules/FindMatlab.cmake
@@ -1854,8 +1854,15 @@ endif()
set(Matlab_LIBRARIES
${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY}
- ${Matlab_ENG_LIBRARY} ${Matlab_MAT_LIBRARY}
- ${Matlab_DATAARRAY_LIBRARY} ${Matlab_ENGINE_LIBRARY})
+ ${Matlab_ENG_LIBRARY} ${Matlab_MAT_LIBRARY})
+
+if(Matlab_ENGINE_LIBRARY)
+ list(APPEND Matlab_LIBRARIES ${Matlab_ENGINE_LIBRARY})
+endif()
+
+if(Matlab_DATAARRAY_LIBRARY)
+ list(APPEND Matlab_LIBRARIES ${Matlab_DATAARRAY_LIBRARY})
+endif()
find_package_handle_standard_args(
Matlab