[CMAKE] Remove Nix from CMake scripts
[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 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
25
26 # -----------------------------------------------------------------------------
27 # Set compiler flags for all targets
28 # -----------------------------------------------------------------------------
29 if (${PORT} STREQUAL "Efl")
30     set(ADDITIONAL_FLAGS ENABLE_WERROR)
31 endif ()
32
33 WEBKIT_SET_EXTRA_COMPILER_FLAGS(WTF ${ADDITIONAL_FLAGS})
34 WEBKIT_SET_EXTRA_COMPILER_FLAGS(JavaScriptCore ${ADDITIONAL_FLAGS})
35
36 if (ENABLE_WEBCORE)
37     WEBKIT_SET_EXTRA_COMPILER_FLAGS(WebCoreTestSupport ${ADDITIONAL_FLAGS})
38     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 # Create the configuration file
51 # -----------------------------------------------------------------------------
52 configure_file(cmakeconfig.h.cmake ${CMAKE_BINARY_DIR}/cmakeconfig.h @ONLY)