1# ----------------------------------------------------------------------------- 2# This file defines the basics of CPack behavior for WebKit 3# 4# The following CPack variables will be defined if they were unset: 5# - CPACK_PACKAGE_NAME to WebKit-${PORT} 6# - CPACK_SOURCE_IGNORE_FILES to a known pattern of good files 7# 8# The following variables affect the behavior of packaging: 9# - WEBKIT_CPACK_ALL_PORTS if defined and true, will not limit packaging 10# to just include files of the port (affects CPACK_SOURCE_IGNORE_FILES, 11# just if this variable was not defined before). 12# - WEBKIT_CPACK_ADD_TESTS if defined and true, will also add tests 13# (affects CPACK_SOURCE_IGNORE_FILES, just if this variable was 14# not defined before) 15# - WEBKIT_CPACK_ADD_TOOLS if defined and true, will also add tools 16# (affects CPACK_SOURCE_IGNORE_FILES, just if this variable was 17# not defined before) 18# ----------------------------------------------------------------------------- 19 20IF(NOT DEFINED CPACK_PACKAGE_NAME) 21 SET(CPACK_PACKAGE_NAME WebKit-${PORT}) 22ENDIF() 23 24IF(NOT DEFINED CPACK_SOURCE_IGNORE_FILES) 25 SET(CPACK_SOURCE_IGNORE_FILES 26 # Version control: 27 "/CVS/" 28 "/\\\\.svn/" 29 "/\\\\.bzr/" 30 "/\\\\.hg/" 31 "/\\\\.git/" 32 "\\\\.swp$" 33 "\\\\.#" 34 "/#" 35 "/\\\\.gitignore$" 36 "/\\\\.gitattributes$" 37 38 # SVN-only files should be ignored (site, examples...) 39 "/PerformanceTests/" 40 "/Examples/" 41 "/Websites/" 42 43 # Other build systems: 44 # - Makefiles (.mk/Makefile) 45 "\\\\.mk$" 46 "\\\\.make$" 47 "Makefile" 48 # - Autotools (GTK) 49 "/autotools/" 50 "/configure\\\\.ac" 51 "/autogen\\\\.sh" 52 "/autom4te\\\\.cache/" 53 "/aclocal\\\\.m4$" 54 "/GNUmakefile" 55 "/GNUmakefile" 56 # - XCode (Mac) 57 "\\\\.xcodeproj" 58 "\\\\.xcconfig" 59 # - GYP 60 "\\\\.gyp" 61 # - QMake (Qt) 62 "\\\\.pri$" 63 "\\\\.pro$" 64 65 # Development & Runtime created files 66 "~$" 67 "\\\\.mode" 68 "\\\\.pbxuser$" 69 "\\\\.perspective" 70 "\\\\.pyc$" 71 "\\\\.pyo$" 72 "/cmake-build/" 73 "/build/" 74 "/WebKitBuild/" 75 "/Tools/Scripts/webkitpy/thirdparty/autoinstalled/" 76 ) 77 78 IF(NOT WEBKIT_CPACK_ADD_TESTS) 79 LIST(APPEND CPACK_SOURCE_IGNORE_FILES 80 "/LayoutTests/" 81 "/manual-tests/" 82 "/tests/" 83 ) 84 ENDIF(NOT WEBKIT_CPACK_ADD_TESTS) 85 86 IF(NOT WEBKIT_CPACK_ADD_TOOLS) 87 LIST(APPEND CPACK_SOURCE_IGNORE_FILES 88 "/Tools/" 89 "/manual-tools/" 90 "/tools/" 91 "/PageLoadTools/" 92 ) 93 ENDIF(NOT WEBKIT_CPACK_ADD_TOOLS) 94 95 96 IF(NOT WEBKIT_CPACK_ALL_PORTS) 97 98 # All file and directory patterns that Efl uses 99 SET(FILE_PATTERNS_Efl 100 "/cairo/" "/Cairo/" "cairo\\\\." "Cairo\\\\." 101 "/efl/" "/Efl/" "efl\\\\." "Efl\\\\." 102 "/glib/" "/Glib/" "glib\\\\." "Glib\\\\." 103 "/gobject/" "/Gobject/" "gobject\\\\." "Gobject\\\\." 104 "/icu/" "/Icu/" "icu\\\\." "Icu\\\\." 105 "/posix/" "/Posix/" "posix\\\\." "Posix\\\\." 106 "/soup/" "/Soup/" "soup\\\\." "Soup\\\\." 107 ) 108 109 # File and Directory patterns that no CMake-ified port uses 110 SET(FILE_PATTERNS_UNKNOWN_PORTS 111 "/android/" "/Android/" "android\\\\." "Android\\\\." 112 "/brew/" "/Brew/" "brew\\\\." "Brew\\\\." 113 "/carbon/" "/Carbon/" "carbon\\\\." "Carbon\\\\." 114 "/cf/" "/Cf/" "cf\\\\." "Cf\\\\." 115 "/cg/" "/Cg/" "cg\\\\." "Cg\\\\." 116 "/chromium/" "/Chromium/" "chromium\\\\." "Chromium\\\\." 117 "/cocoa/" "/Cocoa/" "cocoa\\\\." "Cocoa\\\\." 118 "/Configurations/" "/Configurations/" "Configurations\\\\." "Configurations\\\\." 119 "/curl/" "/Curl/" "curl\\\\." "Curl\\\\." 120 "/gstreamer/" "/Gstreamer/" "gstreamer\\\\." "Gstreamer\\\\." 121 "/gtk/" "/Gtk/" "gtk\\\\." "Gtk\\\\." 122 "/haiku/" "/Haiku/" "haiku\\\\." "Haiku\\\\." 123 "/iphone/" "/Iphone/" "iphone\\\\." "Iphone\\\\." 124 "/mac/" "/Mac/" "mac\\\\." "Mac\\\\." 125 "/opentype/" "/Opentype/" "opentype\\\\." "Opentype\\\\." 126 "/openvg/" "/Openvg/" "openvg\\\\." "Openvg\\\\." 127 "/os-win32/" "/Os-Win32/" "os-win32\\\\." "Os-Win32\\\\." 128 "/qscriptengine/" "/Qscriptengine/" "qscriptengine\\\\." "Qscriptengine\\\\." 129 "/qscriptstring/" "/Qscriptstring/" "qscriptstring\\\\." "Qscriptstring\\\\." 130 "/qscriptvalue/" "/Qscriptvalue/" "qscriptvalue\\\\." "Qscriptvalue\\\\." 131 "/qt/" "/Qt/" "qt\\\\." "Qt\\\\." 132 "/qt4/" "/Qt4/" "qt4\\\\." "Qt4\\\\." 133 "/skia/" "/Skia/" "skia\\\\." "Skia\\\\." 134 "/symbian/" "/Symbian/" "symbian\\\\." "Symbian\\\\." 135 "/v8/" "/V8/" "v8\\\\." "V8\\\\." 136 "/V8/" "/V8/" "V8\\\\." "V8\\\\." 137 "/win/" "/Win/" "win\\\\." "Win\\\\." 138 "/wince/" "/Wince/" "wince\\\\." "Wince\\\\." 139 "/wx/" "/Wx/" "wx\\\\." "Wx\\\\." 140 "/wxcode/" "/Wxcode/" "wxcode\\\\." "Wxcode\\\\." 141 "/WebKitLibraries/" 142 "/English\\\\.lproj/" 143 "/Source/WebKit2/" 144 "\\\\.a$" 145 "\\\\.exe$" 146 "\\\\.mm$" 147 ) 148 149 # Append all Unknown port patterns 150 FOREACH(_pattern ${FILE_PATTERNS_UNKNOWN_PORTS}) 151 LIST(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index) 152 IF(_pattern_index GREATER -1) 153 MESSAGE("pattern ${_pattern} declared of 'no-port' is actually used by ${PORT}") 154 ELSE() 155 LIST(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern}) 156 ENDIF() 157 ENDFOREACH() 158 159 # Append all "other-ports" patterns 160 FOREACH(_port ${ALL_PORTS}) 161 IF(NOT ${_port} STREQUAL ${PORT}) 162 FOREACH(_pattern ${FILE_PATTERNS_${_port}}) 163 164 LIST(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index) 165 IF(_pattern_index GREATER -1) 166 MESSAGE("pattern ${_pattern} of port ${_port} is also used by ${PORT}") 167 ELSE() 168 LIST(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern}) 169 ENDIF() 170 ENDFOREACH() 171 ENDIF() 172 ENDFOREACH() 173 174 ENDIF(NOT WEBKIT_CPACK_ALL_PORTS) 175 176ENDIF(NOT DEFINED CPACK_SOURCE_IGNORE_FILES) 177 178# ----------------------------------------------------------------------------- 179# Include CPack that will define targets based on the variables defined before 180# ----------------------------------------------------------------------------- 181INCLUDE(CPack) 182