diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-06-27 18:20:25 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-10-15 18:22:48 +0200 |
commit | 328dc030125ea5f644dea587a3164708654142b6 (patch) | |
tree | 8ed805b2c51e9a6e6046f6648b64cba1e25e00b2 /cmake | |
parent | 318942f36f097010cce34022845b3441bbb07f6b (diff) |
Detect Yocto as OS distribution
When you are in a Yocto Environment there isn't os-release
file, so if the Yocto env is detected then position
manually the OSRELEASE variable to yocto-build.
Change-Id: I10029664100bb73aa74eaa85c1a4295c4ab65428
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/common.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake index e826bee..02ef1a4 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -52,7 +52,8 @@ if(EXISTS ${OS_RELEASE_PATH}) else() set(OSRELEASE "NOT COMPATIBLE !") endif() - +elseif(${BUILD_ENV_SYSROOT} == $ENV{PKG_CONFIG_SYSROOT_DIR}) + set(OSRELEASE "yocto-build") else() set(OSRELEASE "NOT COMPATIBLE ! Missing ${OS_RELEASE_PATH} file.") endif() |