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