forked from wireshark/wireshark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CPackConfig.txt
129 lines (119 loc) · 4.92 KB
/
CPackConfig.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# CPackConfig.txt
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <[email protected]>
# Copyright 1998 Gerald Combs
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# XXX The CMake documentation recommends setting CPACK_PROJECT_CONFIG_FILE
# instead.
if(WIN32)
# To do:
# - Add WinPCap
# - Add USBPcap
# - Add CLI DLLs
# - Add common (Glib, etc) DLLs
# - Add Qt DLLs
# - Add
set(CPACK_PACKAGE_NAME Wireshark)
else()
set(CPACK_PACKAGE_NAME wireshark)
endif()
# Directory to copy sources to
set(WS_SOURCE_DIR "${CMAKE_BINARY_DIR}/source_dir")
set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${WS_SOURCE_DIR}/;/")
# dist target that prepares source dir
add_custom_target(dist
COMMAND "${CMAKE_COMMAND}"
-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}"
-DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
-DWS_SOURCE_DIR="${WS_SOURCE_DIR}"
-P "${CMAKE_SOURCE_DIR}/cmake/modules/Dist.cmake"
COMMAND "${CMAKE_MAKE_PROGRAM}" package_source
)
set(CPACK_PACKAGE_DESCRIPTION "A set of command line and gui tools to capture and decode traffic")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Packet capturing and decoding")
set(CPACK_PACKAGE_VENDOR "Wireshark developers")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_MINOR_VERSION}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
set(CPACK_PACKAGE_CONTACT "[email protected]")
# set(CPACK_PACKAGE_EXECUTABLES "wireshark")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set(CPACK_STRIP_FILES true)
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
if(NOT WIN32)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr")
endif()
# WiX
# WiX wants RTF. CPack+WiX wants a file extension.
set(CPACK_WIX_LICENSE_RTF "${CMAKE_SOURCE_DIR}/packaging/wix/gpl-2.0.rtf")
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/image/wireshark.ico")
#set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/image/wix-ui-banner.png")
#set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/image/wix-ui-dialog.png")
set(CPACK_WIX_UPGRADE_GUID "5809F81A-587D-470D-8016-DA480DAE379F")
if(WIN32)
set(CPACK_GENERATOR "WIX")
else()
# XXX Currently unused and untested.
# Win: WIX, NSIS, ZIP, SOURCE_ZIP, CYGWIN_BINARY, SOURCE_CYGWIN,
# Linux/Unix: DEB, RPM, STGZ, TBZ2, TZ, SOURCE_TZ, SOURCE_TGZ
# OSX: PACKAGEMAKER, OSXX11
# Syntax: "Type1;Type2;Type3"
if(NOT CMAKE_VERSION VERSION_LESS "3.1.0")
# TXZ generator supported since CMake 3.1.0
set(CPACK_GENERATOR "TXZ")
set(CPACK_SOURCE_GENERATOR "TXZ")
else()
set(CPACK_GENERATOR "TBZ2")
set(CPACK_SOURCE_GENERATOR "TBZ2")
endif()
endif()
#===============================================
IF(APPLE)
SET(CPACK_GENERATOR "${CPACK_GENERATOR};DragNDrop")
SET(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/packaging/macosx/Resources/Wireshark.icns")
SET(CPACK_BUNDLE_NAME "Wireshark")
SET(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/packaging/macosx/Info.plist")
# SET(CPACK_BUNDLE_STARTUP_COMMAND "${OBDGPSLogger_SOURCE_DIR}/osx/StartupCommand")
ENDIF(APPLE)
# ELSE(APPLE)
#
# # If we can find rpmbuild, then go for it
# FIND_PROGRAM(RPMBUILD_TEST rpmbuild INTERNAL)
# IF(RPMBUILD_TEST)
# SET(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
# SET(CPACK_RPM_PACKAGE_REQUIRES "gpsd >= 2.0")
# SET(CPACK_RPM_PACKAGE_LICENSE "GPLv2+")
# ENDIF(RPMBUILD_TEST)
#
# # If we can find dpkg, build a .deb
# #FIND_PROGRAM(DPKG_TEST dpkg INTERNAL)
# #IF(DPKG_TEST)
# SET(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
# SET(CPACK_DEBIAN_PACKAGE_DEPENDS "gpsd (>=2.0)")
# SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
# #ENDIF(DPKG_TEST)
#
# ENDIF(APPLE)
#
#
#
#===============================================
include(CPack)