Fix building if Gflags was found but Glog was not

This commit is contained in:
Carles Fernandez 2022-01-04 12:57:01 +01:00
parent f0ba209d88
commit ec435ab119
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 4 additions and 4 deletions

View File

@ -1354,7 +1354,10 @@ endif()
################################################################################
set(LOCAL_GFLAGS FALSE)
if(NOT ENABLE_OWN_GLOG)
find_package(GFLAGS)
find_package(GLOG)
if(GLOG_FOUND)
find_package(GFLAGS)
endif()
endif()
set_package_properties(GFLAGS PROPERTIES
PURPOSE "Used for commandline flags management."
@ -1495,9 +1498,6 @@ endif()
################################################################################
# glog - https://github.com/google/glog
################################################################################
if(NOT ENABLE_OWN_GLOG AND NOT ${LOCAL_GFLAGS})
find_package(GLOG)
endif()
set_package_properties(GLOG PROPERTIES
PURPOSE "Used for runtime internal logging."
TYPE REQUIRED