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
|
|
|
#
|
|
|
|
|
2013-10-15 07:30:05 +00:00
|
|
|
include(UseABICheck)
|
2006-09-05 09:27:22 +00:00
|
|
|
|
2015-02-18 08:03:42 +00:00
|
|
|
set(WIRETAP_FILES
|
2009-05-29 10:57:47 +00:00
|
|
|
5views.c
|
2011-10-26 04:31:06 +00:00
|
|
|
aethra.c
|
2009-06-15 18:56:46 +00:00
|
|
|
ascendtext.c
|
2009-05-29 10:57:47 +00:00
|
|
|
atm.c
|
|
|
|
ber.c
|
|
|
|
btsnoop.c
|
2013-03-30 09:56:57 +00:00
|
|
|
camins.c
|
2014-10-14 06:45:05 +00:00
|
|
|
capsa.c
|
2009-05-29 10:57:47 +00:00
|
|
|
catapult_dct2000.c
|
|
|
|
commview.c
|
|
|
|
cosine.c
|
|
|
|
csids.c
|
|
|
|
daintree-sna.c
|
|
|
|
dbs-etherwatch.c
|
|
|
|
dct3trace.c
|
|
|
|
erf.c
|
|
|
|
eyesdn.c
|
|
|
|
file_access.c
|
2013-07-23 09:41:35 +00:00
|
|
|
file_wrappers.c
|
2009-05-29 10:57:47 +00:00
|
|
|
hcidump.c
|
|
|
|
i4btrace.c
|
2010-10-20 00:36:53 +00:00
|
|
|
ipfix.c
|
2009-05-29 10:57:47 +00:00
|
|
|
iptrace.c
|
|
|
|
iseries.c
|
2015-01-19 18:54:41 +00:00
|
|
|
json.c
|
2009-05-29 10:57:47 +00:00
|
|
|
k12.c
|
|
|
|
lanalyzer.c
|
|
|
|
libpcap.c
|
2014-02-09 17:37:44 +00:00
|
|
|
logcat.c
|
2014-05-14 07:45:23 +00:00
|
|
|
logcat_text.c
|
2013-07-16 02:35:33 +00:00
|
|
|
merge.c
|
2014-05-09 02:59:19 +00:00
|
|
|
mpeg.c
|
2016-02-09 15:16:15 +00:00
|
|
|
mplog.c
|
2014-05-09 05:18:49 +00:00
|
|
|
mime_file.c
|
2012-03-02 06:02:28 +00:00
|
|
|
mp2t.c
|
2009-05-29 10:57:47 +00:00
|
|
|
netmon.c
|
2009-06-15 18:56:46 +00:00
|
|
|
netscaler.c
|
2009-05-29 10:57:47 +00:00
|
|
|
netscreen.c
|
|
|
|
nettl.c
|
2015-04-29 07:19:08 +00:00
|
|
|
nettrace_3gpp_32_423.c
|
2009-05-29 10:57:47 +00:00
|
|
|
network_instruments.c
|
|
|
|
netxray.c
|
|
|
|
ngsniffer.c
|
|
|
|
packetlogger.c
|
|
|
|
pcap-common.c
|
|
|
|
pcapng.c
|
2012-07-09 23:07:28 +00:00
|
|
|
peekclassic.c
|
|
|
|
peektagged.c
|
2009-05-29 10:57:47 +00:00
|
|
|
pppdump.c
|
|
|
|
radcom.c
|
|
|
|
snoop.c
|
2013-07-28 23:41:18 +00:00
|
|
|
stanag4607.c
|
2009-06-15 18:56:46 +00:00
|
|
|
tnef.c
|
2009-05-29 10:57:47 +00:00
|
|
|
toshiba.c
|
|
|
|
visual.c
|
|
|
|
vms.c
|
2012-04-20 12:08:31 +00:00
|
|
|
vwr.c
|
2009-05-29 10:57:47 +00:00
|
|
|
wtap.c
|
2016-01-26 01:17:21 +00:00
|
|
|
wtap_opttypes.c
|
2016-04-19 07:03:08 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/ws_version_info.c
|
2009-05-29 10:57:47 +00:00
|
|
|
)
|
|
|
|
|
CMake: Add /WX
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off,
similar to config.nmake.
We haven't compiled C++ code with -Wshorten-64-to-32 for quite
some time so there's no need to add -Wno-shorten-64-to-32 in
ui/qt/CMakeLists.txt.
Additionally, squelch
----
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled
with
[
_RanIt=QList<QString>::iterator
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
with
[
_RanIt=QList<QString>::iterator
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled
with
[
_Iter=QList<QString>::iterator
, _RanIt=QList<QString>::iterator
, _Diff=int
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
.\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
with
[
_RanIt=QList<QString>::iterator
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
----
in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp
so that we'll compile successfully.
Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357
Reviewed-on: https://code.wireshark.org/review/10533
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-15 00:19:02 +00:00
|
|
|
if (WERROR_COMMON_FLAGS)
|
2009-11-07 10:07:00 +00:00
|
|
|
set_source_files_properties(
|
2015-02-18 08:03:42 +00:00
|
|
|
${WIRETAP_FILES}
|
2009-11-07 10:07:00 +00:00
|
|
|
PROPERTIES
|
CMake: Add /WX
Add "/WX" to the Visual C++ compiler flags if DISABLE_WERROR is off,
similar to config.nmake.
We haven't compiled C++ code with -Wshorten-64-to-32 for quite
some time so there's no need to add -Wno-shorten-64-to-32 in
ui/qt/CMakeLists.txt.
Additionally, squelch
----
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3050) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3065) : see reference to function template instantiation 'void std::_Median<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_RanIt,_Pr)' being compiled
with
[
_RanIt=QList<QString>::iterator
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3127) : see reference to function template instantiation 'std::pair<_RanIt,_RanIt> std::_Unguarded_partition<_RanIt,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
with
[
_RanIt=QList<QString>::iterator
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3157) : see reference to function template instantiation 'void std::_Sort<_Iter,int,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Diff,_Pr)' being compiled
with
[
_Iter=QList<QString>::iterator
, _RanIt=QList<QString>::iterator
, _Diff=int
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
.\rpc_service_response_time_dialog.cpp(130) : see reference to function template instantiation 'void std::sort<QList<QString>::iterator,bool(__cdecl *)(const QString &,const QString &)>(_RanIt,_RanIt,_Pr)' being compiled
with
[
_RanIt=QList<QString>::iterator
, _Pr=bool (__cdecl *)(const QString &,const QString &)
]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3051) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3052) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\algorithm(3053) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data (.\rpc_service_response_time_dialog.cpp)
----
in both rpc_service_response_time_dialog.cpp and wireshark_application.cpp
so that we'll compile successfully.
Change-Id: I457bcede99dcb1f3c1001f1f559c4901bb000357
Reviewed-on: https://code.wireshark.org/review/10533
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-09-15 00:19:02 +00:00
|
|
|
COMPILE_FLAGS ${WERROR_COMMON_FLAGS}
|
2009-11-07 10:07:00 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2016-03-11 19:51:39 +00:00
|
|
|
add_lex_files(LEX_FILES GENERATED_FILES
|
2015-12-05 17:12:50 +00:00
|
|
|
ascend_scanner.l
|
|
|
|
k12text.l
|
|
|
|
)
|
|
|
|
|
2016-03-11 19:51:39 +00:00
|
|
|
add_yacc_files(YACC_FILES GENERATED_FILES
|
2009-06-15 18:56:46 +00:00
|
|
|
ascend.y
|
2009-05-29 10:57:47 +00:00
|
|
|
)
|
|
|
|
|
2009-09-23 15:56:44 +00:00
|
|
|
set(wiretap_LIBS
|
2009-10-01 10:52:01 +00:00
|
|
|
${GLIB2_LIBRARIES}
|
2010-09-25 15:38:12 +00:00
|
|
|
${GMODULE2_LIBRARIES}
|
2010-09-23 21:14:23 +00:00
|
|
|
${ZLIB_LIBRARIES}
|
2009-10-01 10:52:01 +00:00
|
|
|
wsutil
|
2009-09-23 15:56:44 +00:00
|
|
|
)
|
|
|
|
|
2009-11-17 11:58:36 +00:00
|
|
|
add_library(wiretap ${LINK_MODE_LIB}
|
2009-05-29 10:57:47 +00:00
|
|
|
${WIRETAP_FILES}
|
2016-03-11 19:51:39 +00:00
|
|
|
${GENERATED_FILES}
|
2015-01-10 21:29:57 +00:00
|
|
|
${CMAKE_BINARY_DIR}/image/wiretap.rc
|
2006-09-05 09:27:22 +00:00
|
|
|
)
|
2013-02-25 18:12:20 +00:00
|
|
|
|
2016-04-20 22:51:12 +00:00
|
|
|
add_dependencies(wiretap version)
|
|
|
|
|
2015-10-05 20:09:52 +00:00
|
|
|
set(FULL_SO_VERSION "0.0.0")
|
2013-02-25 18:12:20 +00:00
|
|
|
|
2014-07-09 13:39:41 +00:00
|
|
|
set_target_properties(wiretap PROPERTIES
|
2016-06-21 13:31:39 +00:00
|
|
|
PREFIX "lib"
|
2014-07-09 13:39:41 +00:00
|
|
|
COMPILE_DEFINITIONS "WS_BUILD_DLL"
|
2016-08-16 21:21:59 +00:00
|
|
|
COMPILE_OPTIONS "${WS_WARNINGS_C_FLAGS}"
|
2014-07-09 13:39:41 +00:00
|
|
|
LINK_FLAGS "${WS_LINK_FLAGS}"
|
|
|
|
VERSION ${FULL_SO_VERSION} SOVERSION 0
|
|
|
|
FOLDER "DLLs"
|
|
|
|
)
|
2006-09-05 09:27:22 +00:00
|
|
|
|
2014-10-10 01:24:18 +00:00
|
|
|
if(ENABLE_APPLICATION_BUNDLE)
|
|
|
|
set_target_properties(wiretap PROPERTIES
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2013-10-15 07:30:05 +00:00
|
|
|
ABICHECK(libwiretap)
|
2013-02-25 18:12:20 +00:00
|
|
|
|
|
|
|
add_custom_command(OUTPUT libwiretap.abi.tar.gz
|
2015-08-16 00:05:17 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory ${ABICHECK_TMPDIR}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E make_directory ${ABICHECK_TMPDIR}
|
|
|
|
COMMAND ${ABI_COPY_COMMAND} ../config.h ${ABICHECK_TMPDIR}/ ${ABI_COPY_FLAGS}
|
|
|
|
COMMAND ${ABI_COPY_COMMAND} ${ABICHECK_HEADERS} ${ABICHECK_TMPDIR}/ ${ABI_COPY_FLAGS}
|
2013-10-19 15:51:36 +00:00
|
|
|
COMMAND ${ABICHECK_COMMAND}
|
2013-10-19 14:55:12 +00:00
|
|
|
COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps/libwiretap/libwiretap_* ${CMAKE_CURRENT_BINARY_DIR}/libwiretap.abi.tar.gz
|
2015-08-16 00:05:17 +00:00
|
|
|
COMMAND rm -rf ${ABICHECK_TMPDIR} ${CMAKE_CURRENT_BINARY_DIR}/abi_dumps
|
2013-02-25 21:27:07 +00:00
|
|
|
DEPENDS ${HEADERS} wiretap)
|
2013-02-25 18:12:20 +00:00
|
|
|
|
2009-09-23 15:56:44 +00:00
|
|
|
target_link_libraries(wiretap ${wiretap_LIBS})
|
|
|
|
|
2009-11-17 11:58:36 +00:00
|
|
|
if(NOT ${ENABLE_STATIC})
|
|
|
|
install(TARGETS wiretap
|
2014-05-29 03:58:05 +00:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2009-11-17 11:58:36 +00:00
|
|
|
)
|
|
|
|
endif()
|
2016-03-11 19:51:39 +00:00
|
|
|
|
|
|
|
CHECKAPI(
|
|
|
|
NAME
|
|
|
|
wiretap
|
|
|
|
SWITCHES
|
|
|
|
## 'abort' checking disabled for now pending resolution of existing use of g_assert & g_error
|
|
|
|
## -g abort -g termoutput
|
|
|
|
-g termoutput -build
|
|
|
|
SOURCES
|
|
|
|
${WIRETAP_FILES}
|
|
|
|
# LEX files commented out due to use of malloc, free etc.
|
|
|
|
# ${LEX_FILES}
|
|
|
|
${YACC_FILES}
|
|
|
|
)
|