[GTK] [CMake] Add support for building GtkLauncher
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Dec 2013 00:10:15 +0000 (00:10 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Dec 2013 00:10:15 +0000 (00:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125766

Reviewed by Gustavo Noronha Silva.

* CMakeLists.txt: Add the GtkLauncher subdirectory for the GTK port.
* GtkLauncher/CMakeLists.txt: Added.
* GtkLauncher/main.c: Support including the CMake config file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160805 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/CMakeLists.txt
Tools/ChangeLog
Tools/GtkLauncher/CMakeLists.txt [new file with mode: 0644]
Tools/GtkLauncher/main.c

index 9776f96..3dd5324 100644 (file)
@@ -19,6 +19,9 @@ elseif ("${PORT}" STREQUAL "GTK")
     if (ENABLE_WEBKIT2)
         add_subdirectory(MiniBrowser/gtk)
     endif ()
+    if (ENABLE_WEBKIT)
+        add_subdirectory(GtkLauncher)
+    endif ()
 elseif ("${PORT}" STREQUAL "WinCE")
     add_subdirectory(WinCELauncher)
 endif ()
index 4798058..29e84a1 100644 (file)
@@ -1,3 +1,14 @@
+2013-12-18  Martin Robinson  <mrobinson@igalia.com>
+
+        [GTK] [CMake] Add support for building GtkLauncher
+        https://bugs.webkit.org/show_bug.cgi?id=125766
+
+        Reviewed by Gustavo Noronha Silva.
+
+        * CMakeLists.txt: Add the GtkLauncher subdirectory for the GTK port.
+        * GtkLauncher/CMakeLists.txt: Added.
+        * GtkLauncher/main.c: Support including the CMake config file.
+
 2013-12-18  Alex Christensen  <achristensen@webkit.org>
 
         [WinCairo] Preparation for GStreamer on Windows.
diff --git a/Tools/GtkLauncher/CMakeLists.txt b/Tools/GtkLauncher/CMakeLists.txt
new file mode 100644 (file)
index 0000000..5e8c80a
--- /dev/null
@@ -0,0 +1,28 @@
+add_definitions(-DWEBKIT_EXEC_PATH="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+
+include_directories(
+    ${CMAKE_BINARY_DIR}
+    ${CMAKE_SOURCE_DIR}/Source
+    ${CMAKE_SOURCE_DIR}/Source/JavaScriptCore/ForwardingHeaders
+    ${CMAKE_SOURCE_DIR}/Source/WebKit/gtk
+    ${DERIVED_SOURCES_DIR}
+    ${DERIVED_SOURCES_DIR}/webkit
+    ${GLIB_INCLUDE_DIRS}
+    ${GTK3_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
+)
+
+add_executable(GtkLauncher
+    LauncherInspectorWindow.c
+    LauncherInspectorWindow.h
+    main.c
+)
+
+target_link_libraries(GtkLauncher
+    ${JavaScriptCore_LIBRARY_NAME}
+    WebKit
+    ${GLIB_LIBRARIES}
+    ${GTK3_LIBRARIES}
+    ${LIBSOUP_LIBRARIES}
+)
+
index 7e9d2cd..507b73c 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
+#ifdef BUILDING_WITH_CMAKE
+#include "cmakeconfig.h"
+#else
 #include "autotoolsconfig.h"
+#endif
+#endif
+
 #include "LauncherInspectorWindow.h"
 #include <errno.h>
 #include <gdk/gdkkeysyms.h>