Move find_package(gflags) out of 3party

GLOBAL flag for find_package has been added in CMake 3.24

Signed-off-by: Osyotr <Osyotr@users.noreply.github.com>
This commit is contained in:
Osyotr 2024-04-06 16:14:42 +03:00
parent d825eb4695
commit bef0ae874f
2 changed files with 6 additions and 4 deletions

View file

@ -2,10 +2,7 @@
# Compatibility with CMake < 3.5 will be removed from a future version of CMake.
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
if (WITH_SYSTEM_PROVIDED_3PARTY)
set(GFLAGS_USE_TARGET_NAMESPACE ON)
find_package(gflags REQUIRED GLOBAL)
else()
if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
# Suppress "Policy CMP0077 is not set: option() honors normal variables"
# for the freetype, expat and jansson options.
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)

View file

@ -319,6 +319,11 @@ if (PLATFORM_LINUX)
find_package(harfbuzz REQUIRED)
endif()
if (WITH_SYSTEM_PROVIDED_3PARTY)
set(GFLAGS_USE_TARGET_NAMESPACE ON)
find_package(gflags REQUIRED)
endif()
# Include 3party dependencies.
add_subdirectory(3party)