CMakeLists.txt 1.52 KB
Newer Older
1 2 3
# -----------------------------------------------------------------------------
# Add module directories
# -----------------------------------------------------------------------------
4
add_subdirectory(WTF)
5

6
add_subdirectory(JavaScriptCore)
7

8 9 10
if (ENABLE_API_TESTS)
    add_subdirectory(cmake/gtest)
endif ()
11

12 13 14
if (ENABLE_WEBCORE)
    add_subdirectory(WebCore)
endif ()
15

16 17 18
if (ENABLE_WEBKIT)
    add_subdirectory(WebKit)
endif ()
19

20 21 22
if (ENABLE_WEBKIT2)
    add_subdirectory(WebKit2)
endif ()
23

24 25
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()

26 27 28
# -----------------------------------------------------------------------------
# Set compiler flags for all targets
# -----------------------------------------------------------------------------
29 30 31
if (${PORT} STREQUAL "Efl")
    set(ADDITIONAL_FLAGS ENABLE_WERROR)
endif ()
32

33 34
WEBKIT_SET_EXTRA_COMPILER_FLAGS(WTF ${ADDITIONAL_FLAGS})
WEBKIT_SET_EXTRA_COMPILER_FLAGS(JavaScriptCore ${ADDITIONAL_FLAGS})
35

36
if (ENABLE_WEBCORE)
37 38
    WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreTestSupport ${ADDITIONAL_FLAGS})
    WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCore ${ADDITIONAL_FLAGS})
39
endif ()
40

41
if (ENABLE_WEBKIT)
42
    WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebKit ${ADDITIONAL_FLAGS})
43
endif ()
44

45
if (ENABLE_WEBKIT2)
46
    WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebKit2 ${ADDITIONAL_FLAGS})
47
endif ()
48 49 50 51

# -----------------------------------------------------------------------------
# Create the configuration file
# -----------------------------------------------------------------------------
52
configure_file(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)