diff options
Diffstat (limited to 'cmake/modules/UseMakeDissectorReg.cmake')
-rw-r--r-- | cmake/modules/UseMakeDissectorReg.cmake | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cmake/modules/UseMakeDissectorReg.cmake b/cmake/modules/UseMakeDissectorReg.cmake index 384030b125..ab6df9a0ff 100644 --- a/cmake/modules/UseMakeDissectorReg.cmake +++ b/cmake/modules/UseMakeDissectorReg.cmake @@ -2,14 +2,25 @@ # $Id$ # MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype ) - set( _sources ${ARGN} ) + if(${_registertype} STREQUAL "dissectors" ) + set( _makeregistertype "dissectorsinfile" ) + set( _ftmp "${CMAKE_CURRENT_BINARY_DIR}/_regc.tmp" ) + file(REMOVE ${_ftmp}) + foreach(f ${ARGN}) + file(APPEND ${_ftmp} "${f}\n") + endforeach() + set( _sources ${_ftmp} ) + else() + set( _makeregistertype ${_registertype} ) + set( _sources ${ARGN} ) + endif() ADD_CUSTOM_COMMAND( OUTPUT ${_outputfile} COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py ${CMAKE_CURRENT_SOURCE_DIR} - ${_registertype} + ${_makeregistertype} ${_sources} DEPENDS ${_sources} |