Merge branch 'master' into next

master
Paul Sutton 9 years ago
commit 7fbb961d67

@ -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
@ -43,9 +44,9 @@ FUNCTION(BuildMex)
COMPILE_FLAGS "-fvisibility=default ${MATLAB_MEX_CFLAGS} -DFORCE_STANDARD_RATE -I${MATLAB_INCLUDE_DIR}" 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}) 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
@ -55,7 +56,8 @@ FUNCTION(BuildMex)
COMPILE_FLAGS "-fvisibility=default ${OCTAVE_MEX_CFLAGS} -DFORCE_STANDARD_RATE -DUNDEF_BOOL -I${OCTAVE_INCLUDE_DIR}" 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}) 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)

Loading…
Cancel
Save