[GTK] [CMake] Add a "make dist" target
https://bugs.webkit.org/show_bug.cgi?id=116378
Reviewed by Gustavo Noronha Silva.
.:
* Source/PlatformGTK.cmake: A CMake support for executing the make-dist
script and then turning the tarfile into a LZMA compressed file.
Source/WebCore:
* CMakeLists.txt: Don't build WebKitVersion.h for WebKitGTK+. We don't use it
and we don't want to distribute the dependency.
Tools:
Added a script that reads a manifest file an produces a tarball. Also add
the manifest.
* gtk/make-dist.py: Added.
* gtk/manifest.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163114 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/PlatformGTK.cmake b/Source/PlatformGTK.cmake
index cd0bd7d..96a27e1 100644
--- a/Source/PlatformGTK.cmake
+++ b/Source/PlatformGTK.cmake
@@ -52,3 +52,29 @@
add_custom_target(check
COMMAND "${TOOLS_DIR}/Scripts/run-gtk-tests"
)
+
+if (ENABLE_WEBKIT AND ENABLE_WEBKIT2)
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+ DEPENDS ${TOOLS_DIR}/gtk/make-dist.py
+ DEPENDS ${TOOLS_DIR}/gtk/manifest.txt
+ DEPENDS WebKit
+ DEPENDS WebKit2
+ COMMAND ${TOOLS_DIR}/gtk/make-dist.py
+ --source-dir=${CMAKE_SOURCE_DIR}
+ --build-dir=${CMAKE_BINARY_DIR}
+ --tarball-root=/webkitgtk-${PROJECT_VERSION}
+ -o ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+ ${TOOLS_DIR}/gtk/manifest.txt
+ )
+
+ add_custom_command(
+ OUTPUT ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
+ DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+ COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar
+ )
+
+ add_custom_target(dist
+ DEPENDS ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar.xz
+ )
+endif ()