2006-09-05 09:50:45 +00:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
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
|
|
|
|
2009-06-16 05:37:46 +00:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
2010-02-25 12:30:44 +00:00
|
|
|
set(CMAKE_BACKWARDS_COMPATIBILITY 2.6)
|
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)
|
2011-08-07 18:35:36 +00:00
|
|
|
if(COMMAND cmake_policy)
|
|
|
|
# Backward compatibility for versions < 2.6.3
|
|
|
|
cmake_policy(SET CMP0011 OLD)
|
2010-09-23 06:59:41 +00:00
|
|
|
# cmake_policy(SET CMP0015 NEW)
|
2011-08-07 18:35:36 +00:00
|
|
|
endif(COMMAND cmake_policy)
|
2010-09-23 06:59:41 +00:00
|
|
|
|
2012-09-18 21:42:13 +00:00
|
|
|
# set(PROJECT_MAJOR_VERSION 1)
|
|
|
|
# set(PROJECT_MINOR_VERSION 9)
|
|
|
|
# set(PROJECT_PATCH_VERSION 0)
|
|
|
|
# set(PROJECT_VERSION_EXTENSION "-rc5")
|
|
|
|
# If not set, copy over Wireshark version from configure.ac
|
|
|
|
if(NOT PROJECT_MAJOR_VERSION)
|
2010-03-07 19:40:25 +00:00
|
|
|
file(STRINGS
|
2012-08-23 11:11:24 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/configure.ac
|
2012-09-18 21:42:13 +00:00
|
|
|
PROJECT_MAJOR_VERSION_TMP
|
2012-09-24 23:40:59 +00:00
|
|
|
REGEX "^m4_define\\(\\[?version_major\\]?, *\\[?[0-9]+\\]?\\)"
|
2010-03-07 19:40:25 +00:00
|
|
|
)
|
2012-09-18 21:42:13 +00:00
|
|
|
file(STRINGS
|
|
|
|
${CMAKE_SOURCE_DIR}/configure.ac
|
|
|
|
PROJECT_MINOR_VERSION_TMP
|
2012-09-24 23:40:59 +00:00
|
|
|
REGEX "^m4_define\\(\\[?version_minor\\]?, *\\[?[0-9]+\\]?\\)"
|
2012-09-18 21:42:13 +00:00
|
|
|
)
|
|
|
|
file(STRINGS
|
|
|
|
${CMAKE_SOURCE_DIR}/configure.ac
|
|
|
|
PROJECT_PATCH_VERSION_TMP
|
2012-09-24 23:40:59 +00:00
|
|
|
REGEX "^m4_define\\(\\[?version_micro\\]?, *\\[?[0-9]+\\]?\\)"
|
2012-09-18 21:42:13 +00:00
|
|
|
)
|
|
|
|
# XXX pull VERSION_EXTENSION out of configure.ac ?
|
|
|
|
|
2012-09-24 23:40:59 +00:00
|
|
|
string(REGEX REPLACE "m4_define\\(\\[?version_major\\]?, *\\[?([0-9]+)\\]?\\)"
|
2010-03-07 19:40:25 +00:00
|
|
|
"\\1"
|
2012-09-18 21:42:13 +00:00
|
|
|
PROJECT_MAJOR_VERSION
|
|
|
|
${PROJECT_MAJOR_VERSION_TMP}
|
|
|
|
)
|
2012-09-24 23:40:59 +00:00
|
|
|
string(REGEX REPLACE "m4_define\\(\\[?version_minor\\]?, *\\[?([0-9]+)\\]?\\)"
|
2012-09-18 21:42:13 +00:00
|
|
|
"\\1"
|
|
|
|
PROJECT_MINOR_VERSION
|
|
|
|
${PROJECT_MINOR_VERSION_TMP}
|
|
|
|
)
|
2012-09-24 23:40:59 +00:00
|
|
|
string(REGEX REPLACE "m4_define\\(\\[?version_micro\\]?, *\\[?([0-9]+)\\]?\\)"
|
2012-09-18 21:42:13 +00:00
|
|
|
"\\1"
|
|
|
|
PROJECT_PATCH_VERSION
|
|
|
|
${PROJECT_PATCH_VERSION_TMP}
|
2010-03-07 19:40:25 +00:00
|
|
|
)
|
|
|
|
endif()
|
2012-09-18 21:42:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
if(PROJECT_VERSION_EXTENSION)
|
|
|
|
set(PROJECT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION})
|
|
|
|
else()
|
|
|
|
set(PROJECT_VERSION ${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION})
|
|
|
|
endif()
|
|
|
|
|
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}.")
|
|
|
|
|
2006-10-26 15:36:50 +00:00
|
|
|
#Where to find local cmake scripts
|
|
|
|
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
|
2009-09-02 16:33:01 +00:00
|
|
|
INCLUDE(UseLemon)
|
2009-10-09 16:24:22 +00:00
|
|
|
INCLUDE(UseMakeDissectorReg)
|
2009-10-09 16:54:30 +00:00
|
|
|
INCLUDE(UseMakeTapReg)
|
2013-05-07 03:25:49 +00:00
|
|
|
INCLUDE(UseAsn2Wrs)
|
2006-10-26 15:36:50 +00:00
|
|
|
|
2006-10-24 17:39:32 +00:00
|
|
|
# Under linux the release mode (CMAKE_BUILD_TYPE=release) defines NDEBUG
|
|
|
|
|
2011-07-19 01:46:16 +00:00
|
|
|
# Enable with: "make VERBOSE=1"
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE OFF)
|
2006-09-13 10:51:40 +00:00
|
|
|
|
2009-08-29 09:13:28 +00:00
|
|
|
#Defines CMAKE_INSTALL_BINDIR, CMAKE_INSTALL_DATADIR, etc ...
|
2006-10-26 15:36:50 +00:00
|
|
|
include(CMakeInstallDirs)
|
2006-09-05 09:27:22 +00:00
|
|
|
|
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
|
|
|
|
2006-10-24 17:39:32 +00:00
|
|
|
#Where to put libraries
|
|
|
|
if(NOT LIBRARY_OUTPUT_PATH)
|
2009-10-09 11:21:22 +00:00
|
|
|
set(LIBRARY_OUTPUT_PATH ${Wireshark_BINARY_DIR}/lib CACHE INTERNAL
|
2009-09-02 16:33:01 +00:00
|
|
|
"Single output directory for building all libraries.")
|
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
|
|
|
|
2010-05-15 20:41:53 +00:00
|
|
|
include(CMakeOptions.txt)
|
2009-09-09 13:20:33 +00:00
|
|
|
|
2006-10-26 15:36:50 +00:00
|
|
|
|
2009-09-15 12:22:13 +00:00
|
|
|
set(WIRESHARK_C_FLAGS
|
2009-09-14 06:51:22 +00:00
|
|
|
-O2
|
2012-06-24 19:41:13 +00:00
|
|
|
-g
|
2009-09-14 06:51:22 +00:00
|
|
|
-Wall
|
|
|
|
-W
|
|
|
|
-Wextra
|
|
|
|
-Wendif-labels
|
|
|
|
-Wpointer-arith
|
|
|
|
-Warray-bounds
|
|
|
|
-Wformat-security
|
2013-06-01 02:20:12 +00:00
|
|
|
-Wshorten-64-to-32
|
|
|
|
-Wvla
|
|
|
|
-Waddress
|
|
|
|
-Warray-bounds
|
|
|
|
-Wattributes
|
|
|
|
-Wdiv-by-zero
|
|
|
|
-Wignored-qualifiers
|
|
|
|
-Wno-overlength-strings
|
|
|
|
-Wwrite-strings
|
|
|
|
-Wno-long-long
|
2013-07-22 14:45:58 +00:00
|
|
|
-Wpragmas
|
2012-08-23 12:30:16 +00:00
|
|
|
)
|
2012-03-15 21:27:04 +00:00
|
|
|
|
2012-08-23 12:30:16 +00:00
|
|
|
set(WIRESHARK_C_ONLY_FLAGS
|
2012-03-15 21:27:04 +00:00
|
|
|
# The following are C only, not C++
|
2013-04-22 22:32:03 +00:00
|
|
|
-Wc++-compat
|
2012-03-15 21:27:04 +00:00
|
|
|
-Wdeclaration-after-statement
|
2013-06-01 02:20:12 +00:00
|
|
|
-Wshadow
|
2012-03-15 21:27:04 +00:00
|
|
|
-Wno-pointer-sign
|
|
|
|
-Wold-style-definition
|
2013-06-01 02:20:12 +00:00
|
|
|
-Wstrict-prototypes
|
2013-07-22 14:45:58 +00:00
|
|
|
-Wlogical-op
|
|
|
|
-Wjump-misses-init
|
2009-09-14 06:51:22 +00:00
|
|
|
)
|
|
|
|
|
2009-09-15 12:22:13 +00:00
|
|
|
set(WIRESHARK_EXTRA_C_FLAGS
|
2009-09-14 06:51:22 +00:00
|
|
|
-pedantic
|
|
|
|
-Woverflow
|
|
|
|
-fstrict-overflow -Wstrict-overflow=4
|
|
|
|
-Wunreachable-code
|
|
|
|
-Wunsafe-loop-optimizations
|
2013-06-27 10:35:06 +00:00
|
|
|
-Wcast-align
|
2009-09-14 06:51:22 +00:00
|
|
|
-Wcast-qual
|
|
|
|
-Wformat-security
|
|
|
|
-Wredundant-decls
|
2011-05-19 04:35:04 +00:00
|
|
|
# All the registration functions block these for now.
|
2009-09-14 06:51:22 +00:00
|
|
|
-Wmissing-declarations
|
2012-08-23 12:30:16 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(WIRESHARK_EXTRA_C_ONLY_FLAGS
|
2012-03-15 21:27:04 +00:00
|
|
|
# The following are C only, not C++
|
|
|
|
-Wbad-function-cast
|
|
|
|
# All the registration functions block these for now.
|
|
|
|
-Wmissing-prototypes
|
2009-09-14 06:51:22 +00:00
|
|
|
)
|
|
|
|
|
2013-07-22 14:45:58 +00:00
|
|
|
# With clang some tests don't fail properly during testing but only
|
|
|
|
# during real compiles
|
|
|
|
|
|
|
|
if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|
|
|
|
|
|
|
set(WIRESHARK_C_FLAGS ${WIRESHARK_C_FLAGS}
|
|
|
|
-fexcess-precision=fast
|
|
|
|
)
|
|
|
|
|
|
|
|
set(WIRESHARK_C_ONLY_FLAGS ${WIRESHARK_C_ONLY_FLAGS}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2009-11-12 23:09:44 +00:00
|
|
|
if(ENABLE_EXTRA_GCC_CHECKS) # This overrides -Werror
|
2009-09-15 12:22:13 +00:00
|
|
|
set(WIRESHARK_C_FLAGS ${WIRESHARK_C_FLAGS} ${WIRESHARK_EXTRA_C_FLAGS})
|
2012-08-23 12:30:16 +00:00
|
|
|
set(WIRESHARK_C_ONLY_FLAGS ${WIRESHARK_C_ONLY_FLAGS} ${WIRESHARK_EXTRA_C_ONLY_FLAGS})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2006-10-26 15:36:50 +00:00
|
|
|
|
2009-09-08 16:07:14 +00:00
|
|
|
add_definitions(
|
2011-08-07 18:35:36 +00:00
|
|
|
-DG_DISABLE_DEPRECATED
|
2011-12-01 02:31:47 +00:00
|
|
|
-DG_DISABLE_SINGLE_INCLUDES
|
2009-09-08 16:07:14 +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)
|
2013-07-21 18:12:20 +00:00
|
|
|
|
|
|
|
if(NOT DISABLE_WERROR AND NOT ENABLE_EXTRA_GCC_CHECKS)
|
|
|
|
check_c_compiler_flag(-Werror=unknown-warning-option WERR_UNKNOWN)
|
|
|
|
check_c_compiler_flag(-Werror WERROR)
|
|
|
|
else()
|
|
|
|
unset(WERR_UNKNOWN)
|
|
|
|
unset(WERROR)
|
|
|
|
endif()
|
|
|
|
# string of additional compile command line flags for check_c_compiler_flag
|
|
|
|
if(WERR_UNKNOWN)
|
|
|
|
set(CMAKE_REQUIRED_FLAGS -Werror=unknown-warning-option )
|
|
|
|
endif()
|
|
|
|
|
2009-09-24 20:42:08 +00:00
|
|
|
set(C 0)
|
|
|
|
# Sigh: Have to use THIS_FLAG instead of ${F} for some reason
|
|
|
|
foreach(THIS_FLAG ${WIRESHARK_C_FLAGS})
|
|
|
|
set(F WS_C_FLAG_${C})
|
|
|
|
set(${F} ${THIS_FLAG})
|
|
|
|
set(V WS_C_FLAG_VALID${C})
|
2013-08-02 07:20:43 +00:00
|
|
|
message(STATUS "Checking for flag: ${${F}}")
|
2009-09-24 20:42:08 +00:00
|
|
|
check_c_compiler_flag(${${F}} ${V})
|
|
|
|
if (${${V}})
|
2012-08-23 12:30:16 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${F}}")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${F}}")
|
|
|
|
endif()
|
|
|
|
math(EXPR C "${C} + 1")
|
|
|
|
endforeach()
|
|
|
|
# Continue increasing C from previous loop
|
|
|
|
foreach(THIS_FLAG ${WIRESHARK_C_ONLY_FLAGS})
|
|
|
|
set(F WS_C_FLAG_${C})
|
|
|
|
set(${F} ${THIS_FLAG})
|
|
|
|
set(V WS_C_FLAG_VALID${C})
|
2013-08-02 07:20:43 +00:00
|
|
|
message(STATUS "Checking for flag: ${${F}}")
|
2012-08-23 12:30:16 +00:00
|
|
|
check_c_compiler_flag(${${F}} ${V})
|
|
|
|
if (${${V}})
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${F}}")
|
2009-09-14 06:51:22 +00:00
|
|
|
endif()
|
2009-09-24 20:42:08 +00:00
|
|
|
math(EXPR C "${C} + 1")
|
2009-09-14 06:51:22 +00:00
|
|
|
endforeach()
|
2012-08-23 12:30:16 +00:00
|
|
|
message(STATUS "C-Flags: ${CMAKE_C_FLAGS}\nCXX-Flags: ${CMAKE_CXX_FLAGS}")
|
2009-09-14 06:51:22 +00:00
|
|
|
|
2013-02-28 14:09:46 +00:00
|
|
|
check_c_compiler_flag(-fvisibility=hidden FVHIDDEN)
|
|
|
|
if((FVHIDDEN))
|
2013-03-01 23:53:11 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
2013-02-28 14:09:46 +00:00
|
|
|
else() # TODO add alternate compiler flags for hiding symbols
|
2013-03-02 22:27:40 +00:00
|
|
|
message(WARNING "Hiding shared library symbols is not supported by the compiler."
|
2013-02-28 14:09:46 +00:00
|
|
|
" All shared library symbols will be exported.")
|
|
|
|
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
|
|
|
|
2010-09-23 21:18:04 +00:00
|
|
|
set(WIRESHARK_LD_FLAGS
|
|
|
|
-Wl,--as-needed
|
|
|
|
# -flto
|
|
|
|
# -fwhopr
|
|
|
|
# -fwhole-program
|
|
|
|
)
|
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}})
|
|
|
|
set(WS_LINK_FLAGS ${WS_LINK_FLAGS} ${${F}})
|
|
|
|
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)
|
|
|
|
set(LINK_MODE_LIB STATIC)
|
|
|
|
set(LINK_MODE_MODULE STATIC)
|
|
|
|
else()
|
|
|
|
set(LINK_MODE_LIB SHARED)
|
2010-09-24 21:18:39 +00:00
|
|
|
set(LINK_MODE_MODULE MODULE)
|
2009-11-17 11:58:36 +00:00
|
|
|
endif()
|
2009-09-14 06:51:22 +00:00
|
|
|
|
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
|
2012-01-20 11:02:15 +00:00
|
|
|
set(PACKAGELIST GLIB2 GMODULE2 GTHREAD2 M LEX YACC Perl SH PythonInterp)
|
2010-09-28 19:23:15 +00:00
|
|
|
set(GLIB2_FIND_REQUIRED)
|
2011-07-12 21:24:15 +00:00
|
|
|
set(GLIB2_MIN_VERSION 2.14.0)
|
2011-11-07 23:42:53 +00:00
|
|
|
set(GTHREAD2_REQUIRED)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PCAP_REQUIRED)
|
|
|
|
set(M_REQUIRED)
|
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)
|
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()
|
|
|
|
|
2012-02-02 00:46:02 +00:00
|
|
|
# Build the GTK-GUI?
|
2009-08-29 09:13:28 +00:00
|
|
|
if(BUILD_wireshark)
|
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?
|
|
|
|
if(BUILD_qtshark)
|
2013-04-25 23:04:19 +00:00
|
|
|
if(ENABLE_QT5)
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} Qt5Widgets Qt5PrintSupport Qt5LinguistTools)
|
|
|
|
set(QT_VERSION 5)
|
|
|
|
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
|
2011-08-29 13:43:23 +00:00
|
|
|
if(ENABLE_PORTAUDIO)
|
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
|
|
|
|
if(ENABLE_CARES) # C Asynchronouse resolver
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} CARES)
|
2009-09-12 17:20:08 +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()
|
|
|
|
|
|
|
|
# Lua 5.1 dissectors
|
|
|
|
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()
|
|
|
|
|
2009-09-10 07:04:54 +00:00
|
|
|
# Capabilities
|
|
|
|
if(ENABLE_CAP)
|
2010-10-01 08:40:52 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} CAP)
|
2009-09-10 07:04:54 +00:00
|
|
|
endif()
|
|
|
|
|
2009-09-12 17:20:08 +00:00
|
|
|
if(ENABLE_PYTHON)
|
2013-05-01 09:20:59 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} PythonLibs)
|
2010-10-01 08:40:52 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set(PACKAGELIST ${PACKAGELIST} YAPP)
|
|
|
|
|
2010-10-02 06:45:49 +00:00
|
|
|
set(PACKAGELIST ${PACKAGELIST} POD)
|
2009-09-12 17:20:08 +00:00
|
|
|
|
2010-10-01 08:40:52 +00:00
|
|
|
|
2012-09-24 10:23:20 +00:00
|
|
|
set(PROGLIST text2pcap mergecap capinfos editcap reordercap dumpcap)
|
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")
|
|
|
|
set(PACKAGE_VAR "PYTHON")
|
|
|
|
elseif(${PACKAGE} STREQUAL "PythonLibs")
|
|
|
|
set(PACKAGE_VAR "PYTHON")
|
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
|
|
|
message(${PACKAGE_VAR}_FOUND)
|
|
|
|
if (${PACKAGE_VAR}_FOUND)
|
|
|
|
set(HAVE_LIB${PACKAGE_VAR} 1)
|
|
|
|
include_directories(${${PACKAGE_VAR}_INCLUDE_DIRS})
|
|
|
|
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()
|
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
|
|
|
|
2009-12-29 12:12:26 +00:00
|
|
|
#packaging
|
|
|
|
include(CPackConfig.txt)
|
|
|
|
|
2012-01-20 11:02:15 +00:00
|
|
|
if(HAVE_LIBPYTHON)
|
2009-09-12 17:20:08 +00:00
|
|
|
set(HAVE_PYTHON 1)
|
2009-11-11 16:20:37 +00:00
|
|
|
set(PYTHON_DIR "${CMAKE_INSTALL_PREFIX}/lib/wireshark/python/${CPACK_PACKAGE_VERSION}")
|
2009-09-10 07:04:54 +00:00
|
|
|
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()
|
2009-09-09 13:20:33 +00:00
|
|
|
if(ENABLE_AIRPCAP)
|
|
|
|
set(HAVE_AIRPCAP 1)
|
|
|
|
endif()
|
2012-06-20 20:59:43 +00:00
|
|
|
if(HAVE_LIBNL AND ENABLE_AIRPCAP)
|
|
|
|
message(ERROR "Airpcap and Libnl support are mutually exclusive")
|
|
|
|
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)
|
|
|
|
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})
|
|
|
|
# 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()
|
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)
|
|
|
|
|
|
|
|
set(DATAFILE_DIR "${CMAKE_INSTALL_PREFIX}/share/${CPACK_PACKAGE_NAME}")
|
|
|
|
|
2009-09-15 12:22:13 +00:00
|
|
|
if(ENABLE_PLUGINS)
|
|
|
|
set(HAVE_PLUGINS 1)
|
|
|
|
set(PLUGIN_DIR="${DATAFILE_DIR}/plugins/${CPACK_PACKAGE_VERSION}")
|
|
|
|
set(PLUGIN_SRC_DIRS
|
|
|
|
plugins/asn1
|
2009-09-16 06:30:03 +00:00
|
|
|
plugins/docsis
|
|
|
|
plugins/ethercat
|
|
|
|
plugins/gryphon
|
|
|
|
plugins/irda
|
|
|
|
plugins/m2m
|
|
|
|
plugins/mate
|
2009-09-21 00:19:07 +00:00
|
|
|
plugins/opcua
|
2009-09-23 04:41:14 +00:00
|
|
|
plugins/profinet
|
|
|
|
plugins/stats_tree
|
|
|
|
plugins/unistim
|
|
|
|
plugins/wimax
|
|
|
|
plugins/wimaxasncp
|
2012-07-20 01:21:27 +00:00
|
|
|
plugins/wimaxmacphy
|
2009-09-15 12:22:13 +00:00
|
|
|
)
|
2009-09-25 18:09:42 +00:00
|
|
|
# It seems this stuff doesn't build with autofoo either...
|
|
|
|
# if(YAPP_FOUND)
|
|
|
|
# set(PLUGIN_SRC_DIRS
|
|
|
|
# ${PLUGIN_SRC_DIRS}
|
|
|
|
# plugins/tpg
|
|
|
|
# )
|
|
|
|
# endif()
|
2009-09-15 12:22:13 +00:00
|
|
|
else()
|
|
|
|
set(PLUGIN_SRC_DIRS )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
foreach(PLUGIN_DIR ${PLUGIN_SRC_DIRS})
|
|
|
|
add_subdirectory( ${PLUGIN_DIR} )
|
|
|
|
endforeach()
|
|
|
|
|
2013-04-23 23:05:33 +00:00
|
|
|
add_subdirectory( asn1 EXCLUDE_FROM_ALL )
|
2009-10-10 05:57:25 +00:00
|
|
|
add_subdirectory( codecs )
|
|
|
|
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 )
|
|
|
|
|
2013-02-25 18:12:20 +00:00
|
|
|
add_custom_target(dumpabi DEPENDS dumpabi-libwireshark dumpabi-libwiretap dumpabi-libwsutil color.h)
|
|
|
|
|
2013-07-21 13:34:50 +00:00
|
|
|
if(ENABLE_ECHLD)
|
|
|
|
add_subdirectory( echld )
|
|
|
|
endif()
|
|
|
|
|
2011-06-08 18:10:03 +00:00
|
|
|
if(BUILD_wireshark AND GTK_FOUND)
|
2012-01-15 21:59:11 +00:00
|
|
|
add_subdirectory( ui/gtk )
|
2010-10-01 12:17:11 +00:00
|
|
|
endif()
|
|
|
|
|
2012-02-02 00:46:02 +00:00
|
|
|
if(BUILD_qtshark AND QT_FOUND)
|
|
|
|
add_subdirectory( ui/qt )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
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}")
|
|
|
|
|
2009-11-12 23:09:44 +00:00
|
|
|
if(ENABLE_GUIDES)
|
2010-05-15 21:40:25 +00:00
|
|
|
add_subdirectory( docbook )
|
2009-11-12 23:09:44 +00:00
|
|
|
endif()
|
|
|
|
|
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)
|
|
|
|
|
2006-10-24 17:39:32 +00:00
|
|
|
#Platform specific
|
2013-03-01 23:53:11 +00:00
|
|
|
#if(UNIX)
|
|
|
|
#endif()
|
2006-10-24 17:39:32 +00:00
|
|
|
|
|
|
|
if(APPLE)
|
2012-11-22 18:19:37 +00:00
|
|
|
#
|
|
|
|
# We assume that APPLE means OS X so that we have the OS X
|
|
|
|
# frameworks.
|
|
|
|
#
|
2009-09-02 16:33:01 +00:00
|
|
|
set(HAVE_OS_X_FRAMEWORKS 1)
|
2012-11-22 18:19:37 +00:00
|
|
|
FIND_LIBRARY (APPLE_APPLICATION_SERVICES_LIBRARY ApplicationServices)
|
2012-11-22 16:49:17 +00:00
|
|
|
FIND_LIBRARY (APPLE_CORE_FOUNDATION_LIBRARY CoreFoundation)
|
|
|
|
FIND_LIBRARY (APPLE_SYSTEM_CONFIGURATION_LIBRARY SystemConfiguration)
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
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
|
|
|
|
2006-09-06 22:28:19 +00:00
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h)
|
|
|
|
|
2013-01-18 16:05:29 +00:00
|
|
|
set( configure_input "Built with CMake ${CMAKE_VERSION}" )
|
2013-01-18 01:37:27 +00:00
|
|
|
set( VERSION ${PROJECT_VERSION} )
|
|
|
|
|
|
|
|
configure_file(
|
|
|
|
${CMAKE_SOURCE_DIR}/packaging/macosx/Info.plist.in
|
|
|
|
${CMAKE_SOURCE_DIR}/packaging/macosx/Info.plist
|
|
|
|
@ONLY)
|
|
|
|
|
2009-09-24 20:42:08 +00:00
|
|
|
include(FeatureSummary)
|
2009-10-10 05:57:25 +00:00
|
|
|
#SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ]
|
2012-02-04 14:19:38 +00:00
|
|
|
#FEATURE_SUMMARY(WHAT ALL) Requires removal of our local copy of FeatureSummary
|
2009-09-24 20:42:08 +00:00
|
|
|
PRINT_ENABLED_FEATURES()
|
|
|
|
PRINT_DISABLED_FEATURES()
|
|
|
|
|
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
|
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
|
|
|
|
2010-01-13 19:09:47 +00:00
|
|
|
ADD_CUSTOM_TARGET(
|
|
|
|
svnversion ALL
|
2010-01-14 15:43:33 +00:00
|
|
|
COMMAND ${PERL}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
|
|
|
)
|
|
|
|
|
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
OUTPUT svnversion.h
|
|
|
|
COMMAND ${PERL}
|
2009-09-25 02:50:48 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
DEPENDS
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
|
2009-05-29 10:57:47 +00:00
|
|
|
)
|
2006-10-24 17:39:32 +00:00
|
|
|
|
2009-06-16 04:12:30 +00:00
|
|
|
if(UNIX)
|
2009-09-02 16:33:01 +00:00
|
|
|
set(PLATFORM_SRC
|
2013-05-22 04:17:23 +00:00
|
|
|
capture-pcap-util-unix.c
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-08-30 06:24:44 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
2009-09-02 16:33:01 +00:00
|
|
|
set(PLATFORM_SRC
|
From Mike Garratt:
Friendly Names for interfaces on Windows
Notes on the changes the patch covers:
* if_info_t struct: addition of friendly_name
* Dumpcap Interface list format changes:
+ Win32: "dumpcap -D" shows friendly_name in place of descript if known
+ All: machine interface "dumpcap -D -Z none" includes friendly_name in the
list in addition to the existing parameters
* interface_options struct: addition of console_display_name
+ When an interface name is displayed in a console, it will typically be the
console_display_name (instead of name).
+ console_display_name is used as the basis of the autogenerated temp
filenames
+ console_display_name is typically set to the friendly_name if known,
otherwise it is set to the interface name
* Enhancements to capture_opts_add_iface_opt() (the function which process -i
options).
+ Can now specify the interface using its name and friendly_name
+ Interface name matching is case insenstive
+ Name matching first attempts exact matching, then falls back to prefix
matching
(e.g. dumpcap -i local)
+ Validates interface names, instead of blindly sending them off to
winpcap/libpcap
+ Interface specification by number is still supported.
* capture_opts_trim_iface() has been refactored:
+ Instead of repeating a decent chunk of the cost in
capture_opts_add_iface_opt(), it calls capture_opts_trim_iface() to specify the
interface.
* introduction of capture_win_ifnames.[ch] (windows only code)
+ Implements static function GetInterfaceFriendlyNameFromDeviceGuid() - a
windows version independant function to convert an interface guid into its
friendly name. Uses published api functions on windows vista and higher, but
falls back to unpublished API functions on older windows releases.
+ void get_windows_interface_friendlyname(/* IN */ char
*interface_devicename, /* OUT */char **interface_friendlyname); - extracts the
GUID from the interface_devicename, then uses
GetInterfaceFriendlyNameFromDeviceGuid() to do the resolution
* Auto temp filename generation:
+ Now uses wireshark_pcapng_* or wireshark_pcap_* depending on file format
+ Basis temp filename format on console_display_name
+ Win32: if console_display_name is a windows interface guid, extracts
numbers from GUID here (instead of in interface option processing)
GUI CHANGES:
* Dialog that displays when you click the "Manage Interfaces" button (within
Capture Options dialog) has been renamed from "Add new interfaces" to
"Interface Management"
* ui/gtk/capture_dlg.c: new_interfaces_w variable renamed to
interface_management_w
* Win32: Local Interfaces tab on Interface Management dialog, shows includes
friendly name as far left column
* Interface Management dialog defaults to larger size on win32 - so it fits
without resizing local interfaces tab
* Interface Management dialog now saves preferences when you click the apply
button (local hidden interfaces was not persisting across restarts)
* Tweaks: "Interface Details" dialog (Interface list->Capture Interfaces ->
Details):
+ "Friendly Name" renamed to "NDIS Friendly Name"
+ Added "OS Friendly Name" to the top of the list
* Win32: The "Capture Interfaces" dialog now shows the friendly name instead of
device guid
* Welcome screen:
+ The height of the interface list scrollbox dynamically adjusts & updates to
the number visible interfaces.
Up to 10 interfaces can be listed without a scroll bar, the minimum height
is for 2 interfaces.
+ Win32: now shows just the Friendly Name if known - in place of
"Interfacename_Guid:(Description)"
svn path=/trunk/; revision=46083
2012-11-19 20:07:27 +00:00
|
|
|
capture-wpcap.c capture_wpcap_packet.c capture_win_ifnames.c
|
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
|
|
|
|
2009-09-15 12:22:13 +00:00
|
|
|
set(WTAP_PLUGIN_SOURCES
|
|
|
|
epan/plugins.c
|
|
|
|
epan/filesystem.c
|
|
|
|
)
|
|
|
|
|
2010-03-04 23:35:43 +00:00
|
|
|
set(SHARK_COMMON_CAPTURE_SRC
|
|
|
|
capture_ifinfo.c
|
|
|
|
capture_ui_utils.c
|
|
|
|
)
|
|
|
|
|
2009-09-08 07:03:57 +00:00
|
|
|
set(WIRESHARK_COMMON_SRC
|
|
|
|
${PLATFORM_SRC}
|
|
|
|
capture-pcap-util.c
|
|
|
|
cfile.c
|
2012-11-22 16:49:17 +00:00
|
|
|
cfutils.c
|
2009-09-08 07:03:57 +00:00
|
|
|
clopts_common.c
|
2013-07-11 05:47:02 +00:00
|
|
|
frame_tvbuff.c
|
2009-11-17 12:28:06 +00:00
|
|
|
svnversion.h
|
2009-09-08 07:03:57 +00:00
|
|
|
sync_pipe_write.c
|
|
|
|
version_info.c
|
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
|
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-09-21 00:19:07 +00:00
|
|
|
COPYING
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/capinfos.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
|
|
|
)
|
|
|
|
|
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
|
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}
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
|
2012-02-02 00:46:02 +00:00
|
|
|
if( (BUILD_wireshark AND GTK_FOUND) OR (BUILD_qtshark AND QT_FOUND) )
|
2009-09-08 07:03:57 +00:00
|
|
|
set(wireshark_FILES
|
|
|
|
airpcap_loader.c
|
|
|
|
capture.c
|
|
|
|
capture_info.c
|
|
|
|
capture_opts.c
|
|
|
|
capture_sync.c
|
|
|
|
color_filters.c
|
|
|
|
file.c
|
|
|
|
fileset.c
|
|
|
|
filters.c
|
2012-06-28 16:21:51 +00:00
|
|
|
iface_monitor.c
|
2009-09-08 07:03:57 +00:00
|
|
|
proto_hier_stats.c
|
|
|
|
summary.c
|
2012-06-24 19:41:13 +00:00
|
|
|
ws80211_utils.c
|
2010-03-04 23:35:43 +00:00
|
|
|
${SHARK_COMMON_CAPTURE_SRC}
|
2009-09-08 07:03:57 +00:00
|
|
|
${WIRESHARK_COMMON_SRC}
|
|
|
|
)
|
2012-02-02 00:46:02 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(BUILD_wireshark AND GTK_FOUND)
|
|
|
|
set(wireshark_LIBS
|
|
|
|
gtkui
|
2012-09-15 02:52:29 +00:00
|
|
|
ui
|
2012-02-02 00:46:02 +00:00
|
|
|
${GTK2_LIBRARIES}
|
|
|
|
${GTK3_LIBRARIES}
|
|
|
|
${GTHREAD2_LIBRARIES}
|
|
|
|
codecs
|
|
|
|
${PORTAUDIO_LIBRARIES}
|
|
|
|
${LIBEPAN_LIBS}
|
2012-11-22 18:19:37 +00:00
|
|
|
${APPLE_APPLICATION_SERVICES_LIBRARY}
|
2012-02-02 00:46:02 +00:00
|
|
|
${APPLE_CORE_SERVICES_LIBRARY}
|
2012-11-22 16:49:17 +00:00
|
|
|
${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
|
2012-09-06 10:37:17 +00:00
|
|
|
${NL_LIBRARIES}
|
2012-02-02 00:46:02 +00:00
|
|
|
)
|
|
|
|
# qtshark and wireshark share wireshark_FILES
|
|
|
|
|
2009-09-08 15:56:16 +00:00
|
|
|
add_executable(wireshark ${wireshark_FILES})
|
2010-01-13 19:09:47 +00:00
|
|
|
add_dependencies(wireshark svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(wireshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
2009-09-08 15:56:16 +00:00
|
|
|
target_link_libraries(wireshark ${wireshark_LIBS})
|
|
|
|
install(TARGETS wireshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2009-08-27 16:11:16 +00:00
|
|
|
endif()
|
2009-06-16 05:37:46 +00:00
|
|
|
|
2012-02-02 00:46:02 +00:00
|
|
|
if(BUILD_qtshark AND QT_FOUND)
|
|
|
|
set(qtshark_LIBS
|
|
|
|
qtui
|
2012-09-15 02:52:29 +00:00
|
|
|
ui
|
2012-02-02 00:46:02 +00:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
${GTHREAD2_LIBRARIES}
|
|
|
|
codecs
|
|
|
|
${PORTAUDIO_LIBRARIES}
|
|
|
|
${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
|
|
|
)
|
|
|
|
# qtshark and wireshark share wireshark_FILES
|
|
|
|
|
|
|
|
add_executable(qtshark ${wireshark_FILES})
|
|
|
|
add_dependencies(qtshark svnversion)
|
|
|
|
set_target_properties(qtshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
|
|
|
target_link_libraries(qtshark ${qtshark_LIBS})
|
|
|
|
install(TARGETS qtshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
endif()
|
|
|
|
|
2012-01-12 19:16:15 +00:00
|
|
|
register_tap_files(tshark-tap-register.c
|
|
|
|
${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
|
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
|
|
|
|
capture_sync.c
|
|
|
|
tshark-tap-register.c
|
|
|
|
tshark.c
|
|
|
|
${TSHARK_TAP_SRC}
|
2010-03-04 23:35:43 +00:00
|
|
|
${SHARK_COMMON_CAPTURE_SRC}
|
2009-09-08 07:03:57 +00:00
|
|
|
${WIRESHARK_COMMON_SRC}
|
|
|
|
)
|
|
|
|
add_executable(tshark ${tshark_FILES})
|
2010-01-13 19:09:47 +00:00
|
|
|
add_dependencies(tshark svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(tshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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
|
|
|
|
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
|
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
|
|
|
|
${WIRESHARK_COMMON_SRC}
|
|
|
|
rawshark.c
|
2012-02-17 16:59:14 +00:00
|
|
|
ui/util.c
|
2009-09-08 07:03:57 +00:00
|
|
|
)
|
|
|
|
add_executable(rawshark ${rawshark_FILES})
|
2010-01-13 19:09:47 +00:00
|
|
|
add_dependencies(rawshark svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(rawshark PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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})
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(dftest PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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
|
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})
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(randpkt PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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}
|
|
|
|
)
|
2009-09-02 16:33:01 +00:00
|
|
|
add_lex_files(text2pcap_FILES
|
|
|
|
text2pcap-scanner.l
|
|
|
|
)
|
|
|
|
add_executable(text2pcap ${text2pcap_FILES})
|
2010-01-13 19:09:47 +00:00
|
|
|
add_dependencies(text2pcap svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(text2pcap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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
|
|
|
|
svnversion.h
|
2012-09-24 10:23:20 +00:00
|
|
|
${WTAP_PLUGIN_SOURCES}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
add_executable(mergecap ${mergecap_FILES})
|
2010-01-13 19:09:47 +00:00
|
|
|
add_dependencies(mergecap svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(mergecap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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
|
|
|
|
svnversion.h
|
|
|
|
${WTAP_PLUGIN_SOURCES}
|
|
|
|
)
|
|
|
|
add_executable(reordercap ${reordercap_FILES})
|
|
|
|
add_dependencies(reordercap svnversion)
|
|
|
|
set_target_properties(reordercap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
|
|
|
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
|
2009-09-15 12:22:13 +00:00
|
|
|
${WTAP_PLUGIN_SOURCES}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
add_executable(capinfos ${capinfos_FILES})
|
2010-07-17 14:07:13 +00:00
|
|
|
add_dependencies(capinfos svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(capinfos PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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
|
|
|
|
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
|
2009-09-15 12:22:13 +00:00
|
|
|
${WTAP_PLUGIN_SOURCES}
|
2009-09-02 16:33:01 +00:00
|
|
|
)
|
|
|
|
add_executable(editcap ${editcap_FILES})
|
2010-01-13 19:09:47 +00:00
|
|
|
add_dependencies(editcap svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(editcap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
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
|
2009-09-08 07:03:57 +00:00
|
|
|
# @INET_NTOP_LO@
|
2011-01-18 17:49:41 +00:00
|
|
|
wsutil
|
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
|
|
|
|
svnversion.h
|
|
|
|
capture_opts.c
|
|
|
|
capture-pcap-util.c
|
|
|
|
capture_stop_conditions.c
|
2012-11-22 16:49:17 +00:00
|
|
|
cfutils.c
|
2009-09-02 16:33:01 +00:00
|
|
|
clopts_common.c
|
|
|
|
conditions.c
|
|
|
|
dumpcap.c
|
|
|
|
pcapio.c
|
|
|
|
ringbuffer.c
|
|
|
|
sync_pipe_write.c
|
|
|
|
version_info.c
|
2012-06-20 18:46:16 +00:00
|
|
|
ws80211_utils.c
|
2009-09-02 16:33:01 +00:00
|
|
|
${PLATFORM_SRC}
|
|
|
|
)
|
|
|
|
add_executable(dumpcap ${dumpcap_FILES})
|
2010-01-13 19:09:47 +00:00
|
|
|
add_dependencies(dumpcap svnversion)
|
2010-09-23 07:02:33 +00:00
|
|
|
set_target_properties(dumpcap PROPERTIES LINK_FLAGS "${WS_LINK_FLAGS}")
|
2009-09-02 16:33:01 +00:00
|
|
|
target_link_libraries(dumpcap ${dumpcap_LIBS})
|
|
|
|
install(TARGETS dumpcap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
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
|
2009-09-25 02:50:48 +00:00
|
|
|
COMMAND ${PERL}
|
|
|
|
${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
|
|
|
|
${CMAKE_BINARY_DIR}/wireshark.pod
|
2009-11-11 16:20:37 +00:00
|
|
|
COMMAND ${PERL}
|
|
|
|
${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
|
|
|
COMMAND cat
|
|
|
|
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
|
2010-09-23 21:14:23 +00:00
|
|
|
${CMAKE_BINARY_DIR}/AUTHORS-SHORT-FORMAT
|
2010-09-23 21:06:31 +00:00
|
|
|
> ${CMAKE_BINARY_DIR}/wireshark.pod
|
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
|
|
|
${CMAKE_SOURCE_DIR}/doc/wireshark.pod.template
|
|
|
|
)
|
|
|
|
|
|
|
|
pod2manhtml( ${CMAKE_SOURCE_DIR}/doc/capinfos 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(
|
|
|
|
auxiliary ALL
|
|
|
|
DEPENDS
|
|
|
|
AUTHORS-SHORT
|
2009-11-11 16:20:37 +00:00
|
|
|
capinfos.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
|
|
|
|
)
|
|
|
|
|
|
|
|
set(MAN1_FILES
|
|
|
|
${CMAKE_BINARY_DIR}/capinfos.1
|
2010-07-14 16:16:29 +00:00
|
|
|
${CMAKE_BINARY_DIR}/dftest.1
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/dumpcap.1
|
|
|
|
${CMAKE_BINARY_DIR}/editcap.1
|
|
|
|
${CMAKE_BINARY_DIR}/idl2wrs.1
|
|
|
|
${CMAKE_BINARY_DIR}/mergecap.1
|
2010-07-14 16:16:29 +00:00
|
|
|
${CMAKE_BINARY_DIR}/randpkt.1
|
2009-11-11 16:20:37 +00:00
|
|
|
${CMAKE_BINARY_DIR}/rawshark.1
|
2012-10-03 17:29:06 +00:00
|
|
|
${CMAKE_BINARY_DIR}/reordercap.1
|
2009-11-11 16:20:37 +00:00
|
|
|
${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-25 02:50:48 +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}
|
|
|
|
${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
|
|
|
|
)
|
|
|
|
|
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}
|
|
|
|
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
|
|
|
|
|
|
|
|
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()
|