diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-29 15:31:15 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:47 +0200 |
commit | 005f790257e716a34adb97f5aea4c86d61f92f14 (patch) | |
tree | 4c75f5b5903f335807675227af0b3d1a07a8a4ab /cmake/cmake.d/04-build_options.cmake | |
parent | 797a196cdcfaac621e9b1bb75e39b8788acb356a (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() |