- a/Source/cmake/WebKitCommon.cmake -34 / +51 lines
Lines 1-37 a/Source/cmake/WebKitCommon.cmake_sec1
1
# -----------------------------------------------------------------------------
1
# -----------------------------------------------------------------------------
2
# Find common packages (used by all ports)
2
# This file is included individually from various subdirectories (JSC, WTF,
3
# WebCore, WebKit) in order to allow scripts to build only part of WebKit.
4
# We want to run this file only once.
3
# -----------------------------------------------------------------------------
5
# -----------------------------------------------------------------------------
4
if (WIN32)
6
if (NOT HAS_RUN_WEBKIT_COMMON)
5
    list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
7
    set(HAS_RUN_WEBKIT_COMMON TRUE)
8
9
    # -----------------------------------------------------------------------------
10
    # Find common packages (used by all ports)
11
    # -----------------------------------------------------------------------------
12
    if (WIN32)
13
        list(APPEND CMAKE_PROGRAM_PATH $ENV{SystemDrive}/cygwin/bin)
14
    endif ()
15
16
    find_package(BISON 2.1 REQUIRED)
17
    if (!APPLE)
18
        find_package(FLEX 2.5.34 REQUIRED)
19
    endif ()
20
21
    # TODO Enforce version requirement for gperf
22
    find_package(Gperf 3.0.1 REQUIRED)
23
24
    # TODO Enforce version requirement for perl
25
    find_package(Perl 5.10.0 REQUIRED)
26
27
    find_package(PythonInterp 2.7.0 REQUIRED)
28
29
    # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
30
    # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
31
    # for finding only the Ruby interpreter.
32
    find_package(Ruby 1.9)
33
    if (NOT RUBY_EXECUTABLE OR RUBY_VERSION VERSION_LESS 1.9)
34
        message(FATAL_ERROR "Ruby 1.9 or higher is required.")
35
    endif ()
36
37
    # -----------------------------------------------------------------------------
38
    # Helper macros and feature defines
39
    # -----------------------------------------------------------------------------
40
41
    include(WebKitMacros)
42
    include(WebKitFS)
43
    include(WebKitHelpers)
44
    include(WebKitFeatures)
45
46
    include(OptionsCommon)
47
    include(Options${PORT})
48
49
    # -----------------------------------------------------------------------------
50
    # config.h
51
    # -----------------------------------------------------------------------------
52
53
    CREATE_CONFIGURATION_HEADER()
6
endif ()
54
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()
- a/CMakeLists.txt -17 / +6 lines
Lines 16-26 if (NOT DEFINED ENABLE_TOOLS AND EXISTS "${CMAKE_SOURCE_DIR}/Tools") a/CMakeLists.txt_sec1
16
    set(ENABLE_TOOLS ON)
16
    set(ENABLE_TOOLS ON)
17
endif ()
17
endif ()
18
18
19
include(WebKitMacros)
20
include(WebKitFS)
21
include(WebKitHelpers)
22
include(WebKitFeatures)
23
24
# -----------------------------------------------------------------------------
19
# -----------------------------------------------------------------------------
25
# Determine which port will be built
20
# Determine which port will be built
26
# -----------------------------------------------------------------------------
21
# -----------------------------------------------------------------------------
Lines 110-128 set(WebCoreTestSupport_LIBRARY_TYPE STATIC) a/CMakeLists.txt_sec2
110
option(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
105
option(SHOULD_INSTALL_JS_SHELL "generate an installation rule to install the built JavaScript shell")
111
106
112
# -----------------------------------------------------------------------------
107
# -----------------------------------------------------------------------------
113
# Common options
108
# Common configuration
109
#------------------------------------------------------------------------------
110
include(WebKitCommon)
111
112
# -----------------------------------------------------------------------------
113
# Output directories
114
#------------------------------------------------------------------------------
114
#------------------------------------------------------------------------------
115
include(OptionsCommon)
116
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
115
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
117
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
116
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
118
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
117
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
119
118
120
# -----------------------------------------------------------------------------
119
# -----------------------------------------------------------------------------
121
# Port-specific options
122
# -----------------------------------------------------------------------------
123
include(Options${PORT})
124
125
# -----------------------------------------------------------------------------
126
# Enable API unit tests and create a target for the test runner
120
# Enable API unit tests and create a target for the test runner
127
# -----------------------------------------------------------------------------
121
# -----------------------------------------------------------------------------
128
if (ENABLE_API_TESTS)
122
if (ENABLE_API_TESTS)
Lines 150-157 endif () a/CMakeLists.txt_sec3
150
# Print the features list last, for maximum visibility.
144
# Print the features list last, for maximum visibility.
151
# -----------------------------------------------------------------------------
145
# -----------------------------------------------------------------------------
152
PRINT_WEBKIT_OPTIONS()
146
PRINT_WEBKIT_OPTIONS()
153
154
# -----------------------------------------------------------------------------
155
# Create the configuration header
156
# -----------------------------------------------------------------------------
157
CREATE_CONFIGURATION_HEADER()
- a/ChangeLog +10 lines
Lines 1-3 a/ChangeLog_sec1
1
2016-01-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2
3
        [CMake] Duplicate attempts to find software during cmake stage
4
        https://bugs.webkit.org/show_bug.cgi?id=153211
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * CMakeLists.txt: Remove duplication of commands in WebKitCommon.cmake.
9
        * Source/cmake/WebKitCommon.cmake: Guard the entire file so it runs only once.
10
1
2016-01-17  Michael Catanzaro  <mcatanzaro@igalia.com>
11
2016-01-17  Michael Catanzaro  <mcatanzaro@igalia.com>
2
12
3
        [CMake] Do not build bmalloc when USE_SYSTEM_MALLOC is ON
13
        [CMake] Do not build bmalloc when USE_SYSTEM_MALLOC is ON

Return to Bug 153211