2009-10-09 16:24:22 +00:00
|
|
|
#
|
|
|
|
MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype )
|
2013-11-29 19:57:00 +00:00
|
|
|
if(${_registertype} STREQUAL "dissectors" )
|
|
|
|
set( _makeregistertype "dissectorsinfile" )
|
|
|
|
set( _ftmp "${CMAKE_CURRENT_BINARY_DIR}/_regc.tmp" )
|
2013-12-01 22:24:59 +00:00
|
|
|
set( _depends ${ARGN} )
|
2013-11-29 19:57:00 +00:00
|
|
|
file(REMOVE ${_ftmp})
|
2013-12-01 22:24:59 +00:00
|
|
|
foreach(f ${_depends})
|
2013-11-29 19:57:00 +00:00
|
|
|
file(APPEND ${_ftmp} "${f}\n")
|
|
|
|
endforeach()
|
|
|
|
set( _sources ${_ftmp} )
|
|
|
|
else()
|
|
|
|
set( _makeregistertype ${_registertype} )
|
|
|
|
set( _sources ${ARGN} )
|
2013-12-01 22:24:59 +00:00
|
|
|
set( _depends ${_sources} )
|
2013-11-29 19:57:00 +00:00
|
|
|
endif()
|
2009-10-09 16:24:22 +00:00
|
|
|
ADD_CUSTOM_COMMAND(
|
2012-09-25 01:20:51 +00:00
|
|
|
OUTPUT
|
2009-10-09 16:24:22 +00:00
|
|
|
${_outputfile}
|
|
|
|
COMMAND ${PYTHON_EXECUTABLE}
|
|
|
|
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
2013-11-29 19:57:00 +00:00
|
|
|
${_makeregistertype}
|
2009-10-09 16:24:22 +00:00
|
|
|
${_sources}
|
|
|
|
DEPENDS
|
2013-12-01 22:24:59 +00:00
|
|
|
${_depends}
|
2009-10-09 16:24:22 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg
|
|
|
|
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
|
|
|
|
)
|
|
|
|
ENDMACRO(REGISTER_DISSECTOR_FILES)
|
|
|
|
|