Skip to content

Commit 8939cec

Browse files
committed
Check installation of target support package instead of using try-catch.
1 parent 5b917b5 commit 8939cec

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

toolbox/+vcpkg/getTargetTriplet.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
triplet = '';
66

77
if isMATLABReleaseOlderThan('R2026a') && ~isMATLABReleaseOlderThan('R2020b')
8-
try
9-
slrealtime.qnxSetupFcn;
8+
spkgInfo = matlabshared.supportpkg.getInstalled;
9+
if any(contains({spkgInfo.Name}, 'Simulink Real-Time Target Support Package'))
1010
triplet = 'x64-qnx-static';
11-
catch
12-
% SLRT is not installed. Don't build for any target
1311
end
1412
elseif isMATLABReleaseOlderThan('R2020b')
1513
triplet = 'x86-windows-static';

0 commit comments

Comments
 (0)