[CMake] Update old CMakeList.txt in gtest
[WebKit.git] / Source / CMakeLists.txt
1 # -----------------------------------------------------------------------------
2 # Add module directories
3 # -----------------------------------------------------------------------------
4 add_subdirectory(bmalloc)
5
6 add_subdirectory(WTF)
7
8 add_subdirectory(JavaScriptCore)
9
10 if (ENABLE_API_TESTS)
11     add_subdirectory(ThirdParty/gtest)
12 endif ()
13
14 if (ENABLE_WEBCORE)
15     add_subdirectory(WebCore)
16 endif ()
17
18 if (ENABLE_WEBKIT)
19     add_subdirectory(WebKit)
20 endif ()
21
22 if (ENABLE_WEBKIT2)
23     add_subdirectory(WebKit2)
24 endif ()
25
26 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
27
28 # -----------------------------------------------------------------------------
29 # Set compiler flags for all targets
30 # -----------------------------------------------------------------------------
31 WEBKIT_SET_EXTRA_COMPILER_FLAGS(bmalloc ${ADDITIONAL_COMPILER_FLAGS})
32 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WTF ${ADDITIONAL_COMPILER_FLAGS})
33 WEBKIT_SET_EXTRA_COMPILER_FLAGS(JavaScriptCore ${ADDITIONAL_COMPILER_FLAGS})
34
35 if (ENABLE_WEBCORE)
36     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreTestSupport ${ADDITIONAL_COMPILER_FLAGS})
37     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCore ${ADDITIONAL_COMPILER_FLAGS})
38 endif ()
39
40 if (ENABLE_WEBKIT)
41     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebKit ${ADDITIONAL_COMPILER_FLAGS})
42 endif ()
43
44 if (ENABLE_WEBKIT2)
45     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebKit2 ${ADDITIONAL_COMPILER_FLAGS})
46 endif ()
47
48 # -----------------------------------------------------------------------------
49 # Create the configuration file
50 # -----------------------------------------------------------------------------
51 configure_file(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)