Skip to content

Commit

Permalink
REGRESSION(280217@main) CMake build failure after bump to cmake 3.20
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=275735

Reviewed by Justin Michaud.

Setting required CMake to a mininum >=3.19 enforces the policy CMP0112,
which states:

> Target file component generator expressions do not add target dependencies.

This leads to some dependencies missing for gir targets.

This commit makes GI targets explicitly depend on these previously
implicit deps.

Thanks to Daniel Kolesa for the suggested fix.

Also remove deprecated policy.

* CMakeLists.txt:

Canonical link: https://commits.webkit.org/280248@main
  • Loading branch information
lauromoura committed Jun 21, 2024
1 parent 1b86aba commit f282a95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
cmake_minimum_required(VERSION 3.20)
project(WebKit)

# Remove this cmake_policy() after upgrading cmake_minimum_required() to 3.20.
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20")
cmake_policy(SET CMP0116 NEW)
endif ()

# -----------------------------------------------------------------------------
# Common configuration
#------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Source/cmake/FindGI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ function(GI_INTROSPECT namespace nsversion header)
message(FATAL_ERROR "Target '${opt_TARGET}' was not defined")
endif ()

set(gir_deps)
set(gir_deps ${opt_TARGET})
set(gir_name "${namespace}-${nsversion}")
set(gir_path "${CMAKE_BINARY_DIR}/${gir_name}.gir")
set(typ_path "${CMAKE_BINARY_DIR}/${gir_name}.typelib")
Expand Down

0 comments on commit f282a95

Please sign in to comment.