[Qt][WK2] Add stubs for FULLSCREEN_API on Qt.
[WebKit.git] / Source / CMakeLists.txt
index d6368c0..26477d9 100644 (file)
@@ -9,11 +9,25 @@ IF (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_C_FLAGS AND NOT CMAKE_CXX_FLAGS)
 ENDIF ()
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
+# -----------------------------------------------------------------------------
+# Default library type
+# -----------------------------------------------------------------------------
+IF (NOT ENABLE_WEBKIT AND NOT ENABLE_WEBKIT2)
+    SET(ENABLE_WEBKIT On)
+ENDIF ()
+
 SET(JAVASCRIPTCORE_DIR "${CMAKE_SOURCE_DIR}/JavaScriptCore")
 SET(WEBCORE_DIR "${CMAKE_SOURCE_DIR}/WebCore")
 SET(WEBKIT_DIR "${CMAKE_SOURCE_DIR}/WebKit")
+SET(WEBKIT2_DIR "${CMAKE_SOURCE_DIR}/WebKit2")
+
+SET(THIRDPARTY_DIR "${CMAKE_SOURCE_DIR}/ThirdParty")
 SET(TOOLS_DIR "${CMAKE_SOURCE_DIR}/../Tools")
+
 SET(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
+SET(DERIVED_SOURCES_JAVASCRIPTCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore")
+SET(DERIVED_SOURCES_WEBCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebCore")
+SET(DERIVED_SOURCES_WEBKIT2_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKit2")
 
 INCLUDE(WebKitMacros)
 INCLUDE(WebKitFS)
@@ -46,6 +60,8 @@ FIND_PACKAGE(PythonInterp REQUIRED)
 STRING(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
 IF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^arm")
     SET(WTF_CPU_ARM 1)
+ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
+    SET(WTF_CPU_MIPS 1)
 ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)")
     SET(WTF_CPU_X86_64 1)
 ELSEIF (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)")
@@ -77,6 +93,7 @@ SET(WTF_LIBRARY_NAME WTF)
 SET(JavaScriptCore_LIBRARY_NAME JavaScriptCore)
 SET(WebCore_LIBRARY_NAME WebCore)
 SET(WebKit_LIBRARY_NAME WebKit)
+SET(WebKit2_LIBRARY_NAME WebKit2)
 
 # -----------------------------------------------------------------------------
 # Default library types
@@ -94,6 +111,7 @@ ELSE ()
 ENDIF ()
 
 SET(WebKit_LIBRARY_TYPE SHARED)
+SET(WebKit2_LIBRARY_TYPE SHARED)
 
 # -----------------------------------------------------------------------------
 # Port-specific options
@@ -111,7 +129,14 @@ INCLUDE(WebKitPackaging)
 # -----------------------------------------------------------------------------
 ADD_SUBDIRECTORY(JavaScriptCore)
 ADD_SUBDIRECTORY(WebCore)
-ADD_SUBDIRECTORY(WebKit)
+
+IF (ENABLE_WEBKIT)
+    ADD_SUBDIRECTORY(WebKit)
+ENDIF ()
+
+IF (ENABLE_WEBKIT2)
+    ADD_SUBDIRECTORY(WebKit2)
+ENDIF ()
 
 # -----------------------------------------------------------------------------
 # Add test browser if exists
@@ -124,7 +149,14 @@ INCLUDE_IF_EXISTS(${TOOLS_DIR}/CMakeLists${PORT}.txt)
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WTF_LIBRARY_NAME})
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${JavaScriptCore_LIBRARY_NAME})
 WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebCore_LIBRARY_NAME})
-WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME})
+
+IF (ENABLE_WEBKIT)
+    WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit_LIBRARY_NAME})
+ENDIF ()
+
+IF (ENABLE_WEBKIT2)
+    WEBKIT_SET_EXTRA_COMPILER_FLAGS(${WebKit2_LIBRARY_NAME})
+ENDIF ()
 
 # -----------------------------------------------------------------------------
 # Create the configuration file