# CMakeLists.txt # # Wireshark - Network traffic analyzer # By Gerald Combs # Copyright 1998 Gerald Combs # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # include(UseABICheck) if (HAVE_HFI_SECTION_INIT) add_definitions( -DHAVE_HFI_SECTION_INIT ) endif() if (HAVE_LIBLUA) include( wslua/CMakeLists.txt ) endif() source_group(wslua FILES ${WSLUA_FILES}) add_subdirectory( dissectors/dcerpc ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/dfilter ${CMAKE_CURRENT_SOURCE_DIR}/dissectors ${CMAKE_CURRENT_SOURCE_DIR}/ftypes ${CMAKE_CURRENT_SOURCE_DIR}/wslua ${CMAKE_CURRENT_SOURCE_DIR}/nghttp2 ) set(CRYPT_FILES crypt/airpdcap.c crypt/airpdcap_ccmp.c crypt/airpdcap_debug.c crypt/airpdcap_rijndael.c crypt/airpdcap_tkip.c ) source_group(crypt FILES ${CRYPT_FILES}) set(DFILTER_FILES dfilter/dfilter.c dfilter/dfilter-macro.c dfilter/dfunctions.c dfilter/dfvm.c dfilter/drange.c dfilter/gencode.c dfilter/semcheck.c dfilter/sttype-function.c dfilter/sttype-integer.c dfilter/sttype-pointer.c dfilter/sttype-range.c dfilter/sttype-string.c dfilter/sttype-test.c dfilter/syntax-tree.c ) source_group(dfilter FILES ${DFILTER_FILES}) set(DFILTER_CLEAN_FILES ${DFILTER_FILES} ) add_lex_files(DFILTER_FILES dfilter/scanner.l ) add_lemon_files(DFILTER_FILES dfilter/grammar.lemon ) if (AUTOGEN_pidl) # TODO endif() if (AUTOGEN_dcerpc) FOREACH(PROTOCOL_NAME ${PIDL_DISSECTOR_AUTOGEN_NAMES}) set(PIDL_DISSECTOR_AUTOGEN_SRC ${PIDL_DISSECTOR_AUTOGEN_SRC} dissectors/dcerpc/${PROTOCOL_NAME}/packet-dcerpc-${PROTOCOL_NAME}.c ) ENDFOREACH() FOREACH(PROTOCOL_NAME ${PIDL_DISSECTOR_AUTOGEN_NAMES}) SET(CUR_PROTO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dissectors/dcerpc/${PROTOCOL_NAME}) SET(CUR_PROTO_C_FILE packet-dcerpc-${PROTOCOL_NAME}.c) SET(CUR_PROTO_H_FILE packet-dcerpc-${PROTOCOL_NAME}.h) ADD_CUSTOM_COMMAND( OUTPUT ${CUR_PROTO_DIR}/${CUR_PROTO_C_FILE} ${CUR_PROTO_DIR}/${CUR_PROTO_H_FILE} COMMAND idl2wrs ${PROTOCOL_NAME} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CUR_PROTO_DIR}/${CUR_PROTO_C_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/dissectors/${CUR_PROTO_C_FILE} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CUR_PROTO_DIR}/${CUR_PROTO_H_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/dissectors/${CUR_PROTO_H_FILE} WORKING_DIRECTORY ${CUR_PROTO_DIR} DEPENDS ${CUR_PROTO_DIR}/${PROTOCOL_NAME}.idl ${CUR_PROTO_DIR}/${PROTOCOL_NAME}.cnf ${CUR_PROTO_DIR}/packet-dcerpc-${PROTOCOL_NAME}-template.c ${CUR_PROTO_DIR}/packet-dcerpc-${PROTOCOL_NAME}-template.h ) ENDFOREACH() else() FOREACH(PROTOCOL_NAME ${PIDL_DISSECTOR_AUTOGEN_NAMES}) set(PIDL_DISSECTOR_AUTOGEN_SRC ${PIDL_DISSECTOR_AUTOGEN_SRC} dissectors/packet-dcerpc-${PROTOCOL_NAME}.c ) ENDFOREACH() endif() ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/packet-ncp2222.c COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/ncp2222.py -o ${CMAKE_CURRENT_BINARY_DIR}/packet-ncp2222.c DEPENDS dissectors/packet-ncp2222.inc ${CMAKE_SOURCE_DIR}/tools/ncp2222.py ) ADD_CUSTOM_COMMAND( OUTPUT x11-dissector # x11-declarations.h # x11-enum.h # x11-extension-errors.h # x11-extension-implementation.h # x11-fields # x11-glx-render-enum.h # x11-register-info.h COMMAND ${PERL_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/process-x11-fields.pl