|
|
@ -30,10 +30,11 @@ endif()
|
|
|
|
# SOURCE = list of source files
|
|
|
|
# SOURCE = list of source files
|
|
|
|
# LIBRARIES = libraries needed to link mex library
|
|
|
|
# LIBRARIES = libraries needed to link mex library
|
|
|
|
FUNCTION(BuildMex)
|
|
|
|
FUNCTION(BuildMex)
|
|
|
|
set(oneValueArgs MEXNAME)
|
|
|
|
if(NOT DisableMEX)
|
|
|
|
set(multiValueArgs SOURCES LIBRARIES)
|
|
|
|
set(oneValueArgs MEXNAME)
|
|
|
|
cmake_parse_arguments(BuildMex "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
|
|
set(multiValueArgs SOURCES LIBRARIES)
|
|
|
|
if (MATLAB_FOUND)
|
|
|
|
cmake_parse_arguments(BuildMex "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
|
|
|
|
|
|
|
if (MATLAB_FOUND)
|
|
|
|
add_library(${BuildMex_MEXNAME}-mat SHARED ${BuildMex_SOURCES})
|
|
|
|
add_library(${BuildMex_MEXNAME}-mat SHARED ${BuildMex_SOURCES})
|
|
|
|
#target_include_directories(${BuildMex_MEXNAME}-mat PUBLIC ${MATLAB_INCLUDE_DIR})
|
|
|
|
#target_include_directories(${BuildMex_MEXNAME}-mat PUBLIC ${MATLAB_INCLUDE_DIR})
|
|
|
|
set_target_properties(${BuildMex_MEXNAME}-mat PROPERTIES
|
|
|
|
set_target_properties(${BuildMex_MEXNAME}-mat PROPERTIES
|
|
|
@ -44,8 +45,8 @@ FUNCTION(BuildMex)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
target_link_libraries(${BuildMex_MEXNAME}-mat ${BuildMex_LIBRARIES} ${MATLAB_MEX_LIBRARY})
|
|
|
|
target_link_libraries(${BuildMex_MEXNAME}-mat ${BuildMex_LIBRARIES} ${MATLAB_MEX_LIBRARY})
|
|
|
|
install(TARGETS ${BuildMex_MEXNAME}-mat DESTINATION "${MEX_DIR}/srslte/")
|
|
|
|
install(TARGETS ${BuildMex_MEXNAME}-mat DESTINATION "${MEX_DIR}/srslte/")
|
|
|
|
endif(MATLAB_FOUND)
|
|
|
|
endif(MATLAB_FOUND)
|
|
|
|
if (OCTAVE_FOUND)
|
|
|
|
if (OCTAVE_FOUND)
|
|
|
|
add_library(${BuildMex_MEXNAME}-oct SHARED ${BuildMex_SOURCES})
|
|
|
|
add_library(${BuildMex_MEXNAME}-oct SHARED ${BuildMex_SOURCES})
|
|
|
|
#target_include_directories(${BuildMex_MEXNAME}-oct PUBLIC ${OCTAVE_INCLUDE_DIR})
|
|
|
|
#target_include_directories(${BuildMex_MEXNAME}-oct PUBLIC ${OCTAVE_INCLUDE_DIR})
|
|
|
|
set_target_properties(${BuildMex_MEXNAME}-oct PROPERTIES
|
|
|
|
set_target_properties(${BuildMex_MEXNAME}-oct PROPERTIES
|
|
|
@ -56,6 +57,7 @@ FUNCTION(BuildMex)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
target_link_libraries(${BuildMex_MEXNAME}-oct ${BuildMex_LIBRARIES} ${OCTAVE_LIBRARIES})
|
|
|
|
target_link_libraries(${BuildMex_MEXNAME}-oct ${BuildMex_LIBRARIES} ${OCTAVE_LIBRARIES})
|
|
|
|
install(TARGETS ${BuildMex_MEXNAME}-oct DESTINATION "${MEX_DIR}/srslte/")
|
|
|
|
install(TARGETS ${BuildMex_MEXNAME}-oct DESTINATION "${MEX_DIR}/srslte/")
|
|
|
|
endif (OCTAVE_FOUND)
|
|
|
|
endif (OCTAVE_FOUND)
|
|
|
|
|
|
|
|
endif (NOT DisableMEX)
|
|
|
|
ENDFUNCTION(BuildMex)
|
|
|
|
ENDFUNCTION(BuildMex)
|
|
|
|
|
|
|
|
|
|
|
|