Fix: SYSROOT location detection... Wrong test.
[apps/app-templates.git] / cmake / common.cmake
index e826bee..e764d34 100644 (file)
@@ -52,7 +52,8 @@ if(EXISTS ${OS_RELEASE_PATH})
        else()
                set(OSRELEASE "NOT COMPATIBLE !")
        endif()
-
+elseif("${BUILD_ENV_SYSROOT}" STREQUAL "$ENV{PKG_CONFIG_SYSROOT_DIR}")
+       set(OSRELEASE "yocto-build")
 else()
        set(OSRELEASE "NOT COMPATIBLE ! Missing ${OS_RELEASE_PATH} file.")
 endif()
@@ -84,6 +85,8 @@ foreach(file ${system_cmakefiles} ${home_cmakefiles} ${project_cmakefiles})
        include(${file})
 endforeach()
 
+prevent_in_source_build()
+
 if(DEFINED PROJECT_SRC_DIR_PATTERN)
        project_subdirs_add(${PROJECT_SRC_DIR_PATTERN})
 else()