Fixed samples build on Debian 10 with cmake 3.13 (#15940)

This commit is contained in:
Ilya Lavrenov
2023-02-24 22:28:45 +04:00
committed by GitHub
parent 8dd9ade211
commit 57cb7015f0
2 changed files with 3 additions and 2 deletions

View File

@@ -26,6 +26,7 @@ if(NOT TARGET nlohmann_json::nlohmann_json)
if(TARGET nlohmann_json)
# Ubuntu 18.04 case where target 'nlohmann_json' is here, but nlohmann_json_FOUND is OFF
if(NOT TARGET nlohmann_json::nlohmann_json)
set_target_properties(nlohmann_json PROPERTIES IMPORTED_GLOBAL ON)
add_library(nlohmann_json::nlohmann_json ALIAS nlohmann_json)
endif()
set(nlohmann_json_FOUND ON)

View File

@@ -15,8 +15,8 @@ endif()
if(NOT TARGET zlib::zlib)
if(PkgConfig_FOUND)
pkg_search_module(zlib QUIET
IMPORTED_TARGET GLOBAL
zlib)
IMPORTED_TARGET GLOBAL
zlib)
if(zlib_FOUND)
add_library(zlib::zlib ALIAS PkgConfig::zlib)
endif()