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