aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-10-09 16:24:22 +0000
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>2009-10-09 16:24:22 +0000
commit8146f7d00d0cc0e0f70069f96976f8d86513dddd (patch)
tree4c13d4ea55fde3cac5f0f6cb2bb42a48b2681970 /cmake
parent03704406ad80d6c6b77af298c3d2bef6522f9302 (diff)
Add register_dissector_files macro
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@30433 f5534014-38df-0310-8fa8-9805f1628bb7
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)
+