2006-09-05 09:50:45 +00:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
|
|
|
# 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
|
2012-06-28 22:56:06 +00:00
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2006-09-05 09:50:45 +00:00
|
|
|
#
|
|
|
|
|
2012-02-02 12:04:22 +00:00
|
|
|
project(Wireshark C CXX)
|
2006-09-05 09:27:22 +00:00
|
|
|
|
2014-05-28 15:12:49 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8.3)
|
2009-06-16 04:12:30 +00:00
|
|
|
|
2010-09-23 06:59:41 +00:00
|
|
|
# Needs to be set after cmake_minimum_required or cmake_policy(VERSION)
|
2013-11-09 09:36:09 +00:00
|
|
|
# Policy since 2.6.1
|
|
|
|
cmake_policy(SET CMP0008 NEW)
|
|
|
|
# Policy since 2.6.3
|
|
|
|
# Backward compatibility for versions < 2.6.3
|
|
|
|
cmake_policy(SET CMP0011 OLD)
|
|
|
|
# Policy since 2.8.1
|
2014-06-14 14:32:48 +00:00
|
|
|
cmake_policy(SET CMP0015 NEW)
|
2010-09-23 06:59:41 +00:00
|
|
|
|
2015-01-09 21:53:17 +00:00
|
|
|
# If our target platform is enforced by our generator, set
|
|
|
|
# WIRESHARK_TARGET_PLATFORM accordingly. Otherwise use
|
|
|
|
# %WIRESHARK_TARGET_PLATFORM%.
|
|
|
|
if(WIN32)
|
2015-01-10 21:29:57 +00:00
|
|
|
if("${CMAKE_GENERATOR}" MATCHES ".*Win64$")
|
2015-01-09 21:53:17 +00:00
|
|
|
set(WIRESHARK_TARGET_PLATFORM win64)
|
2015-01-10 21:29:57 +00:00
|
|
|
set(PROCESSOR_ARCHITECTURE amd64)
|
|
|
|
message("Building for x64")
|
|
|
|
elseif("${CMAKE_GENERATOR}" MATCHES "Visual Studio.*")
|
2015-01-09 21:53:17 +00:00
|
|
|
set(WIRESHARK_TARGET_PLATFORM win32)
|
2015-01-10 21:29:57 +00:00
|
|
|
set(PROCESSOR_ARCHITECTURE x86)
|
|
|
|
message("Building for x86")
|
2015-01-09 21:53:17 +00:00
|
|
|
else()
|
|
|
|
set(WIRESHARK_TARGET_PLATFORM $ENV{WIRESHARK_TARGET_PLATFORM})
|
|
|
|
endif()
|
|
|
|
endif(WIN32)
|
|
|
|
|
2014-06-21 09:10:38 +00:00
|
|
|
#Where to find local cmake scripts
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
|
|
|
|
2014-09-18 06:05:48 +00:00
|
|
|
include(UseCustomIncludes)
|
|
|
|
ADD_CUSTOM_CMAKE_INCLUDE()
|
|
|
|
|
2013-11-04 20:29:29 +00:00
|
|
|
# This cannot be implemented via option(...)
|
|
|
|
if( NOT CMAKE_BUILD_TYPE )
|
2013-11-17 14:03:58 +00:00
|
|
|
set( CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
|
|
|
|
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
|
|
|
|
FORCE)
|
2013-11-04 20:29:29 +00:00
|
|
|
endif()
|
|
|
|
message(STATUS "Configuration types: ${CMAKE_CONFIGURATION_TYPES}")
|
2015-01-05 19:35:25 +00:00
|
|
|
|
|
|
|
# Override optimization and other flags for make based generators
|
|
|
|
foreach (_BT DEBUG RELEASE RELWITHDEBINFO SIZEREL)
|
|
|
|
set( CMAKE_C_FLAGS_${_BT} "${CMAKE_C_FLAGS_${_BT}} ${CMAKE_C_FLAGS}" )
|
|
|
|
set( CMAKE_CXX_FLAGS_${_BT} "${CMAKE_C_FLAGS_${_BT}} ${CMAKE_C_FLAGS}" )
|
|
|
|
endforeach()
|
|
|
|
|
2013-11-04 20:29:29 +00:00
|
|
|
message(STATUS "${CMAKE_BUILD_TYPE}: ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
|
2015-01-15 21:07:48 +00:00
|
|
|
|
|
|
|
# Where to put executables and libraries in the build tree
|
|
|
|
# Note: Executables and libraries might end end up in a configuration
|
|
|
|
# subdirectory, e.g. run/Debug or run/Release. We try to set DATAFILE_DIR
|
|
|
|
# to a corresponding value below.
|
2014-06-21 09:10:38 +00:00
|
|
|
if(NOT ARCHIVE_OUTPUT_PATH)
|
|
|
|
set(ARCHIVE_OUTPUT_PATH ${Wireshark_BINARY_DIR}/run CACHE INTERNAL
|
|
|
|
"Single output directory for building all archives.")
|
|
|
|
endif()
|
|
|
|
if(NOT EXECUTABLE_OUTPUT_PATH)
|
|
|
|
set(EXECUTABLE_OUTPUT_PATH ${Wireshark_BINARY_DIR}/run CACHE INTERNAL
|
|
|
|
"Single output directory for building all executables.")
|
|
|
|
endif()
|
|
|
|
if(NOT LIBRARY_OUTPUT_PATH)
|
|
|
|
set(LIBRARY_OUTPUT_PATH ${Wireshark_BINARY_DIR}/run CACHE INTERNAL
|
|
|
|
"Single output directory for building all libraries.")
|
|
|
|
endif()
|
2015-01-15 21:07:48 +00:00
|
|
|
|
2014-06-21 09:10:38 +00:00
|
|
|
# Under linux the release mode (CMAKE_BUILD_TYPE=release) defines NDEBUG
|
|
|
|
#Defines CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_DATADIR, etc ...
|
|
|
|
include(CMakeInstallDirs)
|
2013-11-04 20:29:29 +00:00
|
|
|
|
2015-01-10 22:41:55 +00:00
|
|
|
set(PROJECT_MAJOR_VERSION 1)
|
|
|
|
set(PROJECT_MINOR_VERSION 99)
|
2015-03-05 20:15:53 +00:00
|
|
|
set(PROJECT_PATCH_VERSION 4)
|
2015-01-10 21:29:57 +00:00
|
|
|
set(PROJECT_VERSION_EXTENSION "$ENV{WIRESHARK_VERSION_EXTRA}")
|
2015-01-10 22:41:55 +00:00
|
|
|
set(PROJECT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION})
|
2012-09-18 21:42:13 +00:00
|
|
|
|
2015-02-10 21:48:48 +00:00
|
|
|
# Banner shown at top right of Qt welcome screen.
|
|
|
|
if(DEFINED ENV{WIRESHARK_VERSION_FLAVOR})
|
|
|
|
set(VERSION_FLAVOR "$ENV{WIRESHARK_VERSION_FLAVOR}")
|
|
|
|
else()
|
|
|
|
set(VERSION_FLAVOR "Development Build")
|
|
|
|
endif()
|
|
|
|
|
2015-01-10 21:29:57 +00:00
|
|
|
# These are required in .rc files and manifests
|
|
|
|
set(VERSION_MAJOR ${PROJECT_MAJOR_VERSION})
|
|
|
|
set(VERSION_MINOR ${PROJECT_MINOR_VERSION})
|
|
|
|
set(VERSION_MICRO ${PROJECT_PATCH_VERSION})
|
|
|
|
set(RC_VERSION ${PROJECT_MAJOR_VERSION},${PROJECT_MINOR_VERSION},${PROJECT_PATCH_VERSION},0)
|
|
|
|
|
2010-03-07 19:40:25 +00:00
|
|
|
message(STATUS "V: ${PROJECT_VERSION}, MaV: ${PROJECT_MAJOR_VERSION}, MiV: ${PROJECT_MINOR_VERSION}, PL: ${PROJECT_PATCH_VERSION}, EV: ${PROJECT_VERSION_EXTENSION}.")
|
|
|
|
|
2013-12-01 21:55:21 +00:00
|
|
|
include(UseLemon)
|
|
|
|
include(UseMakeDissectorReg)
|
|
|
|
include(UseMakeTapReg)
|
|
|
|
include(UseAsn2Wrs)
|
2006-10-26 15:36:50 +00:00
|
|
|
|
|
|
|
include_directories(
|
2009-09-02 16:33:01 +00:00
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}
|
2009-09-07 07:26:43 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/epan
|
|
|
|
${CMAKE_SOURCE_DIR}/tools/lemon
|
2009-09-02 16:33:01 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/wiretap
|
2006-10-26 15:36:50 +00:00
|
|
|
)
|
2006-09-05 09:27:22 +00:00
|
|
|
|
2014-01-19 00:48:22 +00:00
|
|
|
include( CMakeOptions.txt )
|
|
|
|
if( DUMPCAP_INSTALL_OPTION STREQUAL "suid" )
|
|
|
|
set( DUMPCAP_SETUID "SETUID" )
|
|
|
|
else()
|
|
|
|
set( DUMPCAP_SETUID )
|
|
|
|
endif()
|
|
|
|
if( NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
|
|
|
|
DUMPCAP_INSTALL_OPTION STREQUAL "capabilities" )
|
|
|
|
message( WARNING "Capabilities are only supported on Linux" )
|
|
|
|
set( DUMPCAP_INSTALL_OPTION )
|
|
|
|
endif()
|
2009-09-09 13:20:33 +00:00
|
|
|
|
2013-09-23 21:45:55 +00:00
|
|
|
if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
2013-11-29 21:07:23 +00:00
|
|
|
if (MSVC10)
|
|
|
|
set(MSC_VER_REQUIRED 1600)
|
|
|
|
elseif(MSVC11)
|
|
|
|
set(MSC_VER_REQUIRED 1700)
|
|
|
|
elseif(MSVC12)
|
|
|
|
set(MSC_VER_REQUIRED 1800)
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "You are using an unsupported version of MSVC")
|
|
|
|
endif()
|
2013-11-17 14:03:58 +00:00
|
|
|
set(LOCAL_CFLAGS
|
|
|
|
/DWIN32_LEAN_AND_MEAN
|
|
|
|
"/DMSC_VER_REQUIRED=${MSC_VER_REQUIRED}"
|
|
|
|
/D_CRT_SECURE_NO_DEPRECATE
|
|
|
|
/D_CRT_NONSTDC_NO_DEPRECATE
|
|
|
|
/MP
|
|
|
|
# NOMINMAX keeps windows.h from defining "min" and "max" via windef.h.
|
|
|
|
# This avoids conflicts with the C++ standard library.
|
|
|
|
/DNOMINMAX
|
2014-06-20 21:59:29 +00:00
|
|
|
# -DPSAPI_VERSION=1 Programs that must run on earlier versions of Windows as well as Windows 7 and later
|
|
|
|
# versions should always call this function as GetProcessMemoryInfo. To ensure correct
|
|
|
|
# resolution of symbols, add Psapi.lib to the TARGETLIBS macro and compile the program
|
|
|
|
# with -DPSAPI_VERSION=1.To use run-time dynamic linking, load Psapi.dll.
|
|
|
|
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
|
|
|
|
# -DBUILD_WINDOWS Starting from VS2013, GetVersionEx is deprecated and we are recommended to use
|
|
|
|
# VerifyVersionInfo instead
|
|
|
|
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms724429(v=vs.85).aspx
|
|
|
|
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms725491(v=vs.85).aspx
|
|
|
|
# To continue to use GetVersionEx, we can define BUILD_WINDOWS
|
|
|
|
# -D_ALLOW_KEYWORD_MACROS For VS2012 onwards the, C++ STL does not permit macro redefinitions of keywords
|
|
|
|
# (see http://msdn.microsoft.com/en-us/library/bb531344(v=vs.110).aspx)
|
|
|
|
# This definition prevents the complaint about the redefinition of inline by WinPCap
|
2014-08-28 23:48:53 +00:00
|
|
|
# in pcap-stdinc.h when compiling CPP files, e.g. the Qt UI
|
2014-06-20 21:59:29 +00:00
|
|
|
/DPSAPI_VERSION=1
|
|
|
|
/DBUILD_WINDOWS
|
|
|
|
/D_ALLOW_KEYWORD_MACROS
|
2013-11-17 14:03:58 +00:00
|
|
|
)
|
|
|
|
|
2014-09-27 08:37:11 +00:00
|
|
|
if(MSVC12)
|
|
|
|
# /Zo Enhanced debugging of optimised codem for VS2013 Update 3 and beyond,
|
|
|
|
# Assume all VS2013 builds are at least Update 3.
|
|
|
|
# See http://msdn.microsoft.com/en-us/library/dn785163.aspx
|
|
|
|
set(LOCAL_CFLAGS ${LOCAL_CFLAGS} "/Zo")
|
|
|
|
endif()
|
|
|
|
|
2013-11-17 14:03:58 +00:00
|
|
|
if(NOT WIN64)
|
|
|
|
set(LOCAL_CFLAGS ${LOCAL_CFLAGS} "/D_BIND_TO_CURRENT_CRT_VERSION=1")
|
|
|
|
endif()
|
|
|
|
|
2015-01-06 18:44:37 +00:00
|
|
|
if(ENABLE_CODE_ANALYSIS)
|
|
|
|
set(LOCAL_CFLAGS ${LOCAL_CFLAGS} "/analyze:WX-")
|
|
|
|
endif()
|
|
|
|
|
2013-11-17 14:03:58 +00:00
|
|
|
# Additional compiler warnings to be treated as "Level 3"
|
|
|
|
# when compiling Wireshark sources. (Selected from "level 4" warnings).
|
|
|
|
## 4295: array is too small to include a terminating null character
|
2014-08-20 12:31:19 +00:00
|
|
|
## 4189: local variable is initialized but not referenced
|
|
|
|
set(WARNINGS_CFLAGS "/w34295 /w34189")
|
2013-11-17 14:03:58 +00:00
|
|
|
|
2013-12-01 10:05:16 +00:00
|
|
|
# FIXME: WINPCAP_VERSION cannot be determined from source or executable.
|
|
|
|
set(WINPCAP_VERSION "unknown")
|
2014-06-13 15:14:25 +00:00
|
|
|
set(WIRESHARK_COMMON_FLAGS
|
2013-12-01 10:05:16 +00:00
|
|
|
"/DWINPCAP_VERSION=${WINPCAP_VERSION}"
|
2013-11-17 14:03:58 +00:00
|
|
|
${LOCAL_CFLAGS}
|
|
|
|
${WARNINGS_CFLAGS}
|
|
|
|
)
|
2014-11-18 15:59:44 +00:00
|
|
|
|
|
|
|
# Set in Makefile.nmake
|
2014-09-27 08:37:11 +00:00
|
|
|
set(WS_LINK_FLAGS "/LARGEADDRESSAWARE /MANIFEST:NO /INCREMENTAL:NO /RELEASE")
|
2014-11-18 15:59:44 +00:00
|
|
|
|
2013-09-23 21:45:55 +00:00
|
|
|
else()
|
2014-08-04 06:39:05 +00:00
|
|
|
if(CMAKE_OSX_DEPLOYMENT_TARGET)
|
2014-08-03 20:07:46 +00:00
|
|
|
if(APPLE)
|
2014-08-04 06:39:05 +00:00
|
|
|
if(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.0")
|
2014-08-03 20:07:46 +00:00
|
|
|
message(FATAL_ERROR "We don't support building for OS X 10.0")
|
2014-08-04 06:39:05 +00:00
|
|
|
elseif(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.1")
|
2014-08-03 20:07:46 +00:00
|
|
|
message(FATAL_ERROR "We don't support building for OS X 10.1")
|
2014-08-04 06:39:05 +00:00
|
|
|
elseif(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.2")
|
2014-08-03 20:07:46 +00:00
|
|
|
message(FATAL_ERROR "We don't support building for OS X 10.2")
|
2014-08-04 06:39:05 +00:00
|
|
|
elseif(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.4" OR ${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5")
|
2014-08-03 20:07:46 +00:00
|
|
|
#
|
|
|
|
# Only 32-bit builds are supported. 10.5
|
|
|
|
# (and 10.4?) had a bug that causes some BPF
|
|
|
|
# functions not to work with 64-bit userland
|
2015-01-15 11:45:02 +00:00
|
|
|
# code, so capturing won't work.
|
2014-08-03 20:07:46 +00:00
|
|
|
#
|
|
|
|
set(CMAKE_C_FLAGS "-m32 ${CMAKE_C_FLAGS}")
|
|
|
|
set(CMAKE_CXX_FLAGS "-m32 ${CMAKE_CXX_FLAGS}")
|
|
|
|
set(WS_LINK_FLAGS "-m32 ${WS_LINK_FLAGS}")
|
|
|
|
endif()
|
2014-08-04 06:39:05 +00:00
|
|
|
message(STATUS "Building for OS X ${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
2014-08-03 20:07:46 +00:00
|
|
|
else()
|
2014-08-04 06:39:05 +00:00
|
|
|
message(FATAL_ERROR "CMAKE_OSX_DEPLOYMENT_TARGET only applies when building for OS X")
|
2014-08-03 20:07:46 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2014-06-13 15:14:25 +00:00
|
|
|
set(WIRESHARK_COMMON_FLAGS
|
2014-08-02 23:26:50 +00:00
|
|
|
# The following are for C and C++
|
2013-11-17 14:03:58 +00:00
|
|
|
# -O<X> and -g get set by the CMAKE_BUILD_TYPE
|
|
|
|
-Wall
|
|
|
|
-W
|
|
|
|
-Wextra
|
|
|
|
-Wendif-labels
|
|
|
|
-Wpointer-arith
|
|
|
|
-Warray-bounds
|
|
|
|
-Wformat-security
|
2014-08-03 00:46:32 +00:00
|
|
|
-fwrapv
|
|
|
|
-fno-strict-overflow
|
|
|
|
-fno-delete-null-pointer-checks
|
2014-11-05 20:10:07 +00:00
|
|
|
-fsanitize=undefined # compile and runtime checks
|
|
|
|
# -fsanitize=float-divide-by-zero
|
|
|
|
# -fsanitize=float-cast-overflow
|
|
|
|
# -fsanitize=address
|
|
|
|
# -fno-sanitize-recover # Abort during runtime
|
2013-11-17 14:03:58 +00:00
|
|
|
-Wvla
|
|
|
|
-Waddress
|
|
|
|
-Wattributes
|
|
|
|
-Wdiv-by-zero
|
|
|
|
-Wignored-qualifiers
|
2014-04-20 22:44:53 +00:00
|
|
|
-Wpragmas
|
2013-11-17 14:03:58 +00:00
|
|
|
-Wno-overlength-strings
|
|
|
|
-Wwrite-strings
|
|
|
|
-Wno-long-long
|
2014-04-20 22:44:53 +00:00
|
|
|
-Wheader-guard
|
2014-11-02 15:15:31 +00:00
|
|
|
-Wunused-const-variable
|
2013-11-17 14:03:58 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(WIRESHARK_C_ONLY_FLAGS
|
|
|
|
# The following are C only, not C++
|
|
|
|
-Wc++-compat
|
|
|
|
-Wdeclaration-after-statement
|
|
|
|
-Wshadow
|
|
|
|
-Wno-pointer-sign
|
|
|
|
-Wold-style-definition
|
|
|
|
-Wstrict-prototypes
|
|
|
|
-Wlogical-op
|
|
|
|
-Wjump-misses-init
|
2014-01-03 00:14:46 +00:00
|
|
|
# The Qt headers generate a ton of shortening errors on 64-bit systems
|
|
|
|
# so only enable this for C for now.
|
|
|
|
-Wshorten-64-to-32
|
2013-11-17 14:03:58 +00:00
|
|
|
)
|
|
|
|
|
2014-01-07 23:08:42 +00:00
|
|
|
set(WIRESHARK_CPP_ONLY_FLAGS
|
|
|
|
)
|
|
|
|
|
2014-06-13 15:14:25 +00:00
|
|
|
set(WIRESHARK_EXTRA_COMPILER_COMMON_FLAGS
|
2014-08-02 23:26:50 +00:00
|
|
|
# The following are for C and C++
|
2015-02-14 21:36:45 +00:00
|
|
|
-Wpedantic
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
|
|
|
# Various code blocks this one.
|
|
|
|
#
|
Get rid of debugging output, and get CMake to produce verbose makefiles.
On the 32-bit OS X buildbot, automake is old enough that autotools
builds are verbose, printing the command line for each compile step; if
we cause CMake to produce verbose makefiles, they will also print the
command line, so we can see what differences there are.
This means the other debugging output we added isn't necessary; remove
it.
Sort the extra warning options in configure.ac based on whether they're
for C and C++ or just C, just as is the case in CMake, to make it easier
to keep the lists in sync; add comments to configure.ac to mirror the
ones in CMakeLists.txt.
Get rid of -Wno-deprecated-declarations; the CMake build doesn't use it,
and it doesn't appear to be necessary - if we ever have problems with OS
X complaining about using OpenSSL, for example, we should do as tcpdump
does and wrap uses of the "deprecated"-but-cross-platform APIs in
the appropriate pragmas.
Change-Id: I0b8b45f00481ac2b67da5c7dd028a029b130dcc4
Reviewed-on: https://code.wireshark.org/review/3377
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-03 10:40:11 +00:00
|
|
|
-Woverflow
|
2013-11-17 14:03:58 +00:00
|
|
|
-fstrict-overflow -Wstrict-overflow=4
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
|
|
|
# Due to various places where APIs we don't control
|
|
|
|
# require us to cast away constness, we can probably
|
|
|
|
# never enable this one with -Werror.
|
|
|
|
#
|
2013-11-17 14:03:58 +00:00
|
|
|
-Wcast-qual
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
|
|
|
# Some generated ASN.1 dissectors block this one;
|
|
|
|
# multiple function declarations for the same
|
|
|
|
# function are being generated.
|
|
|
|
#
|
2013-11-17 14:03:58 +00:00
|
|
|
-Wredundant-decls
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
|
|
|
# Some loops are safe, but it's hard to convince the
|
|
|
|
# compiler of that.
|
|
|
|
#
|
|
|
|
-Wunsafe-loop-optimizations
|
|
|
|
#
|
Get rid of debugging output, and get CMake to produce verbose makefiles.
On the 32-bit OS X buildbot, automake is old enough that autotools
builds are verbose, printing the command line for each compile step; if
we cause CMake to produce verbose makefiles, they will also print the
command line, so we can see what differences there are.
This means the other debugging output we added isn't necessary; remove
it.
Sort the extra warning options in configure.ac based on whether they're
for C and C++ or just C, just as is the case in CMake, to make it easier
to keep the lists in sync; add comments to configure.ac to mirror the
ones in CMakeLists.txt.
Get rid of -Wno-deprecated-declarations; the CMake build doesn't use it,
and it doesn't appear to be necessary - if we ever have problems with OS
X complaining about using OpenSSL, for example, we should do as tcpdump
does and wrap uses of the "deprecated"-but-cross-platform APIs in
the appropriate pragmas.
Change-Id: I0b8b45f00481ac2b67da5c7dd028a029b130dcc4
Reviewed-on: https://code.wireshark.org/review/3377
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-03 10:40:11 +00:00
|
|
|
# All the registration functions block these for now.
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
Get rid of debugging output, and get CMake to produce verbose makefiles.
On the 32-bit OS X buildbot, automake is old enough that autotools
builds are verbose, printing the command line for each compile step; if
we cause CMake to produce verbose makefiles, they will also print the
command line, so we can see what differences there are.
This means the other debugging output we added isn't necessary; remove
it.
Sort the extra warning options in configure.ac based on whether they're
for C and C++ or just C, just as is the case in CMake, to make it easier
to keep the lists in sync; add comments to configure.ac to mirror the
ones in CMakeLists.txt.
Get rid of -Wno-deprecated-declarations; the CMake build doesn't use it,
and it doesn't appear to be necessary - if we ever have problems with OS
X complaining about using OpenSSL, for example, we should do as tcpdump
does and wrap uses of the "deprecated"-but-cross-platform APIs in
the appropriate pragmas.
Change-Id: I0b8b45f00481ac2b67da5c7dd028a029b130dcc4
Reviewed-on: https://code.wireshark.org/review/3377
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-03 10:40:11 +00:00
|
|
|
-Wmissing-prototypes
|
2014-04-20 22:44:53 +00:00
|
|
|
-Wmissing-declarations
|
|
|
|
#
|
|
|
|
# A bunch of "that might not work on SPARC" code blocks
|
|
|
|
# this one for now.
|
|
|
|
#
|
|
|
|
-Wcast-align
|
|
|
|
#
|
2014-05-22 17:23:22 +00:00
|
|
|
# Works only with Clang
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
|
|
|
-Wunreachable-code
|
|
|
|
#
|
2014-05-22 17:23:22 +00:00
|
|
|
# Works only with Clang but generates a lot of warnings
|
|
|
|
# (about glib library not using Doxygen)
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
|
|
|
-Wdocumentation
|
2013-11-17 14:03:58 +00:00
|
|
|
)
|
|
|
|
|
2014-04-20 22:44:53 +00:00
|
|
|
set(WIRESHARK_EXTRA_COMPILER_C_ONLY_FLAGS
|
2013-11-17 14:03:58 +00:00
|
|
|
# The following are C only, not C++
|
2014-04-20 22:44:53 +00:00
|
|
|
#
|
|
|
|
# Due to various places where APIs we don't control
|
|
|
|
# require us to cast away constness, we can probably
|
|
|
|
# never enable this one with -Werror.
|
|
|
|
#
|
2013-11-17 14:03:58 +00:00
|
|
|
-Wbad-function-cast
|
|
|
|
)
|
|
|
|
|
2014-04-20 22:44:53 +00:00
|
|
|
set(WIRESHARK_EXTRA_COMPILER_CPP_ONLY_FLAGS
|
2014-01-07 23:08:42 +00:00
|
|
|
)
|
|
|
|
|
2013-11-17 14:03:58 +00:00
|
|
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
2014-06-13 15:14:25 +00:00
|
|
|
set(WIRESHARK_COMMON_FLAGS ${WIRESHARK_COMMON_FLAGS}
|
2013-11-17 14:03:58 +00:00
|
|
|
#-fcolor-diagnostics
|
2014-07-11 22:21:04 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# ccache + clang++ can result in "argument unused during
|
|
|
|
# compilation" warnings.
|
|
|
|
set(WIRESHARK_CPP_ONLY_FLAGS ${WIRESHARK_CPP_ONLY_FLAGS}
|
|
|
|
-Qunused-arguments
|
|
|
|
)
|
2013-11-17 14:03:58 +00:00
|
|
|
else()
|
2014-06-13 15:14:25 +00:00
|
|
|
set(WIRESHARK_COMMON_FLAGS ${WIRESHARK_COMMON_FLAGS}
|
2013-11-17 14:03:58 +00:00
|
|
|
-fexcess-precision=fast
|
|
|
|
)
|
|
|
|
|
|
|
|
set(WIRESHARK_C_ONLY_FLAGS ${WIRESHARK_C_ONLY_FLAGS}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-05-22 19:44:06 +00:00
|
|
|
set(WIRESHARK_ASAN_FLAGS
|
|
|
|
# With Clang >= 3.5 Leak detection is enable by default
|
|
|
|
# and no yet all leak is fixed...
|
|
|
|
# use ASAN_OPTIONS=detect_leaks=0 to disable detect_leaks
|
|
|
|
-fsanitize=address
|
|
|
|
)
|
|
|
|
|
|
|
|
if(ENABLE_ASAN)
|
|
|
|
set(WIRESHARK_COMMON_FLAGS ${WIRESHARK_COMMON_FLAGS} ${WIRESHARK_ASAN_FLAGS})
|
|
|
|
endif()
|
|
|
|
|
2014-04-20 23:54:21 +00:00
|
|
|
if(ENABLE_EXTRA_COMPILER_WARNINGS) # This overrides -Werror
|
2014-06-13 15:14:25 +00:00
|
|
|
set(WIRESHARK_COMMON_FLAGS ${WIRESHARK_COMMON_FLAGS} ${WIRESHARK_EXTRA_COMPILER_COMMON_FLAGS})
|
2014-04-20 22:44:53 +00:00
|
|
|
set(WIRESHARK_C_ONLY_FLAGS ${WIRESHARK_C_ONLY_FLAGS} ${WIRESHARK_EXTRA_COMPILER_C_ONLY_FLAGS})
|
|
|
|
set(WIRESHARK_CPP_ONLY_FLAGS ${WIRESHARK_CPP_ONLY_FLAGS} ${WIRESHARK_EXTRA_COMPILER_CPP_ONLY_FLAGS})
|
2014-03-15 11:52:29 +00:00
|
|
|
endif()
|
|
|
|
|
2013-11-17 14:03:58 +00:00
|
|
|
add_definitions(
|
|
|
|
-DG_DISABLE_DEPRECATED
|
|
|
|
-DG_DISABLE_SINGLE_INCLUDES
|
|
|
|
)
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2006-10-26 15:36:50 +00:00
|
|
|
|
2014-06-13 15:14:25 +00:00
|
|
|
set( C_FLAG_TESTS ${WIRESHARK_COMMON_FLAGS} ${WIRESHARK_C_ONLY_FLAGS} )
|
|
|
|
set( CPP_FLAG_TESTS ${WIRESHARK_COMMON_FLAGS} ${WIRESHARK_CPP_ONLY_FLAGS} )
|
2014-01-07 23:08:42 +00:00
|
|
|
|
2009-09-24 20:42:08 +00:00
|
|
|
# Counterhack to work around some cache magic in CHECK_C_SOURCE_COMPILES
|
2009-09-14 06:51:22 +00:00
|
|
|
include(CheckCCompilerFlag)
|
2014-01-03 00:40:21 +00:00
|
|
|
include(CheckCXXCompilerFlag)
|
2013-07-21 18:12:20 +00:00
|
|
|
|
2014-04-20 23:54:21 +00:00
|
|
|
if(NOT DISABLE_WERROR AND NOT ENABLE_EXTRA_COMPILER_WARNINGS)
|
2013-07-21 18:12:20 +00:00
|
|
|
check_c_compiler_flag(-Werror WERROR)
|
|
|
|
else()
|
2014-04-08 08:40:09 +00:00
|
|
|
set(WERROR FALSE)
|
2013-07-21 18:12:20 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-24 20:42:08 +00:00
|
|
|
# Sigh: Have to use THIS_FLAG instead of ${F} for some reason
|
2014-01-07 23:08:42 +00:00
|
|
|
foreach(THIS_FLAG ${C_FLAG_TESTS})
|
|
|
|
string( REGEX REPLACE "[^a-zA-Z0-9_]+" "_" F ${THIS_FLAG} )
|
2009-09-24 20:42:08 +00:00
|
|
|
set(${F} ${THIS_FLAG})
|
2014-01-07 23:08:42 +00:00
|
|
|
set(V C_${F}_VALID)
|
|
|
|
message(STATUS "Checking for c-compiler flag: ${THIS_FLAG}")
|
2014-08-02 22:43:36 +00:00
|
|
|
check_c_compiler_flag("${ADDED_CMAKE_C_FLAGS} ${${F}}" ${V})
|
2009-09-24 20:42:08 +00:00
|
|
|
if (${${V}})
|
2014-06-30 15:56:28 +00:00
|
|
|
set(ADDED_CMAKE_C_FLAGS "${ADDED_CMAKE_C_FLAGS} ${${F}}")
|
2014-01-03 00:40:21 +00:00
|
|
|
endif()
|
|
|
|
endforeach()
|
2014-06-30 15:56:28 +00:00
|
|
|
set(CMAKE_C_FLAGS "${ADDED_CMAKE_C_FLAGS} ${CMAKE_C_FLAGS}")
|
|
|
|
|
2014-01-07 23:08:42 +00:00
|
|
|
foreach(THIS_FLAG ${CPP_FLAG_TESTS})
|
|
|
|
string( REGEX REPLACE "[^a-zA-Z0-9_]+" "_" F ${THIS_FLAG} )
|
2014-01-03 00:40:21 +00:00
|
|
|
set(${F} ${THIS_FLAG})
|
2014-01-07 23:08:42 +00:00
|
|
|
set(V CPP_${F}_VALID)
|
|
|
|
message(STATUS "Checking for c++-compiler flag: ${THIS_FLAG}")
|
2014-08-02 22:43:36 +00:00
|
|
|
check_cxx_compiler_flag("${ADDED_CMAKE_CXX_FLAGS} ${${F}}" ${V})
|
2014-01-03 00:40:21 +00:00
|
|
|
if (${${V}})
|
2014-06-30 15:56:28 +00:00
|
|
|
set(ADDED_CMAKE_CXX_FLAGS "${ADDED_CMAKE_CXX_FLAGS} ${${F}}")
|
2012-08-23 12:30:16 +00:00
|
|
|
endif()
|
2009-09-14 06:51:22 +00:00
|
|
|
endforeach()
|
2014-06-30 15:56:28 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${ADDED_CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
|
|
|
|
|
2015-01-21 09:00:43 +00:00
|
|
|
#
|
|
|
|
# Try to have the compiler default to hiding symbols, so that only
|
|
|
|
# symbols explicitly exported with WS_DLL_PUBLIC will be visible
|
|
|
|
# outside (shared) libraries; that way, more UN*X builds will catch
|
|
|
|
# failures to export symbols, rather than having that fail only on
|
|
|
|
# Windows.
|
|
|
|
#
|
|
|
|
# We don't need that with MSVC, as that's the default.
|
|
|
|
#
|
|
|
|
if( NOT CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
|
|
|
#
|
|
|
|
# Try the GCC-and-copatible -fvisibility-hidden first.
|
|
|
|
#
|
|
|
|
check_c_compiler_flag(-fvisibility=hidden FVHIDDEN)
|
|
|
|
if(FVHIDDEN)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
|
|
|
else()
|
|
|
|
#
|
|
|
|
# OK, try the Sun^WOracle C -xldscope=hidden
|
|
|
|
#
|
|
|
|
check_c_compiler_flag(-xldscope=hidden XLDSCOPEHIDDEN)
|
|
|
|
if(XLDSCOPEHIDDEN)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -xldscope=hidden")
|
|
|
|
else()
|
|
|
|
#
|
|
|
|
# Anything else?
|
|
|
|
# If there is anything else, we might want to
|
|
|
|
# make a list of options to try, and try them
|
|
|
|
# in a loop.
|
|
|
|
#
|
|
|
|
message(WARNING "Hiding shared library symbols is not supported by the compiler."
|
|
|
|
" All shared library symbols will be exported.")
|
|
|
|
endif()
|
2014-06-16 19:12:30 +00:00
|
|
|
endif()
|
2013-02-28 14:09:46 +00:00
|
|
|
endif()
|
|
|
|
|
2013-07-22 09:36:14 +00:00
|
|
|
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
2012-02-02 12:04:22 +00:00
|
|
|
set (C_UNUSED "__attribute__((unused))" )
|
2009-08-27 16:11:16 +00:00
|
|
|
else()
|
2012-02-02 12:04:22 +00:00
|
|
|
set (C_UNUSED "" )
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2006-10-24 17:39:32 +00:00
|
|
|
|
2013-10-10 20:35:32 +00:00
|
|
|
|
2014-11-18 15:59:44 +00:00
|
|
|
if(NOT CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
2013-10-10 20:35:32 +00:00
|
|
|
set(WIRESHARK_LD_FLAGS
|
|
|
|
-Wl,--as-needed
|
|
|
|
# -flto
|
|
|
|
# -fwhopr
|
|
|
|
# -fwhole-program
|
|
|
|
)
|
|
|
|
endif()
|
2010-03-18 10:27:17 +00:00
|
|
|
|
|
|
|
include(CheckCLinkerFlag)
|
|
|
|
set(C 0)
|
|
|
|
# Sigh: Have to use THIS_FLAG instead of ${F} for some reason
|
|
|
|
foreach(THIS_FLAG ${WIRESHARK_LD_FLAGS})
|
|
|
|
set(F WS_LD_FLAG_${C})
|
|
|
|
set(${F} ${THIS_FLAG})
|
|
|
|
set(V WS_LD_FLAG_VALID${C})
|
|
|
|
check_c_linker_flag(${${F}} ${V})
|
|
|
|
if (${${V}})
|
2014-07-02 15:43:17 +00:00
|
|
|
set(WS_LINK_FLAGS "${WS_LINK_FLAGS} ${${F}}")
|
2010-03-18 10:27:17 +00:00
|
|
|
endif()
|
|
|
|
math(EXPR C "${C} + 1")
|
|
|
|
endforeach()
|
2009-11-07 10:08:36 +00:00
|
|
|
|
2009-11-17 11:58:36 +00:00
|
|
|
if(ENABLE_STATIC)
|
2014-05-20 20:47:08 +00:00
|
|
|
set(LINK_MODE_LIB STATIC)
|
|
|
|
set(LINK_MODE_MODULE STATIC)
|
2009-11-17 11:58:36 +00:00
|
|
|
else()
|
2014-05-20 20:47:08 +00:00
|
|
|
set(LINK_MODE_LIB SHARED)
|
|
|
|
set(LINK_MODE_MODULE MODULE)
|
2009-11-17 11:58:36 +00:00
|
|
|
endif()
|
2009-09-14 06:51:22 +00:00
|
|
|
|
2013-09-10 21:24:52 +00:00
|
|
|
if(APPLE AND EXISTS /usr/local/opt/gettext)
|
|
|
|
# GLib on OS X requires libintl. Homebrew installs gettext (and
|
|
|
|
# libintl) in /usr/local/opt/gettext
|
|
|
|
include_directories(/usr/local/opt/gettext/include)
|
|
|
|
link_directories(/usr/local/opt/gettext/lib)
|
|
|
|
endif()
|
|
|
|
|
2010-05-24 21:59:29 +00:00
|
|
|
# The packagelist is doing some magic: If we add XXX to the packagelist, we
|
|
|
|
# - may optionally set XXX_OPTIONS to pass to the find_package command
|
|
|
|
# - will call FindXXX.cmake
|
|
|
|
# - return found libraries in XXX_LIBRARIES
|
|
|
|
# - return found include in XXX_INCLUDE_DIRS
|
|
|
|
# - set HAVE_XXX
|
|
|
|
|
2006-10-24 17:39:32 +00:00
|
|
|
#The minimum package list
|
2014-06-18 19:25:12 +00:00
|
|
|
set(PACKAGELIST Gettext M GLIB2 GMODULE2 GTHREAD2 LEX YACC Perl SED SH PythonInterp)
|
2014-11-27 10:24:40 +00:00
|
|
|
set(LEX_REQUIRED TRUE)
|
2014-05-05 03:06:43 +00:00
|
|
|
set(GLIB2_REQUIRED TRUE)
|
|
|
|
set(GLIB2_FIND_REQUIRED TRUE)
|
2011-07-12 21:24:15 +00:00
|
|
|
set(GLIB2_MIN_VERSION 2.14.0)
|
2014-05-05 03:06:43 +00:00
|
|
|
set(GTHREAD2_REQUIRED TRUE)
|
2013-05-01 00:53:59 +00:00
|
|
|
set(PythonInterp_FIND_VERSION 2)
|
2013-08-03 00:39:27 +00:00
|
|
|
set(Python_ADDITIONAL_VERSIONS 3)
|
2014-11-27 10:24:40 +00:00
|
|
|
set(YACC_REQUIRED TRUE)
|
2015-01-15 21:07:48 +00:00
|
|
|
|
|
|
|
if (WIN32)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} PowerShell)
|
|
|
|
set(PowerShell_REQUIRED TRUE)
|
|
|
|
else()
|
2014-06-08 14:35:29 +00:00
|
|
|
set(M_REQUIRED TRUE)
|
|
|
|
endif()
|
2010-10-01 08:40:52 +00:00
|
|
|
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} HtmlViewer)
|
2010-09-28 19:23:15 +00:00
|
|
|
|
2011-08-30 11:44:21 +00:00
|
|
|
if(ENABLE_PCAP)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} PCAP)
|
|
|
|
endif()
|
|
|
|
|
2013-10-10 20:35:32 +00:00
|
|
|
if(ENABLE_AIRPCAP)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} AIRPCAP)
|
|
|
|
endif()
|
|
|
|
|
2012-02-02 00:46:02 +00:00
|
|
|
# Build the GTK-GUI?
|
2014-08-28 23:48:53 +00:00
|
|
|
if(BUILD_wireshark_gtk)
|
2011-06-08 18:10:03 +00:00
|
|
|
if(ENABLE_GTK3)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} GTK3)
|
|
|
|
else()
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} GTK2)
|
|
|
|
set(GTK2_OPTIONS COMPONENTS gtk)
|
2011-07-12 21:24:15 +00:00
|
|
|
set(GTK2_FIND_VERSION 2.12)
|
2011-06-08 18:10:03 +00:00
|
|
|
set(GTK2_DEBUG false)
|
|
|
|
endif()
|
2011-05-12 21:13:00 +00:00
|
|
|
endif()
|
|
|
|
|
2012-02-02 00:46:02 +00:00
|
|
|
# Build the Qt GUI?
|
2014-08-28 23:48:53 +00:00
|
|
|
if(BUILD_wireshark)
|
2013-04-25 23:04:19 +00:00
|
|
|
if(ENABLE_QT5)
|
2013-10-10 09:10:53 +00:00
|
|
|
# Untested, may not work if CMAKE_PREFIX_PATH gets overwritten
|
|
|
|
# somewhere. The if WIN32 in this place is annoying as well.
|
|
|
|
if( WIN32 )
|
2013-10-11 11:43:37 +00:00
|
|
|
set( QT5_BASE_PATH "$ENV{QT5_BASE_DIR}" )
|
2013-12-02 09:50:30 +00:00
|
|
|
set( CMAKE_PREFIX_PATH "${QT5_BASE_PATH}" )
|
|
|
|
# Used for the creation of setpath.bat
|
2014-06-18 19:25:12 +00:00
|
|
|
set( QT5_DLL_PATH "${QT5_BASE_PATH}/bin" )
|
2013-10-11 11:11:41 +00:00
|
|
|
set( WS_ALL_LIBS ${WS_ALL_LIBS} ${QT5_DLL_PATH} )
|
2013-10-10 09:10:53 +00:00
|
|
|
endif()
|
2014-11-19 00:21:42 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST}
|
2015-01-13 21:32:12 +00:00
|
|
|
Qt5Core
|
2014-11-19 00:21:42 +00:00
|
|
|
Qt5LinguistTools
|
|
|
|
Qt5MultimediaWidgets
|
|
|
|
Qt5PrintSupport
|
|
|
|
Qt5Widgets
|
|
|
|
)
|
2014-05-16 19:43:17 +00:00
|
|
|
if (APPLE)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} Qt5MacExtras)
|
|
|
|
endif()
|
2014-08-13 15:10:44 +00:00
|
|
|
if( WIN32 )
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} Qt5WinExtras)
|
|
|
|
endif()
|
2014-05-16 19:43:17 +00:00
|
|
|
set(QT_VERSION 5)
|
2013-04-25 23:04:19 +00:00
|
|
|
else()
|
2013-05-01 09:20:59 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} Qt4)
|
|
|
|
# set(Qt4_OPTIONS 4.7.1 REQUIRED QtCore QtGui)
|
2013-04-28 01:09:00 +00:00
|
|
|
set(QT_VERSION 4)
|
2013-04-25 23:04:19 +00:00
|
|
|
endif()
|
2012-02-02 00:46:02 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-09 13:20:33 +00:00
|
|
|
# SMI SNMP
|
|
|
|
if(ENABLE_SMI)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} SMI)
|
2009-09-09 13:20:33 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# GNU crypto
|
|
|
|
if(ENABLE_GCRYPT)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} GCRYPT)
|
2009-09-09 13:20:33 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# GNU SSL/TLS support
|
|
|
|
if(ENABLE_GNUTLS)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} GNUTLS)
|
2009-09-09 13:20:33 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-10 07:04:54 +00:00
|
|
|
# Kerberos
|
|
|
|
if(ENABLE_KERBEROS)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} KERBEROS)
|
2009-09-10 07:04:54 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-09 13:20:33 +00:00
|
|
|
# Portable audio
|
2014-08-28 23:48:53 +00:00
|
|
|
if(ENABLE_PORTAUDIO AND BUILD_wireshark_gtk)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} PORTAUDIO)
|
2009-09-09 13:20:33 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2009-09-12 17:20:08 +00:00
|
|
|
# Prefer c-ares over adns
|
2013-11-17 14:03:58 +00:00
|
|
|
if(ENABLE_CARES) # C Asynchronouse resolver
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} CARES)
|
2013-11-17 14:03:58 +00:00
|
|
|
elseif(ENABLE_ADNS) # Gnu asynchronous DNS
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} ADNS)
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2006-10-24 17:39:32 +00:00
|
|
|
|
2009-09-09 13:20:33 +00:00
|
|
|
# Zlib compression
|
2010-04-01 10:10:48 +00:00
|
|
|
if(ENABLE_ZLIB)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} ZLIB)
|
2009-09-09 13:20:33 +00:00
|
|
|
endif()
|
|
|
|
|
2014-07-31 21:00:33 +00:00
|
|
|
# Embedded Lua interpreter
|
2009-09-09 13:20:33 +00:00
|
|
|
if(ENABLE_LUA)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} LUA)
|
2009-09-09 13:20:33 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-10 07:04:54 +00:00
|
|
|
# GeoIP address resolving
|
|
|
|
if(ENABLE_GEOIP)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} GEOIP)
|
2009-09-10 07:04:54 +00:00
|
|
|
endif()
|
|
|
|
|
2012-06-20 20:59:43 +00:00
|
|
|
if(ENABLE_NETLINK)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} NL)
|
|
|
|
endif()
|
|
|
|
|
2014-02-16 10:12:35 +00:00
|
|
|
if(ENABLE_SBC)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} SBC)
|
|
|
|
endif()
|
|
|
|
|
2009-09-10 07:04:54 +00:00
|
|
|
# Capabilities
|
|
|
|
if(ENABLE_CAP)
|
2014-01-19 00:48:22 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} CAP SETCAP)
|
2009-09-10 07:04:54 +00:00
|
|
|
endif()
|
|
|
|
|
2014-08-20 21:29:33 +00:00
|
|
|
# Windows version updates
|
|
|
|
if(ENABLE_WINSPARKLE)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} WINSPARKLE)
|
|
|
|
endif()
|
|
|
|
|
2014-06-18 19:25:12 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} YAPP)
|
2010-10-01 08:40:52 +00:00
|
|
|
|
2010-10-02 06:45:49 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} POD)
|
2009-09-12 17:20:08 +00:00
|
|
|
|
2014-12-11 00:50:56 +00:00
|
|
|
if(ENABLE_HTML_GUIDES)
|
2013-12-22 01:21:56 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} DOXYGEN)
|
|
|
|
endif()
|
|
|
|
|
2015-02-01 21:56:39 +00:00
|
|
|
set(PROGLIST)
|
2009-06-16 05:37:46 +00:00
|
|
|
|
2013-05-01 10:40:12 +00:00
|
|
|
#Sort the package list
|
|
|
|
list(SORT PACKAGELIST)
|
|
|
|
message(STATUS "Packagelist: ${PACKAGELIST}")
|
2009-08-29 09:13:28 +00:00
|
|
|
#Let's loop the package list
|
2006-09-06 22:28:19 +00:00
|
|
|
foreach(PACKAGE ${PACKAGELIST})
|
2013-05-01 09:20:59 +00:00
|
|
|
if(${PACKAGE} STREQUAL "Qt4")
|
|
|
|
set(PACKAGE_VAR "QT")
|
|
|
|
elseif(${PACKAGE} STREQUAL "PythonInterp")
|
2014-04-28 13:52:15 +00:00
|
|
|
set(PACKAGE_VAR "PYTHONINTERP")
|
|
|
|
elseif(${PACKAGE} STREQUAL "Gettext")
|
|
|
|
set(PACKAGE_VAR "GETTEXT")
|
|
|
|
elseif(${PACKAGE} STREQUAL "HtmlViewer")
|
2014-07-08 22:13:12 +00:00
|
|
|
set(PACKAGE_VAR "HTML_VIEWER")
|
2014-04-28 13:52:15 +00:00
|
|
|
elseif(${PACKAGE} STREQUAL "Perl")
|
|
|
|
set(PACKAGE_VAR "PERL")
|
2015-01-15 21:07:48 +00:00
|
|
|
elseif(${PACKAGE} STREQUAL "PowerShell")
|
|
|
|
set(PACKAGE_VAR "POWERSHELL")
|
2012-02-02 00:46:02 +00:00
|
|
|
else()
|
2013-05-01 09:20:59 +00:00
|
|
|
set(PACKAGE_VAR ${PACKAGE})
|
2012-02-02 00:46:02 +00:00
|
|
|
endif()
|
2010-03-04 23:35:43 +00:00
|
|
|
if(${PACKAGE}_OPTIONS)
|
2013-05-01 09:20:59 +00:00
|
|
|
find_package(${PACKAGE} ${${PACKAGE}_OPTIONS})
|
2010-10-01 08:40:52 +00:00
|
|
|
elseif(${PACKAGE}_REQUIRED)
|
2013-05-01 09:20:59 +00:00
|
|
|
find_package(${PACKAGE} REQUIRED)
|
2010-10-01 08:40:52 +00:00
|
|
|
else()
|
2013-05-01 09:20:59 +00:00
|
|
|
find_package(${PACKAGE})
|
2010-03-04 23:35:43 +00:00
|
|
|
endif()
|
2013-05-01 09:20:59 +00:00
|
|
|
if (${PACKAGE_VAR}_FOUND)
|
2014-04-28 13:52:15 +00:00
|
|
|
message("${PACKAGE_VAR} FOUND")
|
2013-05-01 09:20:59 +00:00
|
|
|
set(HAVE_LIB${PACKAGE_VAR} 1)
|
2015-02-17 21:33:15 +00:00
|
|
|
include_directories(SYSTEM ${${PACKAGE_VAR}_INCLUDE_DIRS})
|
2013-10-08 20:41:57 +00:00
|
|
|
set(WS_ALL_LIBS ${WS_ALL_LIBS} ${${PACKAGE_VAR}_LIBRARIES})
|
2013-05-01 09:20:59 +00:00
|
|
|
message(STATUS "${PACKAGE} includes: ${${PACKAGE_VAR}_INCLUDE_DIRS}")
|
|
|
|
message(STATUS "${PACKAGE} libs: ${${PACKAGE_VAR}_LIBRARIES}")
|
2013-04-25 23:04:19 +00:00
|
|
|
if (${PACKAGE}_DEFINITIONS)
|
2013-05-01 09:20:59 +00:00
|
|
|
message(STATUS "${PACKAGE} definitions: ${${PACKAGE_VAR}_DEFINITIONS}")
|
2013-04-25 23:04:19 +00:00
|
|
|
endif()
|
2013-05-01 09:20:59 +00:00
|
|
|
if (${PACKAGE_VAR}_EXECUTABLE)
|
|
|
|
message(STATUS "${PACKAGE} executable: ${${PACKAGE_VAR}_EXECUTABLE}")
|
2013-05-01 00:53:59 +00:00
|
|
|
endif()
|
2014-04-28 13:52:15 +00:00
|
|
|
else()
|
2014-05-05 03:11:45 +00:00
|
|
|
#
|
|
|
|
# Not finding a package is only a fatal error if the
|
|
|
|
# package is required; if it's required, then its
|
|
|
|
# XXX_REQUIRED variable is set to TRUE, and the above
|
|
|
|
# code will pass REQUIRED to find_package, and the
|
|
|
|
# configure will fail if the package isn't found.
|
|
|
|
#
|
|
|
|
# Do *NOT* report this as an error!
|
|
|
|
#
|
|
|
|
message("${PACKAGE_VAR} NOT FOUND")
|
2009-09-02 16:33:01 +00:00
|
|
|
endif()
|
2009-08-27 16:11:16 +00:00
|
|
|
endforeach()
|
2006-09-06 22:28:19 +00:00
|
|
|
|
2013-10-05 10:17:21 +00:00
|
|
|
# Provide Windows system lib names
|
|
|
|
include( UseWinLibs )
|
|
|
|
|
2013-10-10 13:37:15 +00:00
|
|
|
# Create file to set paths to run binaries from build dir
|
|
|
|
WSExtendPath( "${WS_ALL_LIBS}" "${CMAKE_BINARY_DIR}/setpath.bat" )
|
|
|
|
|
2009-12-29 12:12:26 +00:00
|
|
|
#packaging
|
|
|
|
include(CPackConfig.txt)
|
|
|
|
|
2014-08-22 10:53:27 +00:00
|
|
|
if(HAVE_LIBAIRPCAP)
|
|
|
|
set(HAVE_AIRPCAP 1)
|
|
|
|
endif()
|
2009-09-09 13:20:33 +00:00
|
|
|
if(HAVE_LIBLUA)
|
|
|
|
set(HAVE_LUA_H 1)
|
2012-06-25 20:42:07 +00:00
|
|
|
set(HAVE_LUA 1)
|
2009-09-09 13:20:33 +00:00
|
|
|
endif()
|
2009-09-10 07:04:54 +00:00
|
|
|
if(HAVE_LIBKERBEROS)
|
|
|
|
set(HAVE_KERBEROS 1)
|
|
|
|
# HAVE_HEIMDAL_KERBEROS
|
|
|
|
set(HAVE_MIT_KERBEROS 1)
|
|
|
|
set(HAVE_KEYTYPE_ARCFOUR_56 1)
|
|
|
|
endif()
|
2009-09-12 17:20:08 +00:00
|
|
|
if(HAVE_LIBGEOIP)
|
|
|
|
set(HAVE_GEOIP 1)
|
|
|
|
endif()
|
2009-09-09 13:20:33 +00:00
|
|
|
if(HAVE_LIBCARES)
|
|
|
|
set(HAVE_C_ARES 1)
|
2009-09-12 17:20:08 +00:00
|
|
|
endif()
|
|
|
|
if(HAVE_LIBADNS)
|
2009-09-07 07:26:43 +00:00
|
|
|
set(HAVE_GNU_ADNS 1)
|
|
|
|
endif()
|
2013-10-10 20:35:32 +00:00
|
|
|
if(HAVE_LIBNL AND HAVE_AIRPCAP)
|
2012-06-20 20:59:43 +00:00
|
|
|
message(ERROR "Airpcap and Libnl support are mutually exclusive")
|
|
|
|
endif()
|
2014-02-16 10:12:35 +00:00
|
|
|
if(HAVE_LIBSBC)
|
2014-05-20 20:47:08 +00:00
|
|
|
set(HAVE_SBC 1)
|
2014-02-16 10:12:35 +00:00
|
|
|
endif()
|
2014-08-20 21:29:33 +00:00
|
|
|
|
|
|
|
if (HAVE_LIBWINSPARKLE)
|
|
|
|
set(HAVE_SOFTWARE_UPDATE 1)
|
|
|
|
endif()
|
|
|
|
|
2011-06-08 18:10:03 +00:00
|
|
|
# No matter which version of GTK is present
|
|
|
|
if(GTK2_FOUND OR GTK3_FOUND)
|
|
|
|
set(GTK_FOUND ON)
|
|
|
|
endif()
|
2010-05-19 13:05:35 +00:00
|
|
|
# That's the name autofoo uses
|
|
|
|
if(HAVE_LIBZLIB)
|
|
|
|
set(HAVE_LIBZ 1)
|
2013-11-29 15:40:04 +00:00
|
|
|
# Always include the "true" zlib includes first. This works around a
|
|
|
|
# bug in the Windows setup of GTK[23] which has a faulty zconf.h.
|
|
|
|
include_directories(BEFORE ${ZLIB_INCLUDE_DIRS})
|
2010-05-19 13:05:35 +00:00
|
|
|
endif()
|
2013-04-25 23:04:19 +00:00
|
|
|
if (Qt5Widgets_FOUND)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|
|
|
if (Qt5_POSITION_INDEPENDENT_CODE)
|
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
endif()
|
|
|
|
set (QT_FOUND ON)
|
|
|
|
set (QT_LIBRARIES ${Qt5Widgets_LIBRARIES} ${Qt5PrintSupport_LIBRARIES})
|
2014-11-19 00:21:42 +00:00
|
|
|
if(Qt5MultimediaWidgets_FOUND)
|
|
|
|
set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5MultimediaWidgets_LIBRARIES})
|
|
|
|
# That's the name autofoo uses
|
|
|
|
set(QT_MULTIMEDIAWIDGETS_LIB 1)
|
|
|
|
endif()
|
2013-10-10 23:11:19 +00:00
|
|
|
if(Qt5MacExtras_FOUND)
|
|
|
|
set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5MacExtras_LIBRARIES})
|
|
|
|
# That's the name autofoo uses
|
|
|
|
set(QT_MACEXTRAS_LIB 1)
|
|
|
|
endif()
|
2014-08-14 00:27:26 +00:00
|
|
|
if(Qt5WinExtras_FOUND)
|
|
|
|
set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5WinExtras_LIBRARIES})
|
|
|
|
# set(QT_WINEXTRAS_LIB 1) # Not needed?
|
|
|
|
endif()
|
2013-04-25 23:04:19 +00:00
|
|
|
# If Qt4: QT_LIBRARIES and QT_INCLUDES are not set above. They require extra magic
|
|
|
|
elseif(QT_FOUND)
|
2012-02-02 12:04:22 +00:00
|
|
|
include(${QT_USE_FILE})
|
|
|
|
include_directories(${QT_INCLUDE_DIR})
|
|
|
|
message(STATUS "QT includes: ${QT_INCLUDE_DIR}")
|
|
|
|
message(STATUS "QT libs: ${QT_LIBRARIES}")
|
|
|
|
endif()
|
2014-08-02 20:53:44 +00:00
|
|
|
|
|
|
|
message(STATUS "C-Flags: ${CMAKE_C_FLAGS}")
|
|
|
|
message(STATUS "CXX-Flags: ${CMAKE_CXX_FLAGS}")
|
|
|
|
|
2014-11-10 20:24:18 +00:00
|
|
|
if(APPLE)
|
|
|
|
#
|
|
|
|
# We assume that APPLE means OS X so that we have the OS X
|
|
|
|
# frameworks.
|
|
|
|
#
|
|
|
|
set(HAVE_OS_X_FRAMEWORKS 1)
|
|
|
|
FIND_LIBRARY (APPLE_APPLICATION_SERVICES_LIBRARY ApplicationServices)
|
|
|
|
FIND_LIBRARY (APPLE_CORE_FOUNDATION_LIBRARY CoreFoundation)
|
|
|
|
FIND_LIBRARY (APPLE_SYSTEM_CONFIGURATION_LIBRARY SystemConfiguration)
|
|
|
|
endif()
|
|
|
|
|
2009-08-27 15:32:57 +00:00
|
|
|
include(ConfigureChecks.cmake)
|
2006-10-24 17:39:32 +00:00
|
|
|
|
|
|
|
#Big or little endian ?
|
|
|
|
include(TestBigEndian)
|
|
|
|
test_big_endian(WORDS_BIGENDIAN)
|
|
|
|
|
2013-12-01 21:55:21 +00:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
2013-10-13 09:21:55 +00:00
|
|
|
|
2014-07-01 06:21:39 +00:00
|
|
|
ADD_CUSTOM_TARGET(
|
|
|
|
gitversion ALL
|
|
|
|
COMMAND ${PERL_EXECUTABLE}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
|
|
|
)
|
|
|
|
set_target_properties(gitversion PROPERTIES FOLDER "Auxiliary")
|
|
|
|
|
|
|
|
ADD_CUSTOM_COMMAND(
|
2014-07-02 01:01:38 +00:00
|
|
|
OUTPUT ${CMAKE_BINARY_DIR}/version.h
|
2014-07-01 06:21:39 +00:00
|
|
|
COMMAND ${PERL_EXECUTABLE}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
|
|
|
)
|
|
|
|
|
2013-04-23 23:05:33 +00:00
|
|
|
add_subdirectory( asn1 EXCLUDE_FROM_ALL )
|
2014-06-23 23:48:41 +00:00
|
|
|
add_subdirectory( capchild )
|
2014-07-04 07:24:02 +00:00
|
|
|
add_subdirectory( caputils )
|
2009-10-10 05:57:25 +00:00
|
|
|
add_subdirectory( codecs )
|
2015-01-07 00:59:32 +00:00
|
|
|
add_subdirectory( docbook )
|
2009-10-10 05:57:25 +00:00
|
|
|
add_subdirectory( epan )
|
|
|
|
add_subdirectory( tools/lemon )
|
2013-08-01 23:40:06 +00:00
|
|
|
add_subdirectory( ui )
|
2009-10-10 05:57:25 +00:00
|
|
|
add_subdirectory( wiretap )
|
|
|
|
add_subdirectory( wsutil )
|
|
|
|
|
2014-04-26 22:18:19 +00:00
|
|
|
if(NOT WIN32)
|
2014-08-04 11:22:59 +00:00
|
|
|
add_custom_target(dumpabi DEPENDS dumpabi-libwireshark dumpabi-libwiretap dumpabi-libwsutil color.h)
|
2014-04-26 22:18:19 +00:00
|
|
|
endif()
|
2013-02-25 18:12:20 +00:00
|
|
|
|
2013-07-21 13:34:50 +00:00
|
|
|
if(ENABLE_ECHLD)
|
|
|
|
add_subdirectory( echld )
|
|
|
|
endif()
|
|
|
|
|
2014-08-28 23:48:53 +00:00
|
|
|
if(BUILD_wireshark_gtk AND GTK_FOUND)
|
2012-01-15 21:59:11 +00:00
|
|
|
add_subdirectory( ui/gtk )
|
2010-10-01 12:17:11 +00:00
|
|
|
endif()
|
|
|
|
|
2014-08-28 23:48:53 +00:00
|
|
|
if(BUILD_wireshark AND QT_FOUND)
|
2012-02-02 00:46:02 +00:00
|
|
|
add_subdirectory( ui/qt )
|
|
|
|
endif()
|
|
|
|
|
2015-01-15 21:07:48 +00:00
|
|
|
# Location of our data files. This should be set to a value that allows
|
|
|
|
# running from the build directory on Windows, on OS X when building an
|
|
|
|
# application bundle, and on UNIX if WIRESHARK_RUN_FROM_BUILD_DIRECTORY
|
|
|
|
# is set.
|
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
|
|
|
set(_datafile_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Resources/share/wireshark")
|
|
|
|
else()
|
|
|
|
get_target_property(_libwireshark_location epan LOCATION)
|
|
|
|
get_filename_component(_datafile_dir "${_libwireshark_location}" PATH)
|
|
|
|
endif()
|
|
|
|
set (DATAFILE_DIR ${_datafile_dir} CACHE INTERNAL "Build time data file location.")
|
|
|
|
|
|
|
|
if(ENABLE_EXTCAP)
|
|
|
|
set(HAVE_EXTCAP 1)
|
|
|
|
set(EXTCAP_DIR "${DATAFILE_DIR}/extcap/")
|
|
|
|
endif()
|
2012-02-02 00:46:02 +00:00
|
|
|
|
2015-01-18 21:27:13 +00:00
|
|
|
# Location of our plugins. PLUGIN_DIRECTORY should allow running
|
|
|
|
# from the build directory similar to DATAFILE_DIR above.
|
|
|
|
if(ENABLE_PLUGINS)
|
|
|
|
set(HAVE_PLUGINS 1)
|
|
|
|
if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}")
|
|
|
|
else()
|
|
|
|
set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}")
|
|
|
|
endif()
|
|
|
|
set(PLUGIN_SRC_DIRS
|
|
|
|
plugins/docsis
|
|
|
|
plugins/ethercat
|
|
|
|
plugins/gryphon
|
|
|
|
plugins/irda
|
|
|
|
plugins/m2m
|
|
|
|
plugins/mate
|
|
|
|
plugins/opcua
|
|
|
|
plugins/profinet
|
|
|
|
plugins/stats_tree
|
|
|
|
plugins/unistim
|
|
|
|
plugins/wimax
|
|
|
|
plugins/wimaxasncp
|
|
|
|
plugins/wimaxmacphy
|
|
|
|
${CUSTOM_PLUGIN_SRC_DIR}
|
|
|
|
)
|
|
|
|
# It seems this stuff doesn't build with autofoo either...
|
|
|
|
# if(YAPP_FOUND)
|
|
|
|
# set(PLUGIN_SRC_DIRS
|
|
|
|
# ${PLUGIN_SRC_DIRS}
|
|
|
|
# plugins/tpg
|
|
|
|
# )
|
|
|
|
# endif()
|
|
|
|
else()
|
|
|
|
set(PLUGIN_SRC_DIRS )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
|
|
|
set(_plugin_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/PlugIns/wireshark")
|
|
|
|
else()
|
|
|
|
get_target_property(_libwireshark_location epan LOCATION)
|
|
|
|
get_filename_component(_plugin_dir "${_libwireshark_location}" PATH)
|
|
|
|
set(_plugin_dir "${_plugin_dir}/plugins")
|
|
|
|
endif()
|
|
|
|
# XXX The NMake environment appends the version. Should we do so here?
|
|
|
|
set (PLUGIN_DIR ${_plugin_dir} CACHE INTERNAL "Build time plugin location.")
|
|
|
|
|
|
|
|
foreach(_plugin_src_dir ${PLUGIN_SRC_DIRS})
|
|
|
|
add_subdirectory( ${_plugin_src_dir} )
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
2010-09-28 19:23:15 +00:00
|
|
|
# Basedir where to install guides
|
2012-02-07 08:05:11 +00:00
|
|
|
set(DOC_DIR "$ENV{docdir}" CACHE FILEPATH "Installation directory for ug and dg pdfs.")
|
2010-09-28 19:23:15 +00:00
|
|
|
message(STATUS "docdir: ${DOC_DIR}")
|
|
|
|
|
2011-06-17 22:57:02 +00:00
|
|
|
if(ENABLE_PCAP_NG_DEFAULT)
|
|
|
|
set(PCAP_NG_DEFAULT 1)
|
|
|
|
endif()
|
|
|
|
|
2013-07-23 09:41:35 +00:00
|
|
|
# Large file support (e.g. make off_t 64 bit if supported)
|
|
|
|
include(gmxTestLargeFiles)
|
|
|
|
gmx_test_large_files(GMX_LARGEFILES)
|
|
|
|
|
2013-10-29 02:28:16 +00:00
|
|
|
add_definitions( -DTOP_SRCDIR=\"${CMAKE_SOURCE_DIR}\" )
|
|
|
|
|
2006-10-24 17:39:32 +00:00
|
|
|
if(WIN32)
|
2011-02-21 21:33:54 +00:00
|
|
|
set(WS_MSVC_NORETURN "__declspec(noreturn)")
|
2009-08-30 14:12:56 +00:00
|
|
|
|
2009-09-02 16:33:01 +00:00
|
|
|
# Disable deprecation
|
|
|
|
if(MSVC80 OR MSVC90)
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
|
|
|
|
endif()
|
2011-02-21 21:33:54 +00:00
|
|
|
else()
|
|
|
|
set(WS_MSVC_NORETURN " ")
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2006-10-24 17:39:32 +00:00
|
|
|
|
2014-06-20 23:05:27 +00:00
|
|
|
set( VERSION ${PROJECT_VERSION} )
|
|
|
|
set( configure_input "Built with CMake ${CMAKE_VERSION}" )
|
2006-09-06 22:28:19 +00:00
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h)
|
2015-01-10 21:29:57 +00:00
|
|
|
set(ICON_PATH "${CMAKE_SOURCE_DIR}/image/")
|
2014-06-20 22:38:07 +00:00
|
|
|
set( IN_FILES
|
2014-06-20 23:05:27 +00:00
|
|
|
adns_dll.rc
|
2014-06-24 03:18:37 +00:00
|
|
|
capchild/doxygen.cfg.in
|
2014-07-04 07:24:02 +00:00
|
|
|
caputils/doxygen.cfg.in
|
2014-06-20 23:05:27 +00:00
|
|
|
doxygen.cfg.in
|
|
|
|
doxygen_global.cfg
|
|
|
|
epan/doxygen.cfg.in
|
2014-06-20 22:38:07 +00:00
|
|
|
image/libwireshark.rc.in
|
|
|
|
image/text2pcap.rc.in
|
|
|
|
image/capinfos.rc.in
|
|
|
|
image/wireshark.rc.in
|
|
|
|
image/mergecap.rc.in
|
|
|
|
image/tshark.rc.in
|
|
|
|
image/dumpcap.rc.in
|
|
|
|
image/reordercap.rc.in
|
|
|
|
image/rawshark.rc.in
|
|
|
|
image/file_dlg_win32.rc
|
|
|
|
image/tfshark.rc.in
|
|
|
|
image/editcap.rc.in
|
|
|
|
image/captype.rc.in
|
|
|
|
image/libwsutil.rc.in
|
|
|
|
image/wiretap.rc.in
|
2015-01-10 21:29:57 +00:00
|
|
|
image/wireshark.exe.manifest.in
|
2014-06-20 23:05:27 +00:00
|
|
|
packaging/macosx/Info.plist.in
|
2014-10-29 08:36:06 +00:00
|
|
|
${CUSTOM_PLUGIN_IN_FILES}
|
2014-06-20 23:05:27 +00:00
|
|
|
ui/doxygen.cfg.in
|
|
|
|
ui/gtk/doxygen.cfg.in
|
|
|
|
ui/qt/doxygen.cfg.in
|
2014-06-20 22:38:07 +00:00
|
|
|
wireshark.pc.in
|
|
|
|
)
|
|
|
|
foreach( _in_file ${IN_FILES} )
|
|
|
|
get_filename_component( _path ${_in_file} PATH )
|
|
|
|
string( REGEX REPLACE "(.*)\\.in" "\\1" _outfile ${_in_file} )
|
|
|
|
configure_file( ${CMAKE_SOURCE_DIR}/${_in_file} ${CMAKE_BINARY_DIR}/${_outfile} @ONLY )
|
|
|
|
endforeach()
|
|
|
|
|
2009-09-24 20:42:08 +00:00
|
|
|
include(FeatureSummary)
|
2015-01-10 21:29:57 +00:00
|
|
|
#SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ])
|
2014-05-30 11:17:50 +00:00
|
|
|
SET_FEATURE_INFO(SBC "SBC Codec for Bluetooth A2DP stream playing" "www: http://git.kernel.org/cgit/bluetooth/sbc.git" )
|
|
|
|
|
2014-05-22 20:05:08 +00:00
|
|
|
FEATURE_SUMMARY(WHAT ALL)
|
2009-09-24 20:42:08 +00:00
|
|
|
|
2009-06-15 18:59:33 +00:00
|
|
|
link_directories(
|
2012-09-14 20:23:18 +00:00
|
|
|
${CMAKE_BINARY_DIR}/ui
|
2012-01-15 21:59:11 +00:00
|
|
|
${CMAKE_BINARY_DIR}/ui/gtk
|
2012-02-02 00:46:02 +00:00
|
|
|
${CMAKE_BINARY_DIR}/ui/qt
|
2014-06-23 23:48:41 +00:00
|
|
|
${CMAKE_BINARY_DIR}/capchild
|
2014-07-04 07:24:02 +00:00
|
|
|
${CMAKE_BINARY_DIR}/caputils
|
2010-09-10 16:50:12 +00:00
|
|
|
${CMAKE_BINARY_DIR}/codecs
|
|
|
|
${CMAKE_BINARY_DIR}/epan
|
|
|
|
${CMAKE_BINARY_DIR}/wiretap
|
|
|
|
${CMAKE_BINARY_DIR}/wsutil
|
2009-06-15 18:59:33 +00:00
|
|
|
)
|
2006-10-24 17:39:32 +00:00
|
|
|
|
2009-08-30 06:24:44 +00:00
|
|
|
if(WIN32)
|
2013-10-11 10:32:11 +00:00
|
|
|
set(PLATFORM_UI_SRC
|
2013-10-10 20:35:32 +00:00
|
|
|
ui/win32/console_win32.c
|
|
|
|
ui/win32/file_dlg_win32.c
|
2013-10-11 10:32:11 +00:00
|
|
|
ui/win32/print_win32.c
|
2015-01-07 10:17:14 +00:00
|
|
|
)
|
|
|
|
set(PLATFORM_UI_RC_FILES
|
2014-06-20 23:33:57 +00:00
|
|
|
image/file_dlg_win32.rc
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
2009-08-30 06:24:44 +00:00
|
|
|
endif()
|
2009-06-16 04:12:30 +00:00
|
|
|
|
2014-01-08 20:10:17 +00:00
|
|
|
# sources common for wireshark, tshark, and rawshark
|
|
|
|
set(SHARK_COMMON_SRC
|
2014-01-09 11:02:29 +00:00
|
|
|
cfile.c
|
2013-07-11 05:47:02 +00:00
|
|
|
frame_tvbuff.c
|
2009-09-08 07:03:57 +00:00
|
|
|
sync_pipe_write.c
|
|
|
|
)
|
|
|
|
|
2014-02-25 13:05:11 +00:00
|
|
|
# sources for external capture interfaces
|
|
|
|
if(ENABLE_EXTCAP)
|
|
|
|
set(SHARK_COMMON_SRC
|
|
|
|
${SHARK_COMMON_SRC}
|
|
|
|
extcap.c
|
|
|
|
extcap_parser.c
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2009-09-08 07:03:57 +00:00
|
|
|
set(TSHARK_TAP_SRC
|
2012-02-17 12:30:27 +00:00
|
|
|
ui/cli/tap-afpstat.c
|
|
|
|
ui/cli/tap-ansi_astat.c
|
|
|
|
ui/cli/tap-bootpstat.c
|
|
|
|
ui/cli/tap-camelcounter.c
|
|
|
|
ui/cli/tap-camelsrt.c
|
|
|
|
ui/cli/tap-comparestat.c
|
|
|
|
ui/cli/tap-dcerpcstat.c
|
|
|
|
ui/cli/tap-diameter-avp.c
|
|
|
|
ui/cli/tap-expert.c
|
2014-12-31 04:26:19 +00:00
|
|
|
ui/cli/tap-endpoints.c
|
2012-02-17 12:30:27 +00:00
|
|
|
ui/cli/tap-follow.c
|
|
|
|
ui/cli/tap-funnel.c
|
|
|
|
ui/cli/tap-gsm_astat.c
|
|
|
|
ui/cli/tap-h225counter.c
|
|
|
|
ui/cli/tap-h225rassrt.c
|
|
|
|
ui/cli/tap-hosts.c
|
|
|
|
ui/cli/tap-httpstat.c
|
|
|
|
ui/cli/tap-icmpstat.c
|
|
|
|
ui/cli/tap-icmpv6stat.c
|
|
|
|
ui/cli/tap-iostat.c
|
|
|
|
ui/cli/tap-iousers.c
|
|
|
|
ui/cli/tap-macltestat.c
|
|
|
|
ui/cli/tap-mgcpstat.c
|
|
|
|
ui/cli/tap-megacostat.c
|
|
|
|
ui/cli/tap-protocolinfo.c
|
|
|
|
ui/cli/tap-protohierstat.c
|
|
|
|
ui/cli/tap-radiusstat.c
|
|
|
|
ui/cli/tap-rlcltestat.c
|
|
|
|
ui/cli/tap-rpcstat.c
|
|
|
|
ui/cli/tap-rpcprogs.c
|
|
|
|
ui/cli/tap-rtp.c
|
|
|
|
ui/cli/tap-rtspstat.c
|
|
|
|
ui/cli/tap-scsistat.c
|
|
|
|
ui/cli/tap-sctpchunkstat.c
|
|
|
|
ui/cli/tap-sipstat.c
|
|
|
|
ui/cli/tap-smbsids.c
|
|
|
|
ui/cli/tap-smbstat.c
|
|
|
|
ui/cli/tap-stats_tree.c
|
|
|
|
ui/cli/tap-sv.c
|
|
|
|
ui/cli/tap-wspstat.c
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
|
2009-09-21 00:19:07 +00:00
|
|
|
set(INSTALL_DIRS
|
|
|
|
diameter
|
|
|
|
dtds
|
|
|
|
help
|
|
|
|
radius
|
|
|
|
tpncp
|
|
|
|
wimaxasncp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(INSTALL_FILES
|
2009-09-25 02:50:48 +00:00
|
|
|
${CMAKE_BINARY_DIR}/AUTHORS-SHORT
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/capinfos.html
|
2013-12-13 02:59:16 +00:00
|
|
|
${CMAKE_BINARY_DIR}/captype.html
|
2009-09-25 02:50:48 +00:00
|
|
|
cfilters
|
|
|
|
colorfilters
|
|
|
|
dfilters
|
2010-07-14 16:16:29 +00:00
|
|
|
${CMAKE_BINARY_DIR}/dftest.html
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/dumpcap.html
|
|
|
|
${CMAKE_BINARY_DIR}/editcap.html
|
2013-03-06 13:31:08 +00:00
|
|
|
${CMAKE_BINARY_DIR}/asn2deb.html
|
|
|
|
${CMAKE_BINARY_DIR}/idl2deb.html
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/idl2wrs.html
|
|
|
|
ipmap.html
|
2009-09-25 02:50:48 +00:00
|
|
|
manuf
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/mergecap.html
|
2011-05-19 18:10:21 +00:00
|
|
|
pdml2html.xsl
|
2010-07-14 16:16:29 +00:00
|
|
|
${CMAKE_BINARY_DIR}/randpkt.html
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/rawshark.html
|
2012-10-03 17:29:06 +00:00
|
|
|
${CMAKE_BINARY_DIR}/reordercap.html
|
2009-09-25 02:50:48 +00:00
|
|
|
services
|
|
|
|
smi_modules
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/text2pcap.html
|
|
|
|
${CMAKE_BINARY_DIR}/tshark.html
|
|
|
|
${CMAKE_BINARY_DIR}/wireshark-filter.html
|
|
|
|
${CMAKE_BINARY_DIR}/wireshark.html
|
|
|
|
docbook/ws.css
|
2009-09-21 00:19:07 +00:00
|
|
|
)
|
|
|
|
|
2015-01-15 21:07:48 +00:00
|
|
|
if(WIN32)
|
|
|
|
set(INSTALL_FILES ${CMAKE_BINARY_DIR}/COPYING.txt ${INSTALL_FILES})
|
|
|
|
else()
|
|
|
|
set(INSTALL_FILES COPYING ${INSTALL_FILES})
|
|
|
|
endif()
|
|
|
|
|
2014-10-10 15:32:51 +00:00
|
|
|
set(MAN1_FILES
|
|
|
|
${CMAKE_BINARY_DIR}/capinfos.1
|
|
|
|
${CMAKE_BINARY_DIR}/captype.1
|
|
|
|
${CMAKE_BINARY_DIR}/dftest.1
|
|
|
|
${CMAKE_BINARY_DIR}/dumpcap.1
|
|
|
|
${CMAKE_BINARY_DIR}/editcap.1
|
|
|
|
${CMAKE_BINARY_DIR}/idl2wrs.1
|
|
|
|
${CMAKE_BINARY_DIR}/mergecap.1
|
|
|
|
${CMAKE_BINARY_DIR}/randpkt.1
|
|
|
|
${CMAKE_BINARY_DIR}/rawshark.1
|
|
|
|
${CMAKE_BINARY_DIR}/reordercap.1
|
|
|
|
${CMAKE_BINARY_DIR}/text2pcap.1
|
|
|
|
${CMAKE_BINARY_DIR}/tshark.1
|
|
|
|
${CMAKE_BINARY_DIR}/wireshark.1
|
|
|
|
)
|
|
|
|
|
|
|
|
set(MAN4_FILES
|
|
|
|
${CMAKE_BINARY_DIR}/wireshark-filter.4
|
|
|
|
)
|
|
|
|
|
2009-09-08 15:56:16 +00:00
|
|
|
set(LIBEPAN_LIBS
|
2009-11-12 23:09:44 +00:00
|
|
|
# @NSL_LIBS@ # -lnsl
|
|
|
|
# @SOCKET_LIBS@ # -lsocket
|
|
|
|
# @SSL_LIBS@ # -lcrypto
|
2009-09-08 15:56:16 +00:00
|
|
|
epan
|
2009-11-12 23:09:44 +00:00
|
|
|
# $(plugin_ldadd) # in case of static
|
2013-10-10 20:35:32 +00:00
|
|
|
${AIRPCAP_LIBRARIES}
|
2009-09-08 07:03:57 +00:00
|
|
|
${PCAP_LIBRARIES}
|
2009-09-09 13:20:33 +00:00
|
|
|
${CARES_LIBRARIES}
|
2009-09-08 07:03:57 +00:00
|
|
|
${ADNS_LIBRARIES}
|
2009-09-10 07:04:54 +00:00
|
|
|
${KERBEROS_LIBRARIES}
|
2009-09-09 13:20:33 +00:00
|
|
|
${LUA_LIBRARIES}
|
2009-09-10 07:04:54 +00:00
|
|
|
${PYTHON_LIBRARIES}
|
|
|
|
${GEOIP_LIBRARIES}
|
2009-09-09 13:20:33 +00:00
|
|
|
${GCRYPT_LIBRARIES}
|
|
|
|
${GNUTLS_LIBRARIES}
|
|
|
|
${SMI_LIBRARIES}
|
2010-05-19 13:05:35 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2009-09-10 07:04:54 +00:00
|
|
|
${M_LIBRARIES}
|
2014-02-18 12:07:16 +00:00
|
|
|
${SBC_LIBRARIES}
|
2014-08-20 21:29:33 +00:00
|
|
|
${WINSPARKLE_LIBRARIES}
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
|
2015-01-12 22:44:42 +00:00
|
|
|
if(WIN32)
|
|
|
|
# According to http://stackoverflow.com/questions/14474659/cmake-how-to-have-a-target-for-copying-files
|
|
|
|
# we can't just use "set(_dll_output_dir "$<TARGET_FILE_DIR:epan>")"
|
2015-01-15 21:07:48 +00:00
|
|
|
# DATAFILE_DIR is set using the same property. We could probably
|
|
|
|
# get away with using it here.
|
2015-01-12 22:44:42 +00:00
|
|
|
get_target_property(_libwireshark_location epan LOCATION)
|
|
|
|
get_filename_component(_dll_output_dir "${_libwireshark_location}" PATH)
|
|
|
|
add_custom_target(copy_cli_dlls)
|
2015-01-15 21:07:48 +00:00
|
|
|
set_target_properties(copy_cli_dlls PROPERTIES FOLDER "Copy Tasks")
|
2015-01-12 22:44:42 +00:00
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# XXX Can (and should) we iterate over these similar to the way
|
|
|
|
# the top-level CMakeLists.txt iterates over the package list?
|
|
|
|
|
|
|
|
# Required
|
|
|
|
foreach( _dll ${GLIB2_DLLS} )
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${GLIB2_DLL_DIR}/${_dll}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endforeach(_dll)
|
|
|
|
|
|
|
|
# Optional
|
|
|
|
if (AIRPCAP_FOUND)
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${AIRPCAP_DLL_DIR}/${AIRPCAP_DLL}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endif(AIRPCAP_FOUND)
|
|
|
|
if (CARES_FOUND)
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${CARES_DLL_DIR}/${CARES_DLL}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endif(CARES_FOUND)
|
|
|
|
if (GEOIP_FOUND)
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${GEOIP_DLL_DIR}/${GEOIP_DLL}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endif(GEOIP_FOUND)
|
|
|
|
if(GCRYPT_FOUND)
|
|
|
|
foreach( _dll ${GCRYPT_DLLS} )
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${GCRYPT_DLL_DIR}/${_dll}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endforeach(_dll)
|
|
|
|
endif(GCRYPT_FOUND)
|
|
|
|
if(GNUTLS_FOUND)
|
|
|
|
foreach( _dll ${GNUTLS_DLLS} )
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${GNUTLS_DLL_DIR}/${_dll}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endforeach(_dll)
|
|
|
|
endif(GNUTLS_FOUND)
|
|
|
|
if(KERBEROS_FOUND)
|
|
|
|
foreach( _dll ${KERBEROS_DLLS} )
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${KERBEROS_DLL_DIR}/${_dll}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endforeach(_dll)
|
|
|
|
endif(KERBEROS_FOUND)
|
|
|
|
if (LUA_FOUND)
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${LUA_DLL_DIR}/${LUA_DLL}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endif(LUA_FOUND)
|
|
|
|
if (SMI_FOUND)
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${SMI_DLL_DIR}/${SMI_DLL}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
"${_dll_output_dir}/snmp"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${SMI_SHARE_DIR}/${SMI_DLL}/mibs/iana"
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${SMI_SHARE_DIR}/${SMI_DLL}/mibs/ietf"
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${SMI_SHARE_DIR}/${SMI_DLL}/mibs/irtf"
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${SMI_SHARE_DIR}/${SMI_DLL}/mibs/site"
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${SMI_SHARE_DIR}/${SMI_DLL}/mibs/tubs"
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${SMI_SHARE_DIR}/${SMI_DLL}/pibs"
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${SMI_SHARE_DIR}/${SMI_DLL}/yang"
|
|
|
|
"${_dll_output_dir}/snmp/mibs"
|
|
|
|
)
|
|
|
|
endif(SMI_FOUND)
|
|
|
|
if (WINSPARKLE_FOUND)
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${WINSPARKLE_DLL_DIR}/${WINSPARKLE_DLL}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endif(WINSPARKLE_FOUND)
|
|
|
|
if (ZLIB_FOUND)
|
|
|
|
add_custom_command(TARGET copy_cli_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${ZLIB_DLL_DIR}/${ZLIB_DLL}"
|
|
|
|
"${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endif(ZLIB_FOUND)
|
|
|
|
|
|
|
|
add_dependencies(epan copy_cli_dlls)
|
2015-01-19 21:33:01 +00:00
|
|
|
|
|
|
|
# We have a lot of choices for creating zip archives:
|
|
|
|
# - 7z, WinZip, etc., which require a separate download+install.
|
|
|
|
# - Cygwin's zip, which requires Cygwin.
|
|
|
|
# - "CMake -E tar cz", which creates a tar file.
|
|
|
|
# - CPack, which requires a CPack configuration.
|
|
|
|
# - PowerShell via PSCX or System.IO.Compression.FileSystem.
|
|
|
|
# - Python via zipfile.
|
|
|
|
# For now, just look for 7z. It's installed on the Windows builders,
|
|
|
|
# which might be the only systems that use this target.
|
|
|
|
find_program(ZIP_EXECUTABLE 7z
|
|
|
|
PATH "$ENV{PROGRAMFILES}/7-Zip" "$ENV{PROGRAMW6432}/7-Zip"
|
|
|
|
DOC "Path to the 7z utility."
|
|
|
|
)
|
2015-01-19 21:33:01 +00:00
|
|
|
# XXX "if(ZIP_EXECUTABLE)" doesn't work here. It looks like the
|
|
|
|
# absence of "-NOTFOUND" doesn't equal "true".
|
2015-01-19 21:33:01 +00:00
|
|
|
if (NOT "${ZIP_EXECUTABLE}" STREQUAL "ZIP_EXECUTABLE-NOTFOUND")
|
|
|
|
add_custom_target(pdb_zip_package)
|
|
|
|
set_target_properties(pdb_zip_package PROPERTIES FOLDER "Packaging")
|
|
|
|
set(_pdb_zip "${CMAKE_BINARY_DIR}/Wireshark-pdb-${WIRESHARK_TARGET_PLATFORM}-${VERSION}.zip")
|
|
|
|
file(TO_NATIVE_PATH "${_pdb_zip}" _pdb_zip_win)
|
|
|
|
add_custom_command(TARGET pdb_zip_package POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove -f "${_pdb_zip}"
|
2015-01-19 21:33:01 +00:00
|
|
|
COMMAND ${ZIP_EXECUTABLE} a -tzip -mmt=on "${_pdb_zip_win}" *.pdb *.lib
|
2015-01-19 21:33:01 +00:00
|
|
|
WORKING_DIRECTORY "${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
add_dependencies(pdb_zip_package epan)
|
|
|
|
endif()
|
2015-01-15 21:07:48 +00:00
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
# Copy ${INSTALL_FILES} and ${INSTALL_DIRS} to ${DATAFILE_DIR}
|
|
|
|
add_custom_target(copy_data_files ALL DEPENDS ${INSTALL_FILES})
|
|
|
|
set_target_properties(copy_data_files PROPERTIES FOLDER "Copy Tasks")
|
2015-02-05 17:22:37 +00:00
|
|
|
add_dependencies(copy_data_files html_docs)
|
2015-01-23 20:09:51 +00:00
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${DATAFILE_DIR}"
|
|
|
|
)
|
|
|
|
endif()
|
2015-01-15 21:07:48 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/COPYING.txt
|
|
|
|
COMMAND ${POWERSHELL_COMMAND} "${CMAKE_SOURCE_DIR}/tools/textify.ps1"
|
|
|
|
-Destination ${CMAKE_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/COPYING
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_SOURCE_DIR}/COPYING
|
|
|
|
)
|
2015-01-12 22:44:42 +00:00
|
|
|
endif()
|
|
|
|
|
2015-01-15 21:07:48 +00:00
|
|
|
foreach(_install_file ${INSTALL_FILES})
|
|
|
|
get_filename_component(_install_basename "${_install_file}" NAME)
|
|
|
|
add_custom_command(TARGET copy_data_files POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${_install_file}"
|
|
|
|
"${DATAFILE_DIR}/${_install_basename}"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
if(ENABLE_EXTCAP)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
"${DATAFILE_DIR}/extcap"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
"${DATAFILE_DIR}/help"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${CMAKE_SOURCE_DIR}/help/toc"
|
|
|
|
"${DATAFILE_DIR}/help/toc"
|
|
|
|
)
|
|
|
|
if(WIN32)
|
|
|
|
file(TO_NATIVE_PATH ${DATAFILE_DIR}/help _help_dest_dir)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${POWERSHELL_COMMAND} "${CMAKE_SOURCE_DIR}/tools/textify.ps1"
|
|
|
|
-Destination ${_help_dest_dir}
|
|
|
|
${CMAKE_SOURCE_DIR}/help/*.txt
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
file(GLOB _help_files
|
|
|
|
"${CMAKE_SOURCE_DIR}/help/*.txt"
|
|
|
|
)
|
|
|
|
foreach(_help_file ${_help_files})
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${_help_file}"
|
|
|
|
"${DATAFILE_DIR}/help/"
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
endif(WIN32)
|
|
|
|
if(LUA_FOUND)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
"${DATAFILE_DIR}/lua"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${CMAKE_BINARY_DIR}/epan/init.lua"
|
|
|
|
"${DATAFILE_DIR}/lua"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${CMAKE_SOURCE_DIR}/epan/wslua/console.lua"
|
|
|
|
"${DATAFILE_DIR}/lua"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${CMAKE_SOURCE_DIR}/epan/wslua/dtd_gen.lua"
|
|
|
|
"${DATAFILE_DIR}/lua"
|
|
|
|
)
|
|
|
|
add_dependencies(copy_data_files wsluaauxiliary)
|
|
|
|
endif(LUA_FOUND)
|
|
|
|
# doc/*.html handled elsewhere.
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${CMAKE_SOURCE_DIR}/dtds"
|
|
|
|
"${DATAFILE_DIR}/dtds"
|
|
|
|
)
|
|
|
|
# Skipping asn1 default.tt
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${CMAKE_SOURCE_DIR}/radius"
|
|
|
|
"${DATAFILE_DIR}/radius"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
"${DATAFILE_DIR}/diameter"
|
|
|
|
)
|
|
|
|
file(GLOB _diameter_files
|
|
|
|
"${CMAKE_SOURCE_DIR}/diameter/*.dtd"
|
|
|
|
"${CMAKE_SOURCE_DIR}/diameter/*.xml"
|
|
|
|
)
|
|
|
|
foreach(_diameter_file ${_diameter_files})
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${_diameter_file}"
|
|
|
|
"${DATAFILE_DIR}/diameter/"
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
|
|
|
"${DATAFILE_DIR}/tpncp"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${CMAKE_SOURCE_DIR}/tpncp/tpncp.dat"
|
|
|
|
"${DATAFILE_DIR}/tpncp/tpncp.dat"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_data_files PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${CMAKE_SOURCE_DIR}/wimaxasncp"
|
|
|
|
"${DATAFILE_DIR}/wimaxasncp"
|
|
|
|
)
|
|
|
|
|
2014-09-05 18:17:17 +00:00
|
|
|
if( (BUILD_wireshark AND QT_FOUND) OR (BUILD_wireshark_gtk AND GTK_FOUND) )
|
2014-07-31 21:17:07 +00:00
|
|
|
set(WIRESHARK_SRC
|
2009-09-08 07:03:57 +00:00
|
|
|
capture_info.c
|
|
|
|
capture_opts.c
|
|
|
|
color_filters.c
|
|
|
|
file.c
|
|
|
|
fileset.c
|
|
|
|
summary.c
|
2014-01-08 20:10:17 +00:00
|
|
|
${SHARK_COMMON_SRC}
|
2013-10-11 10:32:11 +00:00
|
|
|
${PLATFORM_UI_SRC}
|
2014-07-31 21:17:07 +00:00
|
|
|
)
|
|
|
|
set(wireshark_FILES
|
|
|
|
${WIRESHARK_SRC}
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/wireshark.rc
|
2015-01-07 10:17:14 +00:00
|
|
|
${PLATFORM_UI_RC_FILES}
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
2012-02-02 00:46:02 +00:00
|
|
|
endif()
|
|
|
|
|
2014-10-09 18:37:27 +00:00
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
2014-10-23 15:41:39 +00:00
|
|
|
#
|
|
|
|
# Add -Wl,-single_module to the LDFLAGS used with shared
|
|
|
|
# libraries, to fix some error that show up in some cases;
|
|
|
|
# some Apple documentation recommends it for most shared
|
|
|
|
# libraries.
|
|
|
|
#
|
|
|
|
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-single_module ${CMAKE_SHARED_LINKER_FLAGS}" )
|
|
|
|
#
|
|
|
|
# Add -Wl,-headerpad_max_install_names to the LDFLAGS, as
|
|
|
|
# code-signing issues is running out of padding space.
|
|
|
|
#
|
|
|
|
# Add -Wl,-search_paths_first to make sure that if we search
|
|
|
|
# directories A and B, in that order, for a given library, a
|
|
|
|
# non-shared version in directory A, rather than a shared
|
|
|
|
# version in directory B, is chosen (so we can use
|
|
|
|
# --with-pcap=/usr/local to force all programs to be linked
|
|
|
|
# with a static version installed in /usr/local/lib rather than
|
|
|
|
# the system version in /usr/lib).
|
|
|
|
#
|
2015-02-01 21:56:39 +00:00
|
|
|
# Also add -Wl,-rpath,@executable_path/../Frameworks,
|
|
|
|
# -Wl,-rpath,@executable_path/../lib and
|
2014-10-23 15:41:39 +00:00
|
|
|
# -Wl,-rpath,/usr/local/lib, so that, if we build an app
|
|
|
|
# bundle, we can tweak all the executable images, shared
|
|
|
|
# libraries, and plugins in the bundle to look for non-system
|
|
|
|
# libraries in the rpath, rather than having a script tweak
|
|
|
|
# DYLD_LIBRARY_PATH.
|
|
|
|
#
|
|
|
|
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS
|
2015-02-01 21:56:39 +00:00
|
|
|
"-Wl,-headerpad_max_install_names -Wl,-search_paths_first -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,@executable_path/../lib -Wl,-rpath,/usr/local/lib ${CMAKE_EXE_LINKER_FLAGS}"
|
2014-10-23 15:41:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Add files to the app bundle
|
2014-10-09 18:37:27 +00:00
|
|
|
# Wireshark.app/Contents
|
2015-02-01 21:56:39 +00:00
|
|
|
file(WRITE ${CMAKE_BINARY_DIR}/packaging/macosx/PkgInfo "APPLWshk\n")
|
2014-10-09 18:37:27 +00:00
|
|
|
set(BUNDLE_CONTENTS_FILES
|
|
|
|
${CMAKE_BINARY_DIR}/packaging/macosx/PkgInfo
|
|
|
|
)
|
|
|
|
set_source_files_properties(${BUNDLE_CONTENTS_FILES} PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION .
|
|
|
|
)
|
|
|
|
|
|
|
|
# Wireshark.app/Contents/Resources
|
|
|
|
set(BUNDLE_RESOURCE_FILES
|
|
|
|
${CMAKE_SOURCE_DIR}/packaging/macosx/Resources/Wireshark.icns
|
|
|
|
${CMAKE_SOURCE_DIR}/packaging/macosx/Resources/Wiresharkdoc.icns
|
|
|
|
)
|
|
|
|
set_source_files_properties(${BUNDLE_RESOURCE_FILES} PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources
|
|
|
|
)
|
|
|
|
|
2014-10-10 15:32:51 +00:00
|
|
|
# Wireshark.app/Contents/Resources/share/man/man1
|
|
|
|
set(BUNDLE_RESOURCE_SHARE_MAN1_FILES ${MAN1_FILES})
|
|
|
|
set_source_files_properties(${BUNDLE_RESOURCE_SHARE_MAN1_FILES} PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources/share/man/man1
|
|
|
|
)
|
|
|
|
|
|
|
|
# Wireshark.app/Contents/Resources/share/man/man1
|
|
|
|
set(BUNDLE_RESOURCE_SHARE_MAN4_FILES ${MAN4_FILES})
|
|
|
|
set_source_files_properties(${BUNDLE_RESOURCE_SHARE_MAN4_FILES} PROPERTIES
|
|
|
|
MACOSX_PACKAGE_LOCATION Resources/share/man/man4
|
|
|
|
)
|
|
|
|
|
2015-01-15 21:07:48 +00:00
|
|
|
# INSTALL_FILES and INSTALL_DIRS are handled by copy_data_files
|
2014-10-10 15:32:51 +00:00
|
|
|
|
|
|
|
set(EXTRA_BUNDLE_FILES
|
|
|
|
${BUNDLE_CONTENTS_FILES}
|
|
|
|
${BUNDLE_RESOURCE_FILES}
|
|
|
|
${BUNDLE_RESOURCE_SHARE_MAN1_FILES}
|
|
|
|
${BUNDLE_RESOURCE_SHARE_MAN4_FILES}
|
|
|
|
)
|
2014-10-09 18:37:27 +00:00
|
|
|
else()
|
|
|
|
set(EXTRA_BUNDLE_FILES)
|
|
|
|
endif()
|
|
|
|
|
2014-08-28 23:48:53 +00:00
|
|
|
if(BUILD_wireshark AND QT_FOUND)
|
|
|
|
set(wireshark_LIBS
|
2012-02-02 00:46:02 +00:00
|
|
|
qtui
|
2012-09-15 02:52:29 +00:00
|
|
|
ui
|
2014-06-23 23:48:41 +00:00
|
|
|
capchild
|
2014-07-04 07:24:02 +00:00
|
|
|
caputils
|
2012-02-02 00:46:02 +00:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
${GTHREAD2_LIBRARIES}
|
|
|
|
codecs
|
|
|
|
${LIBEPAN_LIBS}
|
2012-11-22 18:19:37 +00:00
|
|
|
${APPLE_APPLICATION_SERVICES_LIBRARY}
|
2012-11-22 16:49:17 +00:00
|
|
|
${APPLE_CORE_FOUNDATION_LIBRARY}
|
|
|
|
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
2012-09-06 10:37:17 +00:00
|
|
|
${NL_LIBRARIES}
|
2012-02-02 00:46:02 +00:00
|
|
|
)
|
2014-08-28 23:48:53 +00:00
|
|
|
# wireshark and wireshark-gtk share wireshark_FILES
|
2012-02-02 00:46:02 +00:00
|
|
|
|
2014-08-07 20:55:21 +00:00
|
|
|
# Policy since 2.8.11
|
2014-08-05 12:27:24 +00:00
|
|
|
if (POLICY CMP0020)
|
|
|
|
cmake_policy(SET CMP0020 OLD)
|
|
|
|
endif()
|
|
|
|
|
2015-01-01 18:28:06 +00:00
|
|
|
add_executable(wireshark MACOSX_BUNDLE wireshark-qt.cpp ${wireshark_FILES} ${EXTRA_BUNDLE_FILES})
|
2015-02-01 21:56:39 +00:00
|
|
|
set(PROGLIST ${PROGLIST} wireshark)
|
2014-08-28 23:48:53 +00:00
|
|
|
set_target_properties(wireshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
|
|
|
set_target_properties(wireshark PROPERTIES FOLDER "Executables")
|
2014-10-09 18:37:27 +00:00
|
|
|
if(ENABLE_APPLICATION_BUNDLE OR WIN32)
|
|
|
|
set_target_properties(wireshark PROPERTIES OUTPUT_NAME Wireshark)
|
|
|
|
endif()
|
2015-02-01 21:56:39 +00:00
|
|
|
|
2014-10-09 18:37:27 +00:00
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
|
|
|
set_target_properties(
|
|
|
|
wireshark PROPERTIES
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_BINARY_DIR}/packaging/macosx/Info.plist
|
|
|
|
)
|
2015-01-20 17:43:33 +00:00
|
|
|
# Add a wrapper script which opens the bundle. This adds
|
|
|
|
# convenience but makes debugging more difficult.
|
|
|
|
file(REMOVE ${CMAKE_BINARY_DIR}/run/wireshark)
|
|
|
|
file(WRITE ${CMAKE_BINARY_DIR}/run/wireshark "#!/bin/sh\n")
|
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}/run/wireshark "open ${CMAKE_BINARY_DIR}/run/Wireshark.app --args \"\$\@\"\n")
|
|
|
|
execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/run/wireshark)
|
2014-10-09 18:37:27 +00:00
|
|
|
endif()
|
|
|
|
|
2014-08-28 23:48:53 +00:00
|
|
|
target_link_libraries(wireshark ${wireshark_LIBS})
|
2014-10-09 18:37:27 +00:00
|
|
|
install(
|
|
|
|
TARGETS wireshark
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
)
|
2014-09-05 18:17:17 +00:00
|
|
|
|
2014-10-10 15:32:51 +00:00
|
|
|
if(NOT ENABLE_APPLICATION_BUNDLE)
|
|
|
|
# Map for endpoints dialog
|
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
TARGET wireshark
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${PROJECT_SOURCE_DIR}/ipmap.html"
|
|
|
|
$<TARGET_FILE_DIR:wireshark>
|
|
|
|
)
|
|
|
|
endif()
|
2015-01-13 21:32:12 +00:00
|
|
|
|
|
|
|
if(WIN32 AND Qt5Core_FOUND)
|
|
|
|
# Use windeployqt to copy our required DLLs to the run path.
|
2015-01-13 21:32:12 +00:00
|
|
|
# Ideally one of the modules in ${QTDIR}/lib/cmake would expose
|
|
|
|
# the path to windeployqt. For that matter having a reliable
|
|
|
|
# path to qmake would be *amazingly convenient*. We don't have
|
|
|
|
# either of those so we try to discover the path via Qt5Core.
|
|
|
|
# http://stackoverflow.com/questions/24650936/qt5-with-cmake-how-to-find-qt-translations-dir
|
|
|
|
|
2015-01-13 21:32:12 +00:00
|
|
|
get_target_property(_qmake_location Qt5::qmake IMPORTED_LOCATION)
|
|
|
|
get_filename_component(_qt_bindir "${_qmake_location}" DIRECTORY)
|
2015-01-15 16:34:52 +00:00
|
|
|
find_program(QT_WINDEPLOYQT_EXECUTABLE windeployqt
|
|
|
|
HINTS "${_qmake_location}"
|
|
|
|
DOC "Path to the windeployqt utility."
|
|
|
|
)
|
|
|
|
if (NOT "${QT_WINDEPLOYQT_EXECUTABLE}" STREQUAL "QT_WINDEPLOYQT_EXECUTABLE-NOTFOUND")
|
2015-01-13 21:32:12 +00:00
|
|
|
add_custom_target(copy_qt_dlls ALL)
|
2015-01-15 21:07:48 +00:00
|
|
|
set_target_properties(copy_qt_dlls PROPERTIES FOLDER "Copy Tasks")
|
2015-01-13 21:32:12 +00:00
|
|
|
# Will we ever need to use --debug? Windeployqt seems to
|
|
|
|
# be smart enough to copy debug DLLs when needed.
|
2015-01-14 22:59:21 +00:00
|
|
|
add_custom_command(TARGET copy_qt_dlls
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND set "PATH=%PATH%;${_qt_bindir}"
|
2015-01-15 16:34:52 +00:00
|
|
|
COMMAND "${QT_WINDEPLOYQT_EXECUTABLE}"
|
2015-01-14 22:59:21 +00:00
|
|
|
$<$<CONFIG:Debug>:--debug>
|
|
|
|
$<$<NOT:$<CONFIG:Debug>>:--release>
|
|
|
|
--no-compiler-runtime
|
2015-01-13 21:32:12 +00:00
|
|
|
"$<TARGET_FILE:wireshark>"
|
|
|
|
)
|
|
|
|
add_dependencies(copy_qt_dlls wireshark)
|
|
|
|
endif()
|
2015-01-15 21:07:48 +00:00
|
|
|
endif(WIN32 AND Qt5Core_FOUND)
|
2014-09-05 18:17:17 +00:00
|
|
|
endif()
|
|
|
|
|
2014-10-09 18:37:27 +00:00
|
|
|
# Common properties for CLI executables
|
|
|
|
macro(set_extra_executable_properties _executable _folder)
|
|
|
|
set_target_properties(${_executable} PROPERTIES
|
|
|
|
LINK_FLAGS "${WS_LINK_FLAGS}"
|
|
|
|
FOLDER ${_folder}
|
|
|
|
)
|
|
|
|
|
2015-02-01 21:56:39 +00:00
|
|
|
set(PROGLIST ${PROGLIST} ${_executable})
|
|
|
|
|
2014-10-09 18:37:27 +00:00
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
|
|
|
set_target_properties(${_executable} PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY run/Wireshark.app/Contents/MacOS
|
|
|
|
)
|
2015-01-20 17:43:33 +00:00
|
|
|
# Add a wrapper script which runs each executable from the
|
|
|
|
# correct location. This adds convenience but makes debugging
|
|
|
|
# more difficult.
|
|
|
|
file(REMOVE ${CMAKE_BINARY_DIR}/run/${_executable})
|
|
|
|
file(WRITE ${CMAKE_BINARY_DIR}/run/${_executable} "#!/bin/sh\n")
|
|
|
|
file(APPEND ${CMAKE_BINARY_DIR}/run/${_executable} "exec ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/MacOS/${_executable} \"\$\@\"\n")
|
|
|
|
execute_process(COMMAND chmod a+x ${CMAKE_BINARY_DIR}/run/${_executable})
|
2014-10-09 18:37:27 +00:00
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
2014-09-05 18:17:17 +00:00
|
|
|
if(BUILD_wireshark_gtk AND GTK_FOUND)
|
|
|
|
set(wireshark_gtk_LIBS
|
|
|
|
gtkui
|
|
|
|
ui
|
|
|
|
capchild
|
|
|
|
caputils
|
|
|
|
${GTK2_LIBRARIES}
|
|
|
|
${GTK3_LIBRARIES}
|
|
|
|
${GTHREAD2_LIBRARIES}
|
|
|
|
codecs
|
|
|
|
${PORTAUDIO_LIBRARIES}
|
|
|
|
${LIBEPAN_LIBS}
|
|
|
|
${APPLE_APPLICATION_SERVICES_LIBRARY}
|
|
|
|
${APPLE_CORE_SERVICES_LIBRARY}
|
|
|
|
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
|
|
|
${NL_LIBRARIES}
|
|
|
|
${WIN_COMCTL32_LIBRARY}
|
|
|
|
)
|
|
|
|
# wireshark and wireshark-gtk share wireshark_FILES
|
|
|
|
|
2015-01-01 18:28:06 +00:00
|
|
|
add_executable(wireshark-gtk ${wireshark_FILES})
|
2015-02-01 21:56:39 +00:00
|
|
|
set(PROGLIST ${PROGLIST} wireshark-gtk)
|
2014-09-05 18:17:17 +00:00
|
|
|
set_target_properties(wireshark-gtk PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
|
|
|
set_target_properties(wireshark-gtk PROPERTIES FOLDER "Executables")
|
|
|
|
target_link_libraries(wireshark-gtk ${wireshark_gtk_LIBS})
|
|
|
|
install(TARGETS wireshark-gtk RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
|
|
|
|
# Map for endpoints dialog
|
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
TARGET wireshark-gtk
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${PROJECT_SOURCE_DIR}/ipmap.html"
|
|
|
|
$<TARGET_FILE_DIR:wireshark-gtk>
|
|
|
|
)
|
2015-01-13 18:15:18 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
get_target_property(_wsgtk_location wireshark-gtk LOCATION)
|
|
|
|
get_filename_component(_dll_output_dir "${_wsgtk_location}" PATH)
|
|
|
|
add_custom_target(copy_gtk_dlls)
|
2015-01-15 21:07:48 +00:00
|
|
|
set_target_properties(copy_gtk_dlls PROPERTIES FOLDER "Copy Tasks")
|
2015-01-13 18:15:18 +00:00
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
|
|
|
|
if(GTK2_FOUND)
|
|
|
|
set(_gtk_dll_dir "${GTK2_DLL_DIR}")
|
|
|
|
set(_gtk_etc_dir "${GTK2_ETC_DIR}")
|
|
|
|
set(_gtk_dlls "${GTK2_DLLS}")
|
|
|
|
set(_gtk_etc_dir "${GTK2_ETC_DIR}")
|
|
|
|
else()
|
|
|
|
set(_gtk_dll_dir "${GTK3_DLL_DIR}")
|
|
|
|
set(_gtk_dlls "${GTK3_DLLS}")
|
|
|
|
set(_gtk_etc_dir "${GTK3_ETC_DIR}")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
foreach(_dll ${_gtk_dlls})
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${_gtk_dll_dir}/${_dll}" "${_dll_output_dir}"
|
|
|
|
)
|
|
|
|
endforeach(_dll)
|
|
|
|
|
|
|
|
# /etc
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${_dll_output_dir}/etc"
|
|
|
|
)
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${_gtk_etc_dir}" "${_dll_output_dir}/etc"
|
|
|
|
)
|
|
|
|
|
|
|
|
# XXX - Omitting ${GTK2_LIB_DIR}\loaders copying from Makefile.nmake
|
|
|
|
if(GTK2_FOUND)
|
|
|
|
# Engines
|
|
|
|
set (_engines_output_dir "${_dll_output_dir}/lib/gtk-2.0/2.10.0/engines")
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory "${_engines_output_dir}"
|
|
|
|
)
|
|
|
|
foreach(_dll ${GTK2_ENGINES_DLLS})
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${GTK2_ENGINES_DLL_DIR}/${_dll}" "${_engines_output_dir}"
|
|
|
|
)
|
|
|
|
endforeach(_dll)
|
|
|
|
|
|
|
|
# Themes
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${GTK2_THEMES_DIR}/gtkrc" "${_dll_output_dir}/etc/gtk-2.0"
|
|
|
|
)
|
|
|
|
|
|
|
|
# Modules
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${GTK2_LIB_DIR}" "${_dll_output_dir}/lib/gtk-2.0"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
add_custom_command(TARGET copy_gtk_dlls PRE_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
|
|
"${CMAKE_SOURCE_DIR}/ui/win32/settings.ini" "${_dll_output_dir}/etc"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_dependencies(wireshark-gtk copy_gtk_dlls copy_cli_dlls)
|
|
|
|
endif(WIN32)
|
2012-02-02 00:46:02 +00:00
|
|
|
endif()
|
|
|
|
|
2012-01-12 19:16:15 +00:00
|
|
|
register_tap_files(tshark-tap-register.c
|
2014-07-30 16:37:36 +00:00
|
|
|
tshark-taps
|
2012-01-12 19:16:15 +00:00
|
|
|
${TSHARK_TAP_SRC}
|
|
|
|
)
|
|
|
|
|
2009-08-29 09:13:28 +00:00
|
|
|
if(BUILD_tshark)
|
2009-09-08 07:03:57 +00:00
|
|
|
set(tshark_LIBS
|
2013-06-26 02:12:12 +00:00
|
|
|
ui
|
2014-06-23 23:48:41 +00:00
|
|
|
capchild
|
2014-07-04 07:24:02 +00:00
|
|
|
caputils
|
2009-09-08 15:56:16 +00:00
|
|
|
${LIBEPAN_LIBS}
|
2012-11-22 16:49:17 +00:00
|
|
|
${APPLE_CORE_FOUNDATION_LIBRARY}
|
|
|
|
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
set(tshark_FILES
|
|
|
|
capture_opts.c
|
|
|
|
tshark-tap-register.c
|
|
|
|
tshark.c
|
|
|
|
${TSHARK_TAP_SRC}
|
2014-01-08 20:10:17 +00:00
|
|
|
${SHARK_COMMON_SRC}
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/tshark.rc
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
add_executable(tshark ${tshark_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(tshark "Executables")
|
2009-09-08 07:03:57 +00:00
|
|
|
target_link_libraries(tshark ${tshark_LIBS})
|
|
|
|
install(TARGETS tshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2006-10-24 17:39:32 +00:00
|
|
|
|
2014-01-08 04:35:28 +00:00
|
|
|
if(BUILD_tfshark)
|
|
|
|
set(tfshark_LIBS
|
|
|
|
ui
|
|
|
|
${LIBEPAN_LIBS}
|
|
|
|
${APPLE_CORE_FOUNDATION_LIBRARY}
|
|
|
|
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
|
|
|
)
|
|
|
|
set(tfshark_FILES
|
|
|
|
tfshark.c
|
|
|
|
${TSHARK_TAP_SRC}
|
2014-01-08 20:10:17 +00:00
|
|
|
${SHARK_COMMON_SRC}
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/tfshark.rc
|
2014-01-08 04:35:28 +00:00
|
|
|
)
|
|
|
|
add_executable(tfshark ${tfshark_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(tfshark "Executables")
|
2014-01-08 04:35:28 +00:00
|
|
|
target_link_libraries(tfshark ${tfshark_LIBS})
|
|
|
|
install(TARGETS tfshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
endif()
|
|
|
|
|
2011-08-29 19:18:28 +00:00
|
|
|
if(BUILD_rawshark AND PCAP_FOUND)
|
2009-09-08 07:03:57 +00:00
|
|
|
set(rawshark_LIBS
|
2014-07-04 07:24:02 +00:00
|
|
|
caputils
|
2009-09-08 15:56:16 +00:00
|
|
|
${LIBEPAN_LIBS}
|
2012-11-22 16:49:17 +00:00
|
|
|
${APPLE_CORE_FOUNDATION_LIBRARY}
|
|
|
|
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
set(rawshark_FILES
|
2014-01-08 20:10:17 +00:00
|
|
|
${SHARK_COMMON_SRC}
|
2009-09-08 07:03:57 +00:00
|
|
|
rawshark.c
|
2012-02-17 16:59:14 +00:00
|
|
|
ui/util.c
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/rawshark.rc
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
add_executable(rawshark ${rawshark_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(rawshark "Executables")
|
2009-09-08 07:03:57 +00:00
|
|
|
target_link_libraries(rawshark ${rawshark_LIBS})
|
|
|
|
install(TARGETS rawshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-29 09:13:28 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-08 07:03:57 +00:00
|
|
|
if(BUILD_dftest)
|
|
|
|
set(dftest_LIBS
|
2009-09-08 15:56:16 +00:00
|
|
|
${LIBEPAN_LIBS}
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
set(dftest_FILES
|
2012-02-19 08:59:17 +00:00
|
|
|
dftest.c
|
2012-02-17 12:30:27 +00:00
|
|
|
ui/util.c
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
add_executable(dftest ${dftest_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(dftest "Tests")
|
2009-09-08 07:03:57 +00:00
|
|
|
target_link_libraries(dftest ${dftest_LIBS})
|
|
|
|
install(TARGETS dftest RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-29 09:13:28 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-08 07:03:57 +00:00
|
|
|
if(BUILD_randpkt)
|
|
|
|
set(randpkt_LIBS
|
|
|
|
wiretap
|
2013-10-13 09:21:55 +00:00
|
|
|
wsutil
|
2009-09-10 07:04:54 +00:00
|
|
|
${M_LIBRARIES}
|
2009-09-08 07:03:57 +00:00
|
|
|
${PCAP_LIBRARIES}
|
|
|
|
# @SOCKET_LIBS@
|
|
|
|
# @NSL_LIBS@
|
2009-09-09 13:20:33 +00:00
|
|
|
${CARES_LIBRARIES}
|
2009-09-08 07:03:57 +00:00
|
|
|
${ADNS_LIBRARIES}
|
2010-05-19 13:05:35 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
set(randpkt_FILES
|
|
|
|
randpkt.c
|
|
|
|
)
|
|
|
|
add_executable(randpkt ${randpkt_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(randpkt "Executables")
|
2009-09-08 07:03:57 +00:00
|
|
|
target_link_libraries(randpkt ${randpkt_LIBS})
|
|
|
|
install(TARGETS randpkt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-06-16 05:37:46 +00:00
|
|
|
|
2009-06-16 05:52:16 +00:00
|
|
|
if(BUILD_text2pcap)
|
2009-09-02 16:33:01 +00:00
|
|
|
set(text2pcap_LIBS
|
2012-12-18 22:56:06 +00:00
|
|
|
wsutil
|
2009-09-10 07:04:54 +00:00
|
|
|
${M_LIBRARIES}
|
2010-05-19 13:05:35 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
2010-05-15 21:40:25 +00:00
|
|
|
set(text2pcap_CLEAN_FILES
|
2009-09-02 16:33:01 +00:00
|
|
|
text2pcap.c
|
2012-12-21 14:34:26 +00:00
|
|
|
pcapio.c
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
2010-05-15 21:40:25 +00:00
|
|
|
set(text2pcap_FILES
|
|
|
|
${text2pcap_CLEAN_FILES}
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/text2pcap.rc
|
2010-05-15 21:40:25 +00:00
|
|
|
)
|
2009-09-02 16:33:01 +00:00
|
|
|
add_lex_files(text2pcap_FILES
|
|
|
|
text2pcap-scanner.l
|
|
|
|
)
|
|
|
|
add_executable(text2pcap ${text2pcap_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(text2pcap "Executables")
|
2009-09-02 16:33:01 +00:00
|
|
|
target_link_libraries(text2pcap ${text2pcap_LIBS})
|
|
|
|
install(TARGETS text2pcap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-06-16 05:37:46 +00:00
|
|
|
|
2009-06-16 05:52:16 +00:00
|
|
|
if(BUILD_mergecap)
|
2009-09-02 16:33:01 +00:00
|
|
|
set(mergecap_LIBS
|
|
|
|
wiretap
|
2010-05-19 13:05:35 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2013-08-13 09:58:09 +00:00
|
|
|
${CMAKE_DL_LIBS}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
set(mergecap_FILES
|
|
|
|
mergecap.c
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/mergecap.rc
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
add_executable(mergecap ${mergecap_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(mergecap "Executables")
|
2009-09-02 16:33:01 +00:00
|
|
|
target_link_libraries(mergecap ${mergecap_LIBS})
|
|
|
|
install(TARGETS mergecap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-06-16 05:37:46 +00:00
|
|
|
|
2012-09-24 10:23:20 +00:00
|
|
|
if(BUILD_reordercap)
|
|
|
|
set(reordercap_LIBS
|
|
|
|
wiretap
|
|
|
|
${ZLIB_LIBRARIES}
|
2013-08-13 09:58:09 +00:00
|
|
|
${CMAKE_DL_LIBS}
|
2012-09-24 10:23:20 +00:00
|
|
|
)
|
|
|
|
set(reordercap_FILES
|
|
|
|
reordercap.c
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/reordercap.rc
|
2012-09-24 10:23:20 +00:00
|
|
|
)
|
|
|
|
add_executable(reordercap ${reordercap_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(reordercap "Executables")
|
2012-09-24 10:23:20 +00:00
|
|
|
target_link_libraries(reordercap ${reordercap_LIBS})
|
|
|
|
install(TARGETS reordercap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
endif()
|
|
|
|
|
2009-06-16 05:52:16 +00:00
|
|
|
if(BUILD_capinfos)
|
2009-09-02 16:33:01 +00:00
|
|
|
set(capinfos_LIBS
|
|
|
|
wiretap
|
2012-10-03 17:31:23 +00:00
|
|
|
wsutil
|
2010-05-19 13:05:35 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2009-12-08 11:04:52 +00:00
|
|
|
${GCRYPT_LIBRARIES}
|
2013-08-13 09:58:09 +00:00
|
|
|
${CMAKE_DL_LIBS}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
set(capinfos_FILES
|
|
|
|
capinfos.c
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/capinfos.rc
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
add_executable(capinfos ${capinfos_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(capinfos "Executables")
|
2009-09-02 16:33:01 +00:00
|
|
|
target_link_libraries(capinfos ${capinfos_LIBS})
|
|
|
|
install(TARGETS capinfos RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-06-16 05:37:46 +00:00
|
|
|
|
2013-12-13 02:59:16 +00:00
|
|
|
if(BUILD_captype)
|
|
|
|
set(captype_LIBS
|
|
|
|
wiretap
|
|
|
|
wsutil
|
|
|
|
${ZLIB_LIBRARIES}
|
|
|
|
${CMAKE_DL_LIBS}
|
|
|
|
)
|
|
|
|
set(captype_FILES
|
|
|
|
captype.c
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/captype.rc
|
2013-12-13 02:59:16 +00:00
|
|
|
)
|
|
|
|
add_executable(captype ${captype_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(captype "Executables")
|
2013-12-13 02:59:16 +00:00
|
|
|
target_link_libraries(captype ${captype_LIBS})
|
|
|
|
install(TARGETS captype RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
endif()
|
|
|
|
|
2009-06-16 05:52:16 +00:00
|
|
|
if(BUILD_editcap)
|
2009-09-02 16:33:01 +00:00
|
|
|
set(editcap_LIBS
|
|
|
|
wiretap
|
2010-05-19 13:05:35 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2013-08-13 09:58:09 +00:00
|
|
|
${CMAKE_DL_LIBS}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
set(editcap_FILES
|
|
|
|
editcap.c
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/editcap.rc
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
add_executable(editcap ${editcap_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(editcap "Executables")
|
2009-09-02 16:33:01 +00:00
|
|
|
target_link_libraries(editcap ${editcap_LIBS})
|
|
|
|
install(TARGETS editcap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-06-16 05:37:46 +00:00
|
|
|
|
2011-08-29 19:18:28 +00:00
|
|
|
if(BUILD_dumpcap AND PCAP_FOUND)
|
2009-09-02 16:33:01 +00:00
|
|
|
set(dumpcap_LIBS
|
2011-01-18 17:49:41 +00:00
|
|
|
wsutil
|
2014-07-04 07:24:02 +00:00
|
|
|
caputils
|
2009-09-02 16:33:01 +00:00
|
|
|
${PCAP_LIBRARIES}
|
2009-09-12 17:20:08 +00:00
|
|
|
${CAP_LIBRARIES}
|
2009-09-08 07:03:57 +00:00
|
|
|
# @SOCKET_LIBS@
|
|
|
|
# @NSL_LIBS@
|
2011-01-18 17:49:41 +00:00
|
|
|
${GLIB2_LIBRARIES}
|
2011-05-12 21:13:00 +00:00
|
|
|
${GTHREAD2_LIBRARIES}
|
2010-05-19 13:05:35 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2012-11-22 16:49:17 +00:00
|
|
|
${APPLE_CORE_FOUNDATION_LIBRARY}
|
|
|
|
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
2012-09-06 10:37:17 +00:00
|
|
|
${NL_LIBRARIES}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
set(dumpcap_FILES
|
|
|
|
capture_opts.c
|
|
|
|
capture_stop_conditions.c
|
|
|
|
conditions.c
|
|
|
|
dumpcap.c
|
|
|
|
pcapio.c
|
|
|
|
ringbuffer.c
|
|
|
|
sync_pipe_write.c
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/dumpcap.rc
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
add_executable(dumpcap ${dumpcap_FILES})
|
2014-10-09 18:37:27 +00:00
|
|
|
set_extra_executable_properties(dumpcap "Executables")
|
2009-09-02 16:33:01 +00:00
|
|
|
target_link_libraries(dumpcap ${dumpcap_LIBS})
|
2014-01-19 00:48:22 +00:00
|
|
|
install(TARGETS dumpcap
|
2014-10-09 18:37:27 +00:00
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
2014-01-19 00:48:22 +00:00
|
|
|
PERMISSIONS ${DUMPCAP_SETUID}
|
|
|
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
|
|
|
GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
|
|
|
|
)
|
|
|
|
if(DUMPCAP_INSTALL_OPTION STREQUAL "capabilities")
|
|
|
|
install( CODE "execute_process(
|
|
|
|
COMMAND
|
|
|
|
${SETCAP_EXECUTABLE}
|
|
|
|
cap_net_raw,cap_net_admin+ep
|
|
|
|
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/dumpcap${CMAKE_EXECUTABLE_SUFFIX}
|
|
|
|
RESULT_VARIABLE
|
|
|
|
_SETCAP_RESULT
|
|
|
|
)
|
|
|
|
if( _SETCAP_RESULT )
|
2014-01-19 01:08:52 +00:00
|
|
|
message( WARNING \"setcap failed (${_SETCAP_RESULT}).\")
|
2014-01-19 00:48:22 +00:00
|
|
|
endif()"
|
|
|
|
)
|
|
|
|
endif()
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-09-21 00:19:07 +00:00
|
|
|
|
2009-09-25 02:50:48 +00:00
|
|
|
ADD_CUSTOM_COMMAND(
|
2010-09-23 21:14:23 +00:00
|
|
|
OUTPUT ${CMAKE_BINARY_DIR}/AUTHORS-SHORT
|
2013-10-04 16:55:33 +00:00
|
|
|
COMMAND ${PERL_EXECUTABLE}
|
2009-09-25 02:50:48 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/make-authors-short.pl
|
|
|
|
< ${CMAKE_SOURCE_DIR}/AUTHORS
|
2010-09-23 21:06:31 +00:00
|
|
|
> ${CMAKE_BINARY_DIR}/AUTHORS-SHORT
|
2009-09-25 02:50:48 +00:00
|
|
|
DEPENDS
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/make-authors-short.pl
|
|
|
|
${CMAKE_SOURCE_DIR}/AUTHORS
|
|
|
|
)
|
|
|
|
|
2009-11-11 16:20:37 +00:00
|
|
|
ADD_CUSTOM_COMMAND(
|
2010-09-23 21:14:23 +00:00
|
|
|
OUTPUT ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
|
2013-10-04 16:55:33 +00:00
|
|
|
COMMAND ${PERL_EXECUTABLE}
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
|
2010-09-23 21:06:31 +00:00
|
|
|
< ${CMAKE_BINARY_DIR}/AUTHORS-SHORT
|
|
|
|
> ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
|
2009-11-11 16:20:37 +00:00
|
|
|
DEPENDS
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/perlnoutf.pl
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/make-authors-format.pl
|
2010-09-23 21:06:31 +00:00
|
|
|
${CMAKE_BINARY_DIR}/AUTHORS-SHORT
|
2009-11-11 16:20:37 +00:00
|
|
|
)
|
|
|
|
|
2014-10-02 00:18:31 +00:00
|
|
|
if(WIN32)
|
|
|
|
FILE(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template WPT_WIN_PATH)
|
|
|
|
FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT ASF_WIN_PATH)
|
|
|
|
FILE(TO_NATIVE_PATH ${CMAKE_BINARY_DIR}/wireshark.pod WP_WIN_PATH)
|
|
|
|
ADD_CUSTOM_COMMAND(
|
2015-01-15 11:45:02 +00:00
|
|
|
OUTPUT ${CMAKE_BINARY_DIR}/wireshark.pod
|
|
|
|
COMMAND copy /B ${WPT_WIN_PATH} + ${ASF_WIN_PATH} ${WP_WIN_PATH}
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
|
|
|
|
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
|
2014-10-02 00:18:31 +00:00
|
|
|
)
|
|
|
|
else()
|
|
|
|
|
|
|
|
ADD_CUSTOM_COMMAND(
|
2015-01-15 11:45:02 +00:00
|
|
|
OUTPUT ${CMAKE_BINARY_DIR}/wireshark.pod
|
|
|
|
COMMAND cat
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
|
|
|
|
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
|
|
|
|
> ${CMAKE_BINARY_DIR}/wireshark.pod
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
|
|
|
|
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
|
2014-10-02 00:18:31 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-10-09 18:37:27 +00:00
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
2015-02-04 00:02:52 +00:00
|
|
|
add_custom_target(app_bundle)
|
2015-02-01 21:56:39 +00:00
|
|
|
set_target_properties(app_bundle PROPERTIES FOLDER "Copy Tasks")
|
|
|
|
add_custom_command(TARGET app_bundle
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND "${CMAKE_SOURCE_DIR}/packaging/macosx/osx-app.sh"
|
|
|
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/run"
|
|
|
|
)
|
|
|
|
add_dependencies(app_bundle ${PROGLIST})
|
2014-10-09 18:37:27 +00:00
|
|
|
endif()
|
|
|
|
|
2009-11-11 16:20:37 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/capinfos 1 )
|
2013-12-13 02:59:16 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/captype 1 )
|
2010-07-14 16:16:29 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/dftest 1 )
|
2009-11-11 16:20:37 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/dumpcap 1 )
|
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/editcap 1 )
|
2013-03-06 13:31:08 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/asn2deb 1 )
|
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/idl2deb 1 )
|
2009-11-11 16:20:37 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/idl2wrs 1 )
|
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/mergecap 1 )
|
2010-07-14 16:16:29 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/randpkt 1 )
|
2009-11-11 16:20:37 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/rawshark 1 )
|
2012-10-03 17:29:06 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/reordercap 1 )
|
2009-11-11 16:20:37 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/text2pcap 1 )
|
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/tshark 1 )
|
2013-07-23 07:41:20 +00:00
|
|
|
pod2manhtml( ${CMAKE_BINARY_DIR}/wireshark 1 )
|
2010-07-15 22:50:28 +00:00
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/wireshark-filter 4 )
|
2009-11-11 16:20:37 +00:00
|
|
|
|
2009-09-25 02:50:48 +00:00
|
|
|
add_custom_target(
|
2015-01-11 00:05:42 +00:00
|
|
|
html_docs ALL
|
2009-09-25 02:50:48 +00:00
|
|
|
DEPENDS
|
2014-07-02 00:34:46 +00:00
|
|
|
${CMAKE_BINARY_DIR}/AUTHORS-SHORT
|
2009-11-11 16:20:37 +00:00
|
|
|
capinfos.html
|
2013-12-13 02:59:16 +00:00
|
|
|
captype.html
|
2010-07-14 16:16:29 +00:00
|
|
|
dftest.html
|
2009-11-11 16:20:37 +00:00
|
|
|
dumpcap.html
|
|
|
|
editcap.html
|
2013-03-06 13:31:08 +00:00
|
|
|
asn2deb.html
|
|
|
|
idl2deb.html
|
2009-11-11 16:20:37 +00:00
|
|
|
idl2wrs.html
|
|
|
|
mergecap.html
|
2010-07-14 16:16:29 +00:00
|
|
|
randpkt.html
|
2009-11-11 16:20:37 +00:00
|
|
|
rawshark.html
|
2012-10-03 17:29:06 +00:00
|
|
|
reordercap.html
|
2009-11-11 16:20:37 +00:00
|
|
|
text2pcap.html
|
|
|
|
tshark.html
|
|
|
|
wireshark.html
|
|
|
|
wireshark-filter.html
|
|
|
|
)
|
2015-01-11 00:05:42 +00:00
|
|
|
set_target_properties(html_docs PROPERTIES FOLDER "Docs")
|
2009-11-11 16:20:37 +00:00
|
|
|
|
2009-11-07 10:07:00 +00:00
|
|
|
set(CLEAN_FILES
|
|
|
|
${wireshark_FILES}
|
|
|
|
${tshark_FILES}
|
|
|
|
${rawshark_FILES}
|
|
|
|
${dftest_FILES}
|
|
|
|
${randpkt_FILES}
|
2010-05-15 21:40:25 +00:00
|
|
|
${text2pcap_CLEAN_FILES}
|
2009-11-07 10:07:00 +00:00
|
|
|
${mergecap_FILES}
|
|
|
|
${capinfos_FILES}
|
2013-12-13 02:59:16 +00:00
|
|
|
${captype_FILES}
|
2009-11-07 10:07:00 +00:00
|
|
|
${editcap_FILES}
|
|
|
|
${dumpcap_FILES}
|
|
|
|
)
|
|
|
|
|
|
|
|
if (WERROR)
|
|
|
|
set_source_files_properties(
|
|
|
|
${CLEAN_FILES}
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_FLAGS -Werror
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2009-09-21 00:19:07 +00:00
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
${INSTALL_FILES}
|
|
|
|
DESTINATION
|
|
|
|
${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}
|
|
|
|
)
|
|
|
|
|
2009-11-11 16:20:37 +00:00
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
${MAN1_FILES}
|
|
|
|
DESTINATION
|
|
|
|
${CMAKE_INSTALL_MANDIR}/man1
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
${MAN4_FILES}
|
|
|
|
DESTINATION
|
|
|
|
${CMAKE_INSTALL_MANDIR}/man4
|
|
|
|
)
|
|
|
|
|
2014-03-04 13:59:39 +00:00
|
|
|
install(
|
|
|
|
FILES
|
|
|
|
"${CMAKE_BINARY_DIR}/wireshark.pc"
|
|
|
|
DESTINATION
|
2014-05-29 12:07:44 +00:00
|
|
|
${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
2014-03-04 13:59:39 +00:00
|
|
|
)
|
|
|
|
|
2009-09-21 00:19:07 +00:00
|
|
|
install(
|
|
|
|
DIRECTORY
|
|
|
|
${INSTALL_DIRS}
|
2009-09-25 02:50:48 +00:00
|
|
|
DIRECTORY_PERMISSIONS
|
|
|
|
OWNER_EXECUTE OWNER_WRITE OWNER_READ
|
|
|
|
GROUP_EXECUTE GROUP_READ
|
|
|
|
WORLD_EXECUTE WORLD_READ
|
2009-09-21 00:19:07 +00:00
|
|
|
DESTINATION
|
|
|
|
${CMAKE_INSTALL_DATADIR}/${CPACK_PACKAGE_NAME}
|
2014-02-07 19:14:52 +00:00
|
|
|
PATTERN ".git" EXCLUDE
|
2009-09-21 00:19:07 +00:00
|
|
|
PATTERN ".svn" EXCLUDE
|
|
|
|
PATTERN "Makefile.*" EXCLUDE
|
2009-09-23 04:41:14 +00:00
|
|
|
PATTERN "faq.py" EXCLUDE
|
2009-09-21 00:19:07 +00:00
|
|
|
)
|
2012-02-04 14:19:38 +00:00
|
|
|
|
2013-11-18 07:42:23 +00:00
|
|
|
include( UseCheckAPI )
|
|
|
|
CHECKAPI(
|
2014-05-20 20:47:08 +00:00
|
|
|
${TSHARK_TAP_SRC}
|
2014-07-31 21:17:07 +00:00
|
|
|
${WIRESHARK_SRC}
|
2013-11-18 07:42:23 +00:00
|
|
|
)
|
2012-02-04 14:19:38 +00:00
|
|
|
|
2014-11-11 13:41:01 +00:00
|
|
|
set(CMAKE_INSTALL_MODULES_DIR ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@)
|
|
|
|
configure_file("${CMAKE_MODULE_PATH}/WiresharkConfig.cmake.in" "${CMAKE_BINARY_DIR}/WiresharkConfig.cmake" @ONLY)
|
|
|
|
configure_file("${CMAKE_MODULE_PATH}/WiresharkConfigVersion.cmake.in" "${CMAKE_BINARY_DIR}/WiresharkConfigVersion.cmake" @ONLY)
|
|
|
|
install(
|
|
|
|
FILES
|
2014-11-12 12:02:17 +00:00
|
|
|
${CMAKE_MODULE_PATH}/FindGLIB2.cmake
|
2014-11-11 13:41:01 +00:00
|
|
|
${CMAKE_MODULE_PATH}/FindWireshark.cmake
|
2014-11-12 12:02:17 +00:00
|
|
|
${CMAKE_MODULE_PATH}/FindWSWinLibs.cmake
|
2014-11-12 12:43:14 +00:00
|
|
|
${CMAKE_MODULE_PATH}/UseAsn2Wrs.cmake
|
2014-11-16 15:07:45 +00:00
|
|
|
${CMAKE_MODULE_PATH}/LocatePythonModule.cmake
|
|
|
|
${CMAKE_MODULE_PATH}/UseMakeDissectorReg.cmake
|
2014-11-11 13:41:01 +00:00
|
|
|
${CMAKE_BINARY_DIR}/WiresharkConfig.cmake
|
|
|
|
${CMAKE_BINARY_DIR}/WiresharkConfigVersion.cmake
|
|
|
|
DESTINATION
|
|
|
|
${CMAKE_INSTALL_MODULES_DIR}
|
|
|
|
)
|
|
|
|
|
2012-02-05 07:41:53 +00:00
|
|
|
if(DOC_DIR)
|
|
|
|
message(STATUS "Docdir install: ${DOC_DIR}")
|
2012-02-04 14:19:38 +00:00
|
|
|
INSTALL(
|
|
|
|
DIRECTORY
|
|
|
|
${CMAKE_BINARY_DIR}/docbook/
|
|
|
|
DIRECTORY_PERMISSIONS
|
|
|
|
OWNER_EXECUTE OWNER_WRITE OWNER_READ
|
|
|
|
GROUP_EXECUTE GROUP_READ
|
|
|
|
WORLD_EXECUTE WORLD_READ
|
|
|
|
DESTINATION
|
|
|
|
${DOC_DIR}/guides
|
2012-02-08 07:39:51 +00:00
|
|
|
FILES_MATCHING
|
2012-02-05 07:41:53 +00:00
|
|
|
PATTERN "*.pdf"
|
2012-02-04 14:19:38 +00:00
|
|
|
)
|
|
|
|
endif()
|
2015-01-15 11:45:02 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
#
|
|
|
|
# Local variables:
|
|
|
|
# c-basic-offset: 8
|
|
|
|
# tab-width: 8
|
|
|
|
# indent-tabs-mode: t
|
|
|
|
# End:
|
|
|
|
#
|
|
|
|
# vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
|
|
|
# :indentSize=8:tabSize=8:noTabs=false:
|
|
|
|
#
|