Use find_package instead of include(Find*) in CMake scripts (#3767)

Otherwise CMake produces the following warning:

```
CMake Warning (dev) at /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (Wget) does
  not match the name of the calling package (IEDevScripts).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindWget.cmake:26 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/developer_package/download/download_and_check.cmake:5 (include)
  cmake/developer_package/download/download_and_extract.cmake:6 (include)
  cmake/developer_package/download/download.cmake:25 (include)
  cmake/developer_package/download/dependency_solver.cmake:5 (include)
  cmake/developer_package/IEDevScriptsConfig.cmake:208 (include)
  CMakeLists.txt:12 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
```
This commit is contained in:
Vladislav Vinogradov 2020-12-31 12:48:23 +03:00 committed by GitHub
parent 08f54dbac8
commit 00d37aaa62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
include (FindWget) find_package(Wget QUIET)
function (DownloadAndCheck from to fatal result sha256) function (DownloadAndCheck from to fatal result sha256)
set(status_res "ON") set(status_res "ON")

View File

@ -15,8 +15,10 @@ list(APPEND CLDNN_LIBS
${CLDNN__IOCL_ICD_LIBPATH}) ${CLDNN__IOCL_ICD_LIBPATH})
# try to find VA libraries # try to find VA libraries
include(FindPkgConfig) find_package(PkgConfig QUIET)
pkg_search_module(LIBVA QUIET libva) if(PkgConfig_FOUND)
pkg_search_module(LIBVA QUIET libva)
endif()
# TODO: pkg_search_module finds libva not in sysroot # TODO: pkg_search_module finds libva not in sysroot
if(ANDROID) if(ANDROID)