Commit ec412602 authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

[GTK] [CMake] Improve the way we locate gobject-introspection

https://bugs.webkit.org/show_bug.cgi?id=126452

Reviewed by Philippe Normand.

.:

* Source/cmake/FindGObjectIntrospection.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Load the new  FindGObjectIntrospection file.

Source/JavaScriptCore:

* PlatformGTK.cmake: Use the new introspection variables.

Source/WebKit:

* PlatformGTK.cmake: Use the new introspection variables.

Source/WebKit2:

* PlatformGTK.cmake: Use the new introspection variables.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 891efa12
2014-01-04 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Improve the way we locate gobject-introspection
https://bugs.webkit.org/show_bug.cgi?id=126452
Reviewed by Philippe Normand.
* Source/cmake/FindGObjectIntrospection.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Load the new FindGObjectIntrospection file.
2014-01-04 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Fix the video and audio build
......
2014-01-04 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Improve the way we locate gobject-introspection
https://bugs.webkit.org/show_bug.cgi?id=126452
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Use the new introspection variables.
2014-01-04 Zan Dobersek <zdobersek@igalia.com>
Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
......
......@@ -4,7 +4,7 @@ configure_file(JavaScriptCore.gir.in ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib
DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir
COMMAND g-ir-compiler ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib
COMMAND ${INTROSPECTION_COMPILER} ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.gir -o ${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib
)
ADD_TYPELIB(${CMAKE_BINARY_DIR}/JavaScriptCore-3.0.typelib)
2014-01-04 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Improve the way we locate gobject-introspection
https://bugs.webkit.org/show_bug.cgi?id=126452
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Use the new introspection variables.
2014-01-03 Simon Fraser <simon.fraser@apple.com>
Attempt to fix EFL build.
......
......@@ -165,7 +165,7 @@ add_custom_command(
DEPENDS WebKit
DEPENDS JavaScriptCore-3-gir
COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
g-ir-scanner
${INTROSPECTION_SCANNER}
--quiet
--warn-all
--symbol-prefix=webkit
......@@ -202,7 +202,7 @@ add_custom_command(
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/WebKit-3.0.typelib
DEPENDS ${CMAKE_BINARY_DIR}/WebKit-3.0.gir
COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit-3.0.typelib
COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit-3.0.typelib
)
ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit-3.0.typelib)
2014-01-04 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Improve the way we locate gobject-introspection
https://bugs.webkit.org/show_bug.cgi?id=126452
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Use the new introspection variables.
2014-01-04 Zan Dobersek <zdobersek@igalia.com>
Explicitly use the std:: nested name specifier when using std::pair, std::make_pair
......
......@@ -651,7 +651,7 @@ add_custom_command(
DEPENDS WebKit2
DEPENDS JavaScriptCore-3-gir
COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
g-ir-scanner
${INTROSPECTION_SCANNER}
--quiet
--warn-all
--symbol-prefix=webkit
......@@ -690,7 +690,7 @@ add_custom_command(
DEPENDS JavaScriptCore-3-gir
DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
g-ir-scanner
${INTROSPECTION_SCANNER}
--quiet
--warn-all
--symbol-prefix=webkit
......@@ -731,13 +731,13 @@ add_custom_command(
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir
COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib
)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
DEPENDS ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir
COMMAND g-ir-compiler --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
COMMAND ${INTROSPECTION_COMPILER} --includedir=${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.gir -o ${CMAKE_BINARY_DIR}/WebKit2WebExtension-3.0.typelib
)
ADD_TYPELIB(${CMAKE_BINARY_DIR}/WebKit2-3.0.typelib)
......
# - Try to find gobject-introspection
# Once done, this will define
#
# INTROSPECTION_FOUND - system has gobject-introspection
# INTROSPECTION_SCANNER - the gobject-introspection scanner, g-ir-scanner
# INTROSPECTION_COMPILER - the gobject-introspection compiler, g-ir-compiler
# INTROSPECTION_GENERATE - the gobject-introspection generate, g-ir-generate
# INTROSPECTION_GIRDIR
# INTROSPECTION_TYPELIBDIR
# INTROSPECTION_CFLAGS
# INTROSPECTION_LIBS
#
# Copyright (C) 2010, Pino Toscano, <pino@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname _extra_args)
execute_process(
COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} ${_extra_args} gobject-introspection-1.0
OUTPUT_VARIABLE _result
RESULT_VARIABLE _null
)
if (_null)
else ()
string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
string(REGEX REPLACE " +$" "" _result "${_result}")
separate_arguments(_result)
set(${_outvar} ${_result} CACHE INTERNAL "")
endif ()
endmacro(_GIR_GET_PKGCONFIG_VAR)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
if (PACKAGE_FIND_VERSION_COUNT GREATER 0)
set(_gir_version_cmp ">=${PACKAGE_FIND_VERSION}")
endif ()
pkg_check_modules(_pc_gir gobject-introspection-1.0${_gir_version_cmp})
if (_pc_gir_FOUND)
set(INTROSPECTION_FOUND TRUE)
_gir_get_pkgconfig_var(INTROSPECTION_SCANNER "g_ir_scanner" "")
_gir_get_pkgconfig_var(INTROSPECTION_COMPILER "g_ir_compiler" "")
_gir_get_pkgconfig_var(INTROSPECTION_GENERATE "g_ir_generate" "")
_gir_get_pkgconfig_var(INTROSPECTION_GIRDIR "girdir" "")
_gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir" "")
_gir_get_pkgconfig_var(INTROSPECTION_INSTALL_GIRDIR "girdir" "--define-variable=prefix=${CMAKE_INSTALL_PREFIX}")
_gir_get_pkgconfig_var(INTROSPECTION_INSTALL_TYPELIBDIR "typelibdir" "--define-variable=prefix=${CMAKE_INSTALL_PREFIX}")
set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}")
set(INTROSPECTION_LIBS "${_pc_gir_LIBS}")
endif ()
endif ()
mark_as_advanced(
INTROSPECTION_SCANNER
INTROSPECTION_COMPILER
INTROSPECTION_GENERATE
INTROSPECTION_GIRDIR
INTROSPECTION_TYPELIBDIR
INTROSPECTION_CFLAGS
INTROSPECTION_LIBS
INTROSPECTION_INSTALL_GIRDIR
INTROSPECTION_INSTALL_TYPELIBDIR
)
......@@ -168,6 +168,7 @@ find_package(ATK REQUIRED)
find_package(WebP REQUIRED)
find_package(GStreamer 1.0.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS})
find_package(ATSPI 2.5.3)
find_package(GObjectIntrospection)
# We don't use find_package for GLX because it is part of -lGL, unlike EGL.
find_package(OpenGL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment