| diff --git a/CMakeLists.txt b/CMakeLists.txt |
| index 1d8272754..3dcd3aea5 100644 |
| --- a/CMakeLists.txt |
| +++ b/CMakeLists.txt |
| @@ -843,8 +843,8 @@ if(FLB_CONFIG_YAML) |
| set(FLB_HAVE_LIBYAML 1) |
| FLB_DEFINITION(FLB_HAVE_LIBYAML) |
| # For non-standard libyaml installation paths such as homebrew bottled libyaml. |
| - include_directories(${LIBYAML_INCLUDEDIR}) |
| - link_directories(${LIBYAML_LIBRARY_DIRS}) |
| + include_directories("$ENV{SYSROOT}/${LIBYAML_INCLUDEDIR}") |
| + link_directories("$ENV{SYSROOT}/${LIBYAML_LIBRARY_DIRS}") |
| else() |
| if (FLB_LIBYAML_DIR) |
| set(LIBYAML_LIBRARY_DIRS "${FLB_LIBYAML_DIR}/lib") |