diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-29 15:31:15 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-29 15:31:15 +0200 |
commit | 011277d2af3cfee674b50fa8a7362e91e8ad29e8 (patch) | |
tree | 8120730512f9843fa54e5e84ab3d6713d73ff4fd /cmake/cmake.d/04-build_options.cmake | |
parent | a3767d2fd184a9d317a867e1bede5167d7865091 (diff) |
Fix: Kernel detection under Yocto build env
Change-Id: I2b21a6c2b5c812736ab3e7a480cbaa3f547819fc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d/04-build_options.cmake')
-rw-r--r-- | cmake/cmake.d/04-build_options.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/cmake.d/04-build_options.cmake b/cmake/cmake.d/04-build_options.cmake index 45b4720..1aa046a 100644 --- a/cmake/cmake.d/04-build_options.cmake +++ b/cmake/cmake.d/04-build_options.cmake @@ -37,6 +37,8 @@ endif(gcc_minimal_version) if (kernel_minimal_version) if(DEFINED ENV{SDKTARGETSYSROOT}) file(STRINGS $ENV{SDKTARGETSYSROOT}/usr/include/linux/version.h LINUX_VERSION_CODE_LINE REGEX "LINUX_VERSION_CODE") + elseif(DEFINED ENV{PKG_CONFIG_SYSROOT_DIR}) + file(STRINGS $ENV{PKG_CONFIG_SYSROOT_DIR}/usr/include/linux/version.h LINUX_VERSION_CODE_LINE REGEX "LINUX_VERSION_CODE") else() file(STRINGS /usr/include/linux/version.h LINUX_VERSION_CODE_LINE REGEX "LINUX_VERSION_CODE") endif() |