Fix find_package for benchmark

This commit is contained in:
Lukas Berbuer 2022-04-08 15:41:03 +02:00 committed by Changming Sun
parent 98faaa7e2f
commit efb0928e2b

View file

@ -707,9 +707,9 @@ endif()
if (onnxruntime_BUILD_BENCHMARKS)
if (onnxruntime_PREFER_SYSTEM_LIB)
find_package(benchmark)
find_package(benchmark CONFIG)
endif()
if (benchmark_FOUND)
if (TARGET benchmark::benchmark)
message("Use benchmark from preinstalled system lib")
else()
message("Use benchmark from submodule")