forked from JSBSim-Team/jsbsim
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate the MATLAB script to compile the S-Function directly from th…
…e folder installed by the Windows installer. See discussion in issue JSBSim-Team#491.
- Loading branch information
Showing
4 changed files
with
60 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
find_package(Matlab) | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
|
||
if(Matlab_FOUND) | ||
matlab_add_mex(NAME JSBSim_SFunction SRC JSBSim_SFunction.cpp JSBSimInterface.cpp | ||
LINK_TO libJSBSim) | ||
target_include_directories(JSBSim_SFunction PUBLIC ${CMAKE_SOURCE_DIR}/src | ||
${Matlab_ROOT_DIR}/simulink/include) | ||
set_target_properties(JSBSim_SFunction PROPERTIES CXX_STANDARD 14) | ||
|
||
if(MSVC) | ||
foreach(LINK_LIB ${JSBSIM_WINDOWS_LINK_LIBRARIES}) | ||
string(APPEND WINDOWS_LINK_LIBRARIES " ${LINK_LIB}.lib") | ||
endforeach() | ||
|
||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/WindowsSimulinkCompile.m.in ${CMAKE_CURRENT_BINARY_DIR}/JSBSimSimulinkCompile.m) | ||
endif(MSVC) | ||
|
||
endif(Matlab_FOUND) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
% This file is automatically generated. | ||
disp('Compiling S-function from JSBSim...'); | ||
mex -v -R2017b JSBSim_SFunction.cpp JSBSimInterface.cpp -I"..\include" -L"..\lib" -lJSBSim ${WINDOWS_LINK_LIBRARIES} | ||
disp('Finished.') |