Minor updates to cmake checks for Octave/Matlab

master
Paul Sutton 10 years ago
parent fe3d723bdd
commit 3e34fae516

@ -24,7 +24,7 @@
# The original file was copied from an Ubuntu Linux install # The original file was copied from an Ubuntu Linux install
# /usr/share/cmake-2.8/Modules/FindMatlab.cmake # /usr/share/cmake-2.8/Modules/FindMatlab.cmake
set(MATLAB_FOUND 0) set(MATLAB_FOUND FALSE)
if(WIN32) if(WIN32)
# Search for a version of Matlab available, starting from the most modern one to older versions # Search for a version of Matlab available, starting from the most modern one to older versions
foreach(MATVER "7.14" "7.11" "7.10" "7.9" "7.8" "7.7" "7.6" "7.5" "7.4") foreach(MATVER "7.14" "7.11" "7.10" "7.9" "7.8" "7.7" "7.6" "7.5" "7.4")
@ -185,7 +185,7 @@ set(MATLAB_LIBRARIES
) )
if(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES) if(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
set(MATLAB_FOUND 1) set(MATLAB_FOUND TRUE)
endif() endif()
# 32-bit or 64-bit mex # 32-bit or 64-bit mex

@ -37,27 +37,26 @@ if(NOT MATLAB_MEX_PATH)
) )
endif() endif()
IF (MATLAB_FOUND) if(MATLAB_FOUND)
message(STATUS "Found MATLAB in ${MATLAB_ROOT}") message(STATUS "Found MATLAB in ${MATLAB_ROOT}")
ENDIF(MATLAB_FOUND) add_library(srslte_mex SHARED mexutils.c)
IF (OCTAVE_FOUND) install(TARGETS srslte_mex DESTINATION ${LIBRARY_DIR})
message(STATUS "Found OCTAVE in ${OCTAVE_INCLUDE_PATHS}") liblte_set_pic(srslte_mex)
ENDIF(OCTAVE_FOUND)
IF (MATLAB_FOUND OR OCTAVE_FOUND)
ADD_LIBRARY(srslte_mex SHARED mexutils.c)
INSTALL(TARGETS srslte_mex DESTINATION ${LIBRARY_DIR})
LIBLTE_SET_PIC(srslte_mex)
if (MATLAB_FOUND)
include_directories(${MATLAB_INCLUDE_DIR}) include_directories(${MATLAB_INCLUDE_DIR})
endif(MATLAB_FOUND) endif(MATLAB_FOUND)
if (OCTAVE_FOUND)
if(OCTAVE_FOUND)
message(STATUS "Found OCTAVE in ${OCTAVE_INCLUDE_PATHS}")
add_library(srslte_mex SHARED mexutils.c)
install(TARGETS srslte_mex DESTINATION ${LIBRARY_DIR})
liblte_set_pic(srslte_mex)
include_directories(${OCTAVE_INCLUDE_DIR}) include_directories(${OCTAVE_INCLUDE_DIR})
endif (OCTAVE_FOUND) endif(OCTAVE_FOUND)
ELSEIF (MATLAB_FOUND OR OCTAVE_FOUND) if(NOT MATLAB_FOUND)
if(NOT OCTAVE_FOUND)
message(STATUS "Could NOT find OCTAVE or MATLAB. MEX files won't be compiled") message(STATUS "Could NOT find OCTAVE or MATLAB. MEX files won't be compiled")
ENDIF(MATLAB_FOUND OR OCTAVE_FOUND) endif(NOT OCTAVE_FOUND)
endif(NOT MATLAB_FOUND)

Loading…
Cancel
Save