From cfab5ef035db7be8502623af203ab3494a9200e3 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 4 Apr 2017 23:23:59 +0200 Subject: Add libxml2 as optional dependency This can be used by dissectors that need to parse out-of-band configuration. Change-Id: I13c0a2f408fb5c21bad7ab3d7971e0fa8ed7d783 Reviewed-on: https://code.wireshark.org/review/20912 Reviewed-by: Roland Knall --- CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c3997575d..11543733ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -875,6 +875,10 @@ if(ENABLE_SPANDSP) set(PACKAGELIST ${PACKAGELIST} SPANDSP) endif() +if(ENABLE_LIBXML2) + set(PACKAGELIST ${PACKAGELIST} LibXml2) +endif() + # Capabilities if(ENABLE_CAP) set(PACKAGELIST ${PACKAGELIST} CAP SETCAP) @@ -908,6 +912,8 @@ foreach(PACKAGE ${PACKAGELIST}) set(PACKAGE_VAR "GETTEXT") elseif(${PACKAGE} STREQUAL "Perl") set(PACKAGE_VAR "PERL") + elseif(${PACKAGE} STREQUAL "LibXml2") + set(PACKAGE_VAR "LIBXML2") else() set(PACKAGE_VAR ${PACKAGE}) endif() @@ -989,6 +995,9 @@ endif() if(SPANDSP_FOUND) set(HAVE_SPANDSP 1) endif() +if(LIBXML2_FOUND) + set(HAVE_LIBXML2 1) +endif() if(EXTCAP_ANDROIDDUMP_LIBPCAP) set(ANDROIDDUMP_USE_LIBPCAP 1) endif() @@ -1370,6 +1379,7 @@ include(FeatureSummary) #SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ]) SET_FEATURE_INFO(SBC "SBC Codec for Bluetooth A2DP stream playing" "http://git.kernel.org/cgit/bluetooth/sbc.git" ) SET_FEATURE_INFO(SPANDSP "Support for G.722 and G.726 codecs in RTP player" "http://www.soft-switch.org/" ) +SET_FEATURE_INFO(LIBXML2 "Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors" "http://xmlsoft.org/" ) SET_FEATURE_INFO(LIBSSH "libssh is library for ssh connections and it is needed to build sshdump/ciscodump" "https://www.libssh.org/get-it/" ) SET_FEATURE_INFO(LZ4 "LZ4 is lossless compression algorithm used in some protocol (CQL...)" "http://www.lz4.org" ) SET_FEATURE_INFO(SNAPPY "snappy is a fast compressor/decompressor from Google used in some protocol (CQL, kafka...)" "http://google.github.io/snappy/") @@ -1650,6 +1660,13 @@ if(WIN32) "${_dll_output_dir}" ) endif(SPANDSP_FOUND) + if (LIBXML2_FOUND) + add_custom_command(TARGET copy_cli_dlls PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${LIBXML2_DLL_DIR}/${LIBXML2_DLL}" + "${_dll_output_dir}" + ) + endif(LIBXML2_FOUND) if (SMI_FOUND) # Wireshark.nsi wants SMI_DIR which is the base SMI directory get_filename_component(SMI_DIR ${SMI_DLL_DIR} DIRECTORY) -- cgit v1.2.1