cmake: fix glopConfig.cmake

This commit is contained in:
Corentin Le Molgat
2025-07-21 15:00:18 +02:00
parent e4a2edc89d
commit efa8b07484

View File

@@ -10,6 +10,10 @@ if(NOT ZLIB_FOUND AND NOT TARGET ZLIB::ZLIB)
find_dependency(ZLIB REQUIRED)
endif()
if(NOT TARGET BZip2::BZip2)
find_dependency(BZip2 REQUIRED)
endif()
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.9.6")
set(CONFIG_FLAG CONFIG)
endif()
@@ -21,4 +25,9 @@ if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND AND NOT TARGET protobuf::libprotobu
find_dependency(Protobuf REQUIRED ${CONFIG_FLAG})
endif()
# re2 may not provide a CMake config files
if(NOT TARGET re2::re2)
find_dependency(re2 REQUIRED)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/glopTargets.cmake")