summaryrefslogtreecommitdiff
path: root/Source/cmake/WebKitCommon.cmake
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/cmake/WebKitCommon.cmake
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/cmake/WebKitCommon.cmake')
-rw-r--r--Source/cmake/WebKitCommon.cmake49
1 files changed, 49 insertions, 0 deletions
diff --git a/Source/cmake/WebKitCommon.cmake b/Source/cmake/WebKitCommon.cmake
new file mode 100644
index 000000000..8b50c9d94
--- /dev/null
+++ b/Source/cmake/WebKitCommon.cmake
@@ -0,0 +1,49 @@
+# -----------------------------------------------------------------------------
+# This file is included individually from various subdirectories (JSC, WTF,
+# WebCore, WebKit) in order to allow scripts to build only part of WebKit.
+# We want to run this file only once.
+# -----------------------------------------------------------------------------
+if (NOT HAS_RUN_WEBKIT_COMMON)
+ set(HAS_RUN_WEBKIT_COMMON TRUE)
+
+ # -----------------------------------------------------------------------------
+ # Find common packages (used by all ports)
+ # -----------------------------------------------------------------------------
+ if (WIN32)
+ list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
+ endif ()
+
+ # TODO Enforce version requirement for gperf
+ find_package(Gperf 3.0.1 REQUIRED)
+
+ # TODO Enforce version requirement for perl
+ find_package(Perl 5.10.0 REQUIRED)
+
+ find_package(PythonInterp 2.7.0 REQUIRED)
+
+ # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
+ # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
+ # for finding only the Ruby interpreter.
+ find_package(Ruby 1.9)
+ if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 1.9)
+ message(FATAL_ERROR "Ruby 1.9 or higher is required.")
+ endif ()
+
+ # -----------------------------------------------------------------------------
+ # Helper macros and feature defines
+ # -----------------------------------------------------------------------------
+
+ include(WebKitMacros)
+ include(WebKitFS)
+ include(WebKitHelpers)
+ include(WebKitFeatures)
+
+ include(OptionsCommon)
+ include(Options${PORT})
+
+ # -----------------------------------------------------------------------------
+ # config.h
+ # -----------------------------------------------------------------------------
+
+ CREATE_CONFIGURATION_HEADER()
+endif ()