Skip to content

Commit

Permalink
Add function to set matlab variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sgilmore10 committed Nov 22, 2023
1 parent 45f1629 commit 301c38c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions matlab/tools/cmake/BuildMatlabArrowInterface.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,28 @@ function(set_matlab_variables)
message(FATAL_ERROR "Unknown MATLAB Release")
endif()

set(Matlab_VERSION_STRING "${matlab_release_version}" PARENT_SCOPE)
set(Matlab_ENGINE_LIBRARY "{Matlab_ROOT_DIR}/extern/lib/win64/microsoft/libMatlabEngine.lib" PARENT_SCOPE)
set(Matlab_DATAARRAY_LIBRARY "{Matlab_ROOT_DIR}/extern/lib/win64/microsoft/libMatlabDataArray.lib" PARENT_SCOPE)
set(Matlab_MEX_LIBRARY "{Matlab_ROOT_DIR}/extern/lib/win64/microsoft/libmex.lib" PARENT_SCOPE)
set(Matlab_HAS_CPP_API 1 PARENT_SCOPE)
set(Matlab_MX_LIBRARY "{Matlab_ROOT_DIR}/extern/lib/win64/microsoft/libmex.lib" PARENT_SCOPE)
set(Matlab_EXTERN_LIBRARY_DIR "{Matlab_ROOT_DIR}/extern/lib/win64" PARENT_SCOPE)
set(Matlab_INCLUDE_DIRS "{Matlab_ROOT_DIR}/extern/include" PARENT_SCOPE)
set(Matlab_BINARIES_DIR "{Matlab_ROOT_DIR}/bin/win64" PARENT_SCOPE)
set(Matlab_EXTERN_BINARIES_DIR "{Matlab_ROOT_DIR}/extern/bin/win64" PARENT_SCOPE)
endfunction()

set(MATLAB_ADDITIONAL_VERSIONS "R2023b=23.2")
set(Matlab_ROOT_DIR "C:/Program Files/MATLAB/R2023b")
message(STATUS "MATLAB_ADDITIONAL_VERSOINS = ${MATLAB_ADDITIONAL_VERSIONS}")
message(STATUS "Matlab_ROOT_DIR = ${Matlab_ROOT_DIR}")
find_package(Matlab REQUIRED)
print_find_matlab_variables()
message(STATUS "Set variables")
set_matlab_variables()
message(STATUS "After set")
print_find_matlab_variables()

message(STATUS "MATLAB_ADDITIONAL_VERSOINS = ${MATLAB_ADDITIONAL_VERSIONS}")
message(STATUS "Matlab_ROOT_DIR = ${Matlab_ROOT_DIR}")
Expand Down

0 comments on commit 301c38c

Please sign in to comment.