WebKitPackaging.cmake 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. if (NOT DEFINED CPACK_PACKAGE_NAME)
  20. set(CPACK_PACKAGE_NAME WebKit-${PORT})
  21. endif ()
  22. if (NOT DEFINED CPACK_SOURCE_IGNORE_FILES)
  23. set(CPACK_SOURCE_IGNORE_FILES
  24. # Version control:
  25. "/CVS/"
  26. "/\\\\.svn/"
  27. "/\\\\.bzr/"
  28. "/\\\\.hg/"
  29. "/\\\\.git/"
  30. "\\\\.swp$"
  31. "\\\\.#"
  32. "/#"
  33. "/\\\\.gitignore$"
  34. "/\\\\.gitattributes$"
  35. # SVN-only files should be ignored (site, examples...)
  36. "/PerformanceTests/"
  37. "/Examples/"
  38. "/Websites/"
  39. # Other build systems:
  40. # - Makefiles (.mk/Makefile)
  41. "\\\\.mk$"
  42. "\\\\.make$"
  43. "Makefile"
  44. # - Autotools (GTK)
  45. "/autotools/"
  46. "/configure\\\\.ac"
  47. "/autogen\\\\.sh"
  48. "/autom4te\\\\.cache/"
  49. "/aclocal\\\\.m4$"
  50. "/GNUmakefile"
  51. "/GNUmakefile"
  52. # - XCode (Mac)
  53. "\\\\.xcodeproj"
  54. "\\\\.xcconfig"
  55. # - GYP
  56. "\\\\.gyp"
  57. # - QMake (Qt)
  58. "\\\\.pri$"
  59. "\\\\.pro$"
  60. # Development & Runtime created files
  61. "~$"
  62. "\\\\.mode"
  63. "\\\\.pbxuser$"
  64. "\\\\.perspective"
  65. "\\\\.pyc$"
  66. "\\\\.pyo$"
  67. "/cmake-build/"
  68. "/build/"
  69. "/WebKitBuild/"
  70. "/Tools/Scripts/webkitpy/thirdparty/autoinstalled/"
  71. )
  72. if (NOT WEBKIT_CPACK_ADD_TESTS)
  73. list(APPEND CPACK_SOURCE_IGNORE_FILES
  74. "/LayoutTests/"
  75. "/ManualTests/"
  76. "/tests/"
  77. )
  78. endif (NOT WEBKIT_CPACK_ADD_TESTS)
  79. if (NOT WEBKIT_CPACK_ADD_TOOLS)
  80. list(APPEND CPACK_SOURCE_IGNORE_FILES
  81. "/Tools/"
  82. "/manual-tools/"
  83. "/tools/"
  84. "/PageLoadTools/"
  85. )
  86. endif (NOT WEBKIT_CPACK_ADD_TOOLS)
  87. if (NOT WEBKIT_CPACK_ALL_PORTS)
  88. # All file and directory patterns that Efl uses
  89. set(FILE_PATTERNS_Efl
  90. "/cairo/" "/Cairo/" "cairo\\\\." "Cairo\\\\."
  91. "/efl/" "/Efl/" "efl\\\\." "Efl\\\\."
  92. "/glib/" "/Glib/" "glib\\\\." "Glib\\\\."
  93. "/gobject/" "/Gobject/" "gobject\\\\." "Gobject\\\\."
  94. "/icu/" "/Icu/" "icu\\\\." "Icu\\\\."
  95. "/posix/" "/Posix/" "posix\\\\." "Posix\\\\."
  96. "/soup/" "/Soup/" "soup\\\\." "Soup\\\\."
  97. )
  98. # File and Directory patterns that no CMake-ified port uses
  99. set(FILE_PATTERNS_UNKNOWN_PORTS
  100. "/carbon/" "/Carbon/" "carbon\\\\." "Carbon\\\\."
  101. "/cf/" "/Cf/" "cf\\\\." "Cf\\\\."
  102. "/cg/" "/Cg/" "cg\\\\." "Cg\\\\."
  103. "/chromium/" "/Chromium/" "chromium\\\\." "Chromium\\\\."
  104. "/cocoa/" "/Cocoa/" "cocoa\\\\." "Cocoa\\\\."
  105. "/Configurations/" "/Configurations/" "Configurations\\\\." "Configurations\\\\."
  106. "/curl/" "/Curl/" "curl\\\\." "Curl\\\\."
  107. "/gstreamer/" "/Gstreamer/" "gstreamer\\\\." "Gstreamer\\\\."
  108. "/gtk/" "/Gtk/" "gtk\\\\." "Gtk\\\\."
  109. "/iphone/" "/Iphone/" "iphone\\\\." "Iphone\\\\."
  110. "/mac/" "/Mac/" "mac\\\\." "Mac\\\\."
  111. "/opentype/" "/Opentype/" "opentype\\\\." "Opentype\\\\."
  112. "/openvg/" "/Openvg/" "openvg\\\\." "Openvg\\\\."
  113. "/os-win32/" "/Os-Win32/" "os-win32\\\\." "Os-Win32\\\\."
  114. "/qscriptengine/" "/Qscriptengine/" "qscriptengine\\\\." "Qscriptengine\\\\."
  115. "/qscriptstring/" "/Qscriptstring/" "qscriptstring\\\\." "Qscriptstring\\\\."
  116. "/qscriptvalue/" "/Qscriptvalue/" "qscriptvalue\\\\." "Qscriptvalue\\\\."
  117. "/qt/" "/Qt/" "qt\\\\." "Qt\\\\."
  118. "/qt4/" "/Qt4/" "qt4\\\\." "Qt4\\\\."
  119. "/win/" "/Win/" "win\\\\." "Win\\\\."
  120. "/wince/" "/Wince/" "wince\\\\." "Wince\\\\."
  121. "/wxcode/" "/Wxcode/" "wxcode\\\\." "Wxcode\\\\."
  122. "/WebKitLibraries/"
  123. "/English\\\\.lproj/"
  124. "/Source/WebKit2/"
  125. "\\\\.a$"
  126. "\\\\.exe$"
  127. "\\\\.mm$"
  128. )
  129. # Append all Unknown port patterns
  130. foreach (_pattern ${FILE_PATTERNS_UNKNOWN_PORTS})
  131. list(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index)
  132. if (_pattern_index GREATER -1)
  133. message("pattern ${_pattern} declared of 'no-port' is actually used by ${PORT}")
  134. else ()
  135. list(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern})
  136. endif ()
  137. endforeach ()
  138. # Append all "other-ports" patterns
  139. foreach (_port ${ALL_PORTS})
  140. if (NOT ${_port} STREQUAL ${PORT})
  141. foreach (_pattern ${FILE_PATTERNS_${_port}})
  142. list(FIND FILE_PATTERNS_${PORT} ${_pattern} _pattern_index)
  143. if (_pattern_index GREATER -1)
  144. message("pattern ${_pattern} of port ${_port} is also used by ${PORT}")
  145. else ()
  146. list(APPEND CPACK_SOURCE_IGNORE_FILES ${_pattern})
  147. endif ()
  148. endforeach ()
  149. endif ()
  150. endforeach ()
  151. endif (NOT WEBKIT_CPACK_ALL_PORTS)
  152. endif (NOT DEFINED CPACK_SOURCE_IGNORE_FILES)
  153. # -----------------------------------------------------------------------------
  154. # Include CPack that will define targets based on the variables defined before
  155. # -----------------------------------------------------------------------------
  156. include(CPack)