blob: c17dfe472c77d6f83cf462b3eb3cdd00f32dc3cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#
MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype )
if(${_registertype} STREQUAL "dissectors" )
set( _makeregistertype "dissectorsinfile" )
set( _ftmp "${CMAKE_CURRENT_BINARY_DIR}/_regc.tmp" )
set( _depends ${ARGN} )
file(REMOVE ${_ftmp})
foreach(f ${_depends})
file(APPEND ${_ftmp} "${f}\n")
endforeach()
set( _sources ${_ftmp} )
else()
set( _makeregistertype ${_registertype} )
set( _sources ${ARGN} )
set( _depends ${_sources} )
endif()
ADD_CUSTOM_COMMAND(
OUTPUT
${_outputfile}
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
${CMAKE_CURRENT_SOURCE_DIR}
${_makeregistertype}
${_sources}
DEPENDS
${_depends}
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
)
ENDMACRO(REGISTER_DISSECTOR_FILES)
|