Beginnings of getting cmake to build stuff in epan.
It's only beginnings, so epan is commented out in the subdirs statement. This is more a synch to avoid duplicate work and creating conflicting patches to the cmake stuff. svn path=/trunk/; revision=29666
This commit is contained in:
parent
822d0a2242
commit
d26cdc30ea
|
@ -26,12 +26,14 @@ project(wireshark C)
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
subdirs(
|
||||
# epan
|
||||
wiretap
|
||||
wsutil
|
||||
)
|
||||
|
||||
#Where to find local cmake scripts
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
||||
INCLUDE(UseLemon)
|
||||
|
||||
# Under linux the release mode (CMAKE_BUILD_TYPE=release) defines NDEBUG
|
||||
|
||||
|
@ -46,7 +48,7 @@ include(CMakeInstallDirs)
|
|||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
# ${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/wiretap
|
||||
${CMAKE_SOURCE_DIR}/wsutil
|
||||
)
|
||||
|
@ -94,12 +96,12 @@ else()
|
|||
set(PACKAGELIST GLIB2 PCAP LEX YACC Perl ${PACKAGELIST})
|
||||
endif()
|
||||
|
||||
#build the gui ?
|
||||
#Build the gui ?
|
||||
if(BUILD_wireshark)
|
||||
set(PACKAGELIST GTK2 ${PACKAGELIST})
|
||||
endif()
|
||||
|
||||
#Gnu asynchronous dns
|
||||
#Gnu asynchronous DNS
|
||||
if(ENABLE_ADNS)
|
||||
set(PACKAGELIST ADNS ${PACKAGELIST})
|
||||
set(HAVE_GNU_ADNS 1)
|
||||
|
@ -172,6 +174,7 @@ configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h
|
|||
link_directories(
|
||||
wiretap
|
||||
wsutil
|
||||
epan
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
|
@ -182,6 +185,17 @@ ADD_CUSTOM_COMMAND(
|
|||
)
|
||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/svnversion.h GENERATED)
|
||||
|
||||
# Create the necessary tools
|
||||
set(lemon_FILES
|
||||
tools/lemon/lemon.c
|
||||
)
|
||||
set(lemon_LIBS
|
||||
# Do we need something here on any platform?
|
||||
)
|
||||
add_executable(lemon ${lemon_FILES})
|
||||
target_link_libraries(lemon ${lemon_LIBS})
|
||||
# but don't install them
|
||||
|
||||
if(UNIX)
|
||||
set(PLATFORM_SRC
|
||||
capture-pcap-util-unix.c
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
MACRO(ADD_LEMON_FILES _sources )
|
||||
set(_lemonpardir ${CMAKE_SOURCE_DIR}/tools/lemon)
|
||||
FOREACH (_current_FILE ${ARGN})
|
||||
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
|
||||
|
||||
SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.c)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_out}
|
||||
COMMAND ${CMAKE_BINARY_DIR}/lemon
|
||||
ARGS
|
||||
t=${_lemonpardir}/lempar.c
|
||||
${srcdir}/${_in}
|
||||
DEPENDS ${_in}
|
||||
)
|
||||
|
||||
SET(${_sources} ${${_sources}} ${_out} )
|
||||
ENDFOREACH (_current_FILE)
|
||||
ENDMACRO(ADD_LEMON_FILES)
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
# CMakeLists.txt
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Wireshark - Network traffic analyzer
|
||||
# By Gerald Combs <gerald@wireshark.org>
|
||||
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
|
||||
subdirs(
|
||||
dissectors
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sminmpec.c
|
||||
COMMAND ${PERL_EXECUTABLE}
|
||||
ARGS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/make-sminmpec.pl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enterprise-numbers
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sminmpec.c
|
||||
DEPENDS enterprise-numbers
|
||||
)
|
||||
|
||||
set(LIBWIRESHARK_FILES
|
||||
addr_and_mask.c
|
||||
addr_resolv.c
|
||||
adler32.c
|
||||
afn.c
|
||||
asn1.c
|
||||
atalk-utils.c
|
||||
base64.c
|
||||
bitswap.c
|
||||
camel-persistentdata.c
|
||||
charsets.c
|
||||
circuit.c
|
||||
codecs.c
|
||||
column.c
|
||||
column-utils.c
|
||||
conversation.c
|
||||
crc10.c
|
||||
crc16.c
|
||||
crc32.c
|
||||
crc6.c
|
||||
crcdrm.c
|
||||
dissector_filters.c
|
||||
emem.c
|
||||
epan.c
|
||||
ex-opt.c
|
||||
except.c
|
||||
expert.c
|
||||
filesystem.c
|
||||
follow.c
|
||||
frame_data.c
|
||||
frequency-utils.c
|
||||
funnel.c
|
||||
gcp.c
|
||||
geoip_db.c
|
||||
golay.c
|
||||
guid-utils.c
|
||||
h225-persistentdata.c
|
||||
in_cksum.c
|
||||
ipproto.c
|
||||
ipv4.c
|
||||
next_tvb.c
|
||||
nstime.c
|
||||
oids.c
|
||||
osi-utils.c
|
||||
packet.c
|
||||
plugins.c
|
||||
prefs.c
|
||||
proto.c
|
||||
range.c
|
||||
reassemble.c
|
||||
reedsolomon.c
|
||||
report_err.c
|
||||
req_resp_hdrs.c
|
||||
sigcomp_state_hdlr.c
|
||||
sigcomp-udvm.c
|
||||
sminmpec.c
|
||||
sna-utils.c
|
||||
stat_cmd_args.c
|
||||
stats_tree.c
|
||||
strutil.c
|
||||
stream.c
|
||||
t35.c
|
||||
tap.c
|
||||
tcap-persistentdata.c
|
||||
timestamp.c
|
||||
tfs.c
|
||||
to_str.c
|
||||
tvbparse.c
|
||||
tvbuff.c
|
||||
uat.c
|
||||
value_string.c
|
||||
xdlc.c
|
||||
)
|
||||
|
||||
add_lex_files(LIBWIRESHARK_FILES
|
||||
diam_dict.l
|
||||
dtd_parse.l
|
||||
dtd_preparse.l
|
||||
radius_dict.l
|
||||
uat_load.l
|
||||
)
|
||||
|
||||
add_lemon_files(LIBWIRESHARK_FILES
|
||||
dtd_grammar.lemon
|
||||
)
|
||||
|
||||
# add_dependency(ascend.c ascend_scanner_lex.h)
|
||||
|
||||
add_library(libwireshark SHARED
|
||||
${LIBWIRESHARK_FILES}
|
||||
)
|
||||
|
||||
install(TARGETS libwireshark
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
|
@ -88,4 +88,6 @@ add_library(wiretap SHARED
|
|||
install(TARGETS wiretap
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue