[GTK] Be able to disable gtk2 dependency
[WebKit-https.git] / Source / WebKit2 / PlatformGTK.cmake
index 3a20d13..07f1bc0 100644 (file)
@@ -397,6 +397,7 @@ list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
 )
 
 list(APPEND WebKit2_INCLUDE_DIRECTORIES
+    "${WEBKIT2_DIR}/PluginProcess/unix"
     "${WEBCORE_DIR}/platform/cairo"
     "${WEBCORE_DIR}/platform/gtk"
     "${WEBCORE_DIR}/platform/graphics/cairo"
@@ -571,13 +572,8 @@ set(WEBKIT2_EXTRA_DEPENDENCIES
      webkit2gtk-forwarding-headers
 )
 
-if (ENABLE_PLUGIN_PROCESS)
+if (ENABLE_PLUGIN_PROCESS_GTK2)
     set(PluginProcessGTK2_EXECUTABLE_NAME WebKitPluginProcess2)
-    list(APPEND PluginProcessGTK2_INCLUDE_DIRECTORIES
-        "${WEBKIT2_DIR}/PluginProcess/unix"
-    )
-
-    include_directories(${PluginProcessGTK2_INCLUDE_DIRECTORIES})
 
     # FIXME: We should figure out a way to avoid compiling files that are common between the plugin
     # process and WebKit2 only once instead of recompiling them for the plugin process.
@@ -710,13 +706,12 @@ if (ENABLE_PLUGIN_PROCESS)
     add_dependencies(WebKitPluginProcess2 WebKit2)
 
     install(TARGETS WebKitPluginProcess2 DESTINATION "${LIBEXEC_INSTALL_DIR}")
+endif () # ENABLE_PLUGIN_PROCESS_GTK2
 
-    # GTK3 PluginProcess
-    list(APPEND PluginProcess_SOURCES
-        PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
-    )
-
-endif () # ENABLE_PLUGIN_PROCESS
+# GTK3 PluginProcess
+list(APPEND PluginProcess_SOURCES
+    PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
+)
 
 # Commands for building the built-in injected bundle.
 include_directories(