Skip to content

Commit 8325b1a

Browse files
committed
Clean up target triplet logic and make it mainly dependent on installed SLRT.
1 parent 9840bcd commit 8325b1a

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

toolbox/+vcpkg/getTargetTriplet.m

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22

33
% Copyright 2025 The MathWorks, Inc.
44

5+
% Initialize target triplet
56
triplet = '';
67

7-
if isMATLABReleaseOlderThan('R2026a') && ~isMATLABReleaseOlderThan('R2020b')
8-
spkgInfo = matlabshared.supportpkg.getInstalled;
9-
if ~isempty(spkgInfo) && any(contains({spkgInfo.Name}, 'Simulink Real-Time Target Support Package'))
8+
% Get simple list of installed toolboxes
9+
listToolbox = ver;
10+
listToolbox = {listToolbox.Name}';
11+
12+
% Figure out target triplet based on installed target toolbox
13+
if any(contains(listToolbox,'Simulink Real-Time'))
14+
if isMATLABReleaseOlderThan('R2026a') && ~isMATLABReleaseOlderThan('R2020b')
1015
triplet = 'x64-qnx-static';
11-
end
12-
elseif isMATLABReleaseOlderThan('R2020b')
13-
triplet = 'x86-windows-static';
14-
else
15-
% MATLAB R2026a or later
16-
if exist('speedgoat','file')
16+
elseif isMATLABReleaseOlderThan('R2020b')
17+
triplet = 'x86-windows-static';
18+
else
19+
% MATLAB R2026a or later
1720
triplet = 'x64-speedgoat-linux-static';
1821
end
1922
end

0 commit comments

Comments
 (0)