[CMake] Move the top-level logic to the top-level directory.
[WebKit-https.git] / Source / CMakeLists.txt
1 # -----------------------------------------------------------------------------
2 # Add module directories
3 # -----------------------------------------------------------------------------
4 ADD_SUBDIRECTORY(JavaScriptCore)
5 ADD_SUBDIRECTORY(WebCore)
6
7 IF (ENABLE_WEBKIT)
8     ADD_SUBDIRECTORY(WebKit)
9 ENDIF ()
10
11 IF (ENABLE_WEBKIT2)
12     ADD_SUBDIRECTORY(WebKit2)
13 ENDIF ()
14
15 # -----------------------------------------------------------------------------
16 # Set compiler flags for all targets
17 # -----------------------------------------------------------------------------
18 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})
19 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME})
20 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME})
21
22 IF (ENABLE_WEBKIT)
23     WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME})
24 ENDIF ()
25
26 IF (ENABLE_WEBKIT2)
27     WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit2_LIBRARY_NAME})
28 ENDIF ()
29
30 # -----------------------------------------------------------------------------
31 # Create the configuration file
32 # -----------------------------------------------------------------------------
33 CONFIGURE_FILE(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)