⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267399 in webkit


Ignore:
Timestamp:
Sep 21, 2020, 11:52:15 PM (6 years ago)
Author:
Adrian Perez de Castro
Message:

[CMake] Use imported targets in find module for the ATK SPI2 bridge dependency
https://bugs.webkit.org/show_bug.cgi?id=216773

Reviewed by Don Olmstead.

.:

  • Source/cmake/FindATKBridge.cmake: Rewrite to define an ATK::Bridge imported target.
  • Source/cmake/OptionsWPE.cmake: Use the ATK::Bridge imported target.

Source/WebKit:

No new tests needed.

  • PlatformWPE.cmake: Use the ATK::Bridge imported target.

Tools:

  • wpe/backends/CMakeLists.txt: Use the ATK::Bridge imported target.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r267177 r267399  
     12020-09-21  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [CMake] Use imported targets in find module for the ATK SPI2 bridge dependency
     4        https://bugs.webkit.org/show_bug.cgi?id=216773
     5
     6        Reviewed by Don Olmstead.
     7
     8        * Source/cmake/FindATKBridge.cmake: Rewrite to define an ATK::Bridge imported target.
     9        * Source/cmake/OptionsWPE.cmake: Use the ATK::Bridge imported target.
     10
    1112020-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
    212
  • trunk/Source/WebKit/ChangeLog

    r267398 r267399  
     12020-09-21  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [CMake] Use imported targets in find module for the ATK SPI2 bridge dependency
     4        https://bugs.webkit.org/show_bug.cgi?id=216773
     5
     6        Reviewed by Don Olmstead.
     7
     8        No new tests needed.
     9
     10        * PlatformWPE.cmake: Use the ATK::Bridge imported target.
     11
    1122020-09-21  Adrian Perez de Castro  <aperez@igalia.com>
    213
  • trunk/Source/WebKit/PlatformWPE.cmake

    r266833 r267399  
    279279list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
    280280    ${ATK_INCLUDE_DIRS}
    281     ${ATK_BRIDGE_INCLUDE_DIRS}
    282281    ${GIO_UNIX_INCLUDE_DIRS}
    283282    ${GLIB_INCLUDE_DIRS}
     
    286285
    287286list(APPEND WebKit_LIBRARIES
     287    ATK::Bridge
    288288    Cairo::Cairo
    289289    Freetype::Freetype
     
    292292    WPE::libwpe
    293293    ${ATK_LIBRARIES}
    294     ${ATK_BRIDGE_LIBRARIES}
    295294    ${GLIB_LIBRARIES}
    296295    ${GLIB_GMODULE_LIBRARIES}
  • trunk/Source/cmake/FindATKBridge.cmake

    r258361 r267399  
    1 # - Try to find ATK
    2 # Once done, this will define
    3 #
    4 #  ATK_BRIDGE_INCLUDE_DIRS - the ATK bridge include drectories
    5 #  ATK_BRIDGE_LIBRARIES - link these to use ATK bridge
    6 #
    7 # Copyright (C) 2019 Igalia S.L.
     1# Copyright (C) 2019, 2020 Igalia S.L.
    82#
    93# Redistribution and use in source and binary forms, with or without
     
    2822# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2923
     24#[=======================================================================[.rst:
     25FindATKBridge
     26-------------
     27
     28Find the ATK-SPI2 bridge headers and libraries.
     29
     30Imported Targets
     31^^^^^^^^^^^^^^^^
     32
     33``ATK::Bridge``
     34  The ATK SPI2 bridge library, if found.
     35
     36Result Variables
     37^^^^^^^^^^^^^^^^
     38
     39This will define the following variables in your project:
     40
     41``ATKBridge_FOUND``
     42  true if (the requested version of) the ATK SPI2 bridge is available.
     43``ATKBridge_VERSION``
     44  the version of the ATK SPI2 bridge.
     45``ATKBridge_LIBRARIES``
     46  the libraries to link against to use the ATK SPI2 bridge.
     47``ATKBridge_INCLUDE_DIRS``
     48  where to find the ATK SPI2 bridge headers.
     49``ATKBridge_COMPILE_OPTIONS``
     50  this should be passed to target_compile_options(), if the target
     51  is not used for linking.
     52
     53#]=======================================================================]
     54
    3055find_package(PkgConfig QUIET)
    31 pkg_check_modules(PC_ATK_BRIDGE atk-bridge-2.0)
     56pkg_check_modules(PC_ATK_BRIDGE QUIET atk-bridge-2.0)
     57set(ATKBridge_COMPILE_OPTIONS ${PC_ATK_BRIDGE_CFLAGS_OTHER})
     58set(ATKBridge_VERSION ${PC_ATK_BRIDGE_VERSION})
    3259
    33 find_path(ATK_BRIDGE_INCLUDE_DIRS
     60find_path(ATKBridge_INCLUDE_DIR
    3461    NAMES atk-bridge.h
    35     HINTS ${PC_ATK_BRIDGE_INCLUDEDIR}
    36           ${PC_ATK_BRIDGE_INCLUDE_DIRS}
     62    HINTS ${PC_ATK_BRIDGE_INCLUDEDIR} ${PC_ATK_BRIDGE_INCLUDE_DIR}
    3763    PATH_SUFFIXES at-spi2-atk/2.0
    3864)
    3965
    40 find_library(ATK_BRIDGE_LIBRARIES
    41     NAMES atk-bridge-2.0
    42     HINTS ${PC_ATK_BRIDGE_LIBRARY_DIRS}
    43           ${PC_ATK_BRIDGE_LIBDIR}
     66find_library(ATKBridge_LIBRARY
     67    NAMES ${ATKBridge_NAMES} atk-bridge-2.0
     68    HINTS ${PC_ATK_BRIDGE_LIBDIR} ${PC_ATK_BRIDGE_LIBRARY_DIRS}
    4469)
    4570
    4671include(FindPackageHandleStandardArgs)
    47 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ATK_BRIDGE REQUIRED_VARS ATK_BRIDGE_INCLUDE_DIRS ATK_BRIDGE_LIBRARIES
    48                                       VERSION_VAR   PC_ATK_BRIDGE_VERSION)
    49 mark_as_advanced(
    50     ATK_BRIDGE_INCLUDE_DIRS
    51     ATK_BRIDGE_LIBRARIES
     72find_package_handle_standard_args(ATKBridge
     73    FOUND_VAR ATKBridge_FOUND
     74    REQUIRED_VARS ATKBridge_LIBRARY ATKBridge_INCLUDE_DIR
     75    VERSION_VAR ATKBridge_VERSION
    5276)
     77
     78if (ATKBridge_LIBRARY AND NOT TARGET ATK::Bridge)
     79    add_library(ATK::Bridge UNKNOWN IMPORTED GLOBAL)
     80    set_target_properties(ATK::Bridge PROPERTIES
     81        IMPORTED_LOCATION "${ATKBridge_LIBRARY}"
     82        INTERFACE_COMPILE_OPTIONS "${ATKBridge_COMPILE_OPTIONS}"
     83        INTERFACE_INCLUDE_DIRECTORIES "${ATKBridge_INCLUDE_DIR}"
     84    )
     85endif ()
     86
     87mark_as_advanced(ATKBridge_INCLUDE_DIR ATKBridge_LIBRARY)
     88
     89if (ATKBridge_FOUND)
     90    set(ATKBridge_LIBRARIES ${ATKBridge_LIBRARY})
     91    set(ATKBridge_INCLUDE_DIRS ${ATKBridge_INCLUDE_DIR})
     92endif ()
  • trunk/Source/cmake/OptionsWPE.cmake

    r266601 r267399  
    134134    endif ()
    135135    find_package(ATKBridge)
    136     if (NOT ATK_BRIDGE_FOUND)
     136    if (NOT ATKBridge_FOUND)
    137137        message(FATAL_ERROR "at-spi2-atk is needed for ENABLE_ACCESSIBILITY")
    138138    endif ()
  • trunk/Tools/ChangeLog

    r267380 r267399  
     12020-09-21  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [CMake] Use imported targets in find module for the ATK SPI2 bridge dependency
     4        https://bugs.webkit.org/show_bug.cgi?id=216773
     5
     6        Reviewed by Don Olmstead.
     7
     8        * wpe/backends/CMakeLists.txt: Use the ATK::Bridge imported target.
     9
    1102020-09-21  Jonathan Bedard  <jbedard@apple.com>
    211
  • trunk/Tools/wpe/backends/CMakeLists.txt

    r258412 r267399  
    2222set(WPEToolingBackends_SYSTEM_INCLUDE_DIRECTORIES
    2323    ${ATK_INCLUDE_DIRS}
    24     ${ATK_BRIDGE_INCLUDE_DIRS}
    2524    ${GLIB_INCLUDE_DIRS}
    2625    ${LIBEPOXY_INCLUDE_DIRS}
     
    2928
    3029set(WPEToolingBackends_LIBRARIES
     30    ATK::Bridge
    3131    Cairo::Cairo
    3232    WPE::libwpe
    3333    ${ATK_LIBRARIES}
    34     ${ATK_BRIDGE_LIBRARIES}
    3534    ${GLIB_LIBRARIES}
    3635    ${LIBEPOXY_LIBRARIES}
Note: See TracChangeset for help on using the changeset viewer.