Fix internal Windows build
[WebKit-https.git] / Source / cmake / WebKitCommon.cmake
1 # -----------------------------------------------------------------------------
2 # Find common packages (used by all ports)
3 # -----------------------------------------------------------------------------
4 if (WIN32)
5     list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
6 endif ()
7
8 find_package(BISON 2.1 REQUIRED)
9 if (!APPLE)
10     find_package(FLEX 2.5.34 REQUIRED)
11 endif ()
12
13 # TODO Enforce version requirement for gperf
14 find_package(Gperf 3.0.1 REQUIRED)
15
16 # TODO Enforce version requirement for perl
17 find_package(Perl 5.10.0 REQUIRED)
18
19 find_package(PythonInterp 2.7.0 REQUIRED)
20
21 # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
22 # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
23 # for finding only the Ruby interpreter.
24 find_package(Ruby 1.9)
25 if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 1.9)
26     message(FATAL_ERROR "Ruby 1.9 or higher is required.")
27 endif ()
28
29 include(WebKitMacros)
30 include(WebKitFS)
31 include(WebKitHelpers)
32 include(WebKitFeatures)
33
34 include(OptionsCommon)
35 include(Options${PORT})
36
37 CREATE_CONFIGURATION_HEADER()