build: simplify policy-setting for dependencies

Passing `CMAKE_POLICY_DEFAULT_CMP0092=NEW` to all dependencies is
simpler than setting it manually in each file.
This commit is contained in:
dundargoc
2024-04-27 20:57:46 +02:00
committed by dundargoc
parent 52823616bc
commit 383018dbb8
7 changed files with 5 additions and 25 deletions

View File

@ -18,6 +18,11 @@ if(APPLE)
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_FIND_FRAMEWORK=${CMAKE_FIND_FRAMEWORK})
endif()
# Can be removed once minimum version is at least 3.15
if(POLICY CMP0092)
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_POLICY_DEFAULT_CMP0092=NEW)
endif()
# MAKE_PRG
if(UNIX)
find_program(MAKE_PRG NAMES gmake make)