[onert] Use PkgConfig cmake module to find TRIXEngine#15273
[onert] Use PkgConfig cmake module to find TRIXEngine#15273hseok-oh merged 1 commit intoSamsung:masterfrom
Conversation
1bcc1ee to
10f15e2
Compare
|
@hseok-oh |
| find_package(PkgConfig REQUIRED) | ||
| pkg_check_modules(TRIXEngine REQUIRED IMPORTED_TARGET npu-engine) |
There was a problem hiding this comment.
This change skips version check.
We use version check because our trix backend does not support version under 2.5.0.
ONE/infra/nnfw/cmake/packages/TRIXEngineConfigVersion.cmake
Lines 43 to 79 in c926396
So we need to get target using pkg_check_modules in infra/nnfw/cmake/packages/TRIXEngineConfig.cmake and infra/nnfw/cmake/packages/TRIXEngineConfigVersion.cmake indirectly with version check.
There was a problem hiding this comment.
I added version requirement to `pkg_check_modules'.
+ # TRIXEngine version is required to higher than 2.5.0
+ pkg_check_modules(TRIXEngine REQUIRED IMPORTED_TARGET npu-engine>2.5.0)| nnfw_find_package(TRIXEngine QUIET 2.5.0) | ||
| find_package(PkgConfig REQUIRED) | ||
| # TRIXEngine version is required to higher than 2.5.0 | ||
| pkg_check_modules(TRIXEngine REQUIRED IMPORTED_TARGET npu-engine>2.5.0) |
There was a problem hiding this comment.
| pkg_check_modules(TRIXEngine REQUIRED IMPORTED_TARGET npu-engine>2.5.0) | |
| pkg_check_modules(TRIXEngine QUIET IMPORTED_TARGET npu-engine>2.5.0) |
If it is REQUIRED, build fail when npu-engine dev package is not installed and below TRIXEngine_FOUND check becomes meaningless.
There was a problem hiding this comment.
Yes you're right, I'll fix it right away.
This commit replaces the use of the private cmake with the PkgConfig module. It will prevent a potential build failure caused by varying library paths. ONE-DCO-1.0-Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Co-authored-by: Hyeongseok Oh <hseok82.oh@samsung.com>
This commit replaces the use of the private cmake with the PkgConfig module. It will prevent a potential build failure caused by varying library paths.
ONE-DCO-1.0-Signed-off-by: Jonghwa Lee jonghwa3.lee@samsung.com