aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-10-09 16:24:22 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-10-09 16:24:22 +0000
commitf4880ee5505f6fbcfe91a7012ee64a51e3206214 (patch)
tree4c13d4ea55fde3cac5f0f6cb2bb42a48b2681970 /cmake
parentf99ca83a8c5611fe27161d722dcd65a7236b4b6e (diff)
Add register_dissector_files macro
svn path=/trunk/; revision=30433
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/UseMakeDissectorReg.cmake33
1 files changed, 33 insertions, 0 deletions
diff --git a/cmake/modules/UseMakeDissectorReg.cmake b/cmake/modules/UseMakeDissectorReg.cmake
new file mode 100644
index 0000000000..7861f17fa3
--- /dev/null
+++ b/cmake/modules/UseMakeDissectorReg.cmake
@@ -0,0 +1,33 @@
+#
+# $Id$
+#
+MACRO(REGISTER_DISSECTOR_FILES _outputfile _registertype )
+ # FIXME: Only the Python stuff has been implemented
+ # Make this into a MACRO, to avoid duplication with plugins/.../
+ #register.c: $(plugin_src) $(ALL_DISSECTORS_SRC) $(top_srcdir)/tools/make-dissector-reg \
+ # $(top_srcdir)/tools/make-dissector-reg.py
+ # @if test -n "$(PYTHON)"; then \
+ # echo Making register.c with python ; \
+ # $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
+ # dissectors $(ALL_DISSECTORS_SRC) ; \
+ # else \
+ # echo Making register.c with shell script ; \
+ # $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
+ # dissectors $(plugin_src) $(ALL_DISSECTORS_SRC) ; \
+ # fi
+ set( _sources ${ARGN} )
+ ADD_CUSTOM_COMMAND(
+ OUTPUT
+ ${_outputfile}
+ COMMAND ${PYTHON_EXECUTABLE}
+ ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${_registertype}
+ ${_sources}
+ DEPENDS
+ ${_sources}
+ ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg
+ ${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
+ )
+ENDMACRO(REGISTER_DISSECTOR_FILES)
+