Merge branch 'master' into next

master
Paul Sutton 9 years ago
commit 7fbb961d67

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

Loading…
Cancel
Save