forked from osmocom/wireshark
OK, so my last commit message was too optimistic - I was using
an installed version of wsutil. dumpcap now really builds on Linux via cmake. svn path=/trunk/; revision=28754
This commit is contained in:
parent
fbb5b30ceb
commit
67d508edaf
|
@ -23,6 +23,11 @@
|
|||
|
||||
project(wireshark C)
|
||||
|
||||
subdirs(
|
||||
wiretap
|
||||
wsutil
|
||||
)
|
||||
|
||||
set(dumpcap_LIBS
|
||||
wiretap
|
||||
wsutil
|
||||
|
@ -80,9 +85,6 @@ else(CMAKE_COMPILER_IS_GNUCC)
|
|||
add_definitions(-DHAVE_CONFIG_H -D_U_=\"\")
|
||||
endif(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
|
||||
subdirs(wiretap)
|
||||
|
||||
#The minimum package list
|
||||
set(PACKAGELIST GLIB2 ZLIB PCAP LEX YACC ${PACKAGELIST})
|
||||
|
||||
|
@ -137,6 +139,7 @@ check_include_file("dirent.h" HAVE_DIRENT_H)
|
|||
check_include_file("dlfcn.h" HAVE_DLFCN_H)
|
||||
check_include_file("fcntl.h" HAVE_FCNTL_H)
|
||||
check_include_file("getopt.h" NEED_GETOPT_H)
|
||||
check_include_file("grp.h" HAVE_GRP_H)
|
||||
check_include_file("g_ascii_strtoull.h" NEED_G_ASCII_STRTOULL_H)
|
||||
check_include_file("inet/aton.h" NEED_INET_ATON_H)
|
||||
check_include_file("inttypes.h" HAVE_INTTYPES_H)
|
||||
|
@ -145,6 +148,7 @@ check_include_file("memory.h" HAVE_MEMORY_H)
|
|||
check_include_file("netinet/in.h" HAVE_NETINET_IN_H)
|
||||
check_include_file("netdb.h" HAVE_NETDB_H)
|
||||
check_include_file("portaudio.h" HAVE_PORTAUDIO_H)
|
||||
check_include_file("pwd.h" HAVE_PWD_H)
|
||||
check_include_file("stdarg.h" HAVE_STDARG_H)
|
||||
check_include_file("stddef.h" HAVE_STDDEF_H)
|
||||
check_include_file("stdint.h" HAVE_STDINT_H)
|
||||
|
@ -229,11 +233,13 @@ ADD_CUSTOM_COMMAND(
|
|||
)
|
||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/svnversion.h GENERATED)
|
||||
|
||||
if(BUILD_DUMPCAP)
|
||||
|
||||
if(UNIX)
|
||||
set(DUMPCAP_PLATFORM_SRC
|
||||
capture-pcap-util-unix.c
|
||||
)
|
||||
endif(UNIX)
|
||||
|
||||
if(BUILD_DUMPCAP)
|
||||
|
||||
set(DUMPCAP_FILES
|
||||
svnversion.h
|
||||
|
|
|
@ -22,34 +22,36 @@ MARK_AS_ADVANCED(
|
|||
|
||||
# search flex
|
||||
MACRO(FIND_LEX)
|
||||
IF(NOT LEX_EXECUTABLE)
|
||||
FIND_PROGRAM(LEX_EXECUTABLE flex)
|
||||
IF (NOT LEX_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "flex not found - aborting")
|
||||
ENDIF (NOT LEX_EXECUTABLE)
|
||||
ENDIF(NOT LEX_EXECUTABLE)
|
||||
IF(NOT LEX_EXECUTABLE)
|
||||
FIND_PROGRAM(LEX_EXECUTABLE flex)
|
||||
IF (NOT LEX_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "flex not found - aborting")
|
||||
ENDIF (NOT LEX_EXECUTABLE)
|
||||
ENDIF(NOT LEX_EXECUTABLE)
|
||||
ENDMACRO(FIND_LEX)
|
||||
|
||||
MACRO(ADD_LEX_FILES _sources )
|
||||
FIND_LEX()
|
||||
FIND_LEX()
|
||||
|
||||
FOREACH (_current_FILE ${ARGN})
|
||||
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
|
||||
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
|
||||
|
||||
SET(_outc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.c)
|
||||
SET(_outh ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_lex.h)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_outc}
|
||||
# COMMAND ${LEX_EXECUTABLE}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/tools/runlex.sh ${LEX_EXECUTABLE}
|
||||
ARGS
|
||||
-o${_outc}
|
||||
${_in}
|
||||
DEPENDS ${_in}
|
||||
OUTPUT ${_outc}
|
||||
# COMMAND ${LEX_EXECUTABLE}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/tools/runlex.sh ${LEX_EXECUTABLE}
|
||||
ARGS
|
||||
-o${_outc}
|
||||
--header-file=${_outh}
|
||||
${_in}
|
||||
DEPENDS ${_in}
|
||||
)
|
||||
|
||||
SET(${_sources} ${${_sources}} ${_outc} )
|
||||
ENDFOREACH (_current_FILE)
|
||||
SET(${_sources} ${${_sources}} ${_outc} )
|
||||
ENDFOREACH (_current_FILE)
|
||||
ENDMACRO(ADD_LEX_FILES)
|
||||
|
||||
|
|
|
@ -270,6 +270,12 @@
|
|||
/* Define if we are using version of of the Portaudio library API */
|
||||
#cmakedefine PORTAUDIO_API_1 1
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#cmakedefine HAVE_PWD_H 1
|
||||
|
||||
/* Define to 1 if you have the <grp.h> header file. */
|
||||
#cmakedefine HAVE_GRP_H 1
|
||||
|
||||
/* Format for printing 64-bit unsigned hexadecimal numbers (upper-case) */
|
||||
#cmakedefine PRIX64 @PRIX64@
|
||||
|
||||
|
|
|
@ -21,18 +21,23 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
|
||||
IF(WIN32)
|
||||
set(WSUTIL_PLATFORM_FILES
|
||||
file_util.c
|
||||
unicode-utils.c
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
|
||||
set(WSUTIL_FILES
|
||||
file_util.c
|
||||
mpeg-audio.c
|
||||
privileges.c
|
||||
str_util.c
|
||||
type_util.c
|
||||
unicode-utils.c
|
||||
mpeg-audio.c
|
||||
privileges.c
|
||||
str_util.c
|
||||
type_util.c
|
||||
${WSUTIL_PLATFORM_FILES}
|
||||
)
|
||||
|
||||
add_library(wsutil SHARED
|
||||
${WUTIL_FILES}
|
||||
${WSUTIL_FILES}
|
||||
)
|
||||
|
||||
install(TARGETS wsutil LIBRARY DESTINATION lib)
|
||||
|
|
Loading…
Reference in New Issue