diff --git a/arduino/libraries/libraries.go b/arduino/libraries/libraries.go
index b31f546aa74..06657b30201 100644
--- a/arduino/libraries/libraries.go
+++ b/arduino/libraries/libraries.go
@@ -55,20 +55,21 @@ type Library struct {
 
 	Types []string `json:"types,omitempty"`
 
-	InstallDir        *paths.Path
-	SourceDir         *paths.Path
-	UtilityDir        *paths.Path
-	Location          LibraryLocation
-	ContainerPlatform *cores.PlatformRelease `json:""`
-	Layout            LibraryLayout
-	RealName          string
-	DotALinkage       bool
-	Precompiled       bool
-	LDflags           string
-	IsLegacy          bool
-	Version           *semver.Version
-	License           string
-	Properties        *properties.Map
+	InstallDir             *paths.Path
+	SourceDir              *paths.Path
+	UtilityDir             *paths.Path
+	Location               LibraryLocation
+	ContainerPlatform      *cores.PlatformRelease `json:""`
+	Layout                 LibraryLayout
+	RealName               string
+	DotALinkage            bool
+	Precompiled            bool
+	LDflags                string
+	IsLegacy               bool
+	Version                *semver.Version
+	License                string
+	AdditionalIncludePaths []*paths.Path
+	Properties             *properties.Map
 }
 
 func (library *Library) String() string {
diff --git a/arduino/libraries/loader.go b/arduino/libraries/loader.go
index 221f28a11e6..f03657626a5 100644
--- a/arduino/libraries/loader.go
+++ b/arduino/libraries/loader.go
@@ -105,6 +105,14 @@ func makeNewLibrary(libraryDir *paths.Path, location LibraryLocation) (*Library,
 	library.DotALinkage = libProperties.GetBoolean("dot_a_linkage")
 	library.Precompiled = libProperties.GetBoolean("precompiled")
 	library.LDflags = strings.TrimSpace(libProperties.Get("ldflags"))
+	additionalIncludePathsList := libProperties.Get("additional_include_paths")
+	if additionalIncludePathsList != "" {
+		temp := strings.Split(additionalIncludePathsList, ",")
+		for _, el := range temp {
+			dir := paths.New(libraryDir.Join(el).String())
+			library.AdditionalIncludePaths = append(library.AdditionalIncludePaths, dir)
+		}
+	}
 	library.Properties = libProperties
 
 	return library, nil
diff --git a/legacy/builder/container_find_includes.go b/legacy/builder/container_find_includes.go
index 2221c8cfde4..0b68351d6b3 100644
--- a/legacy/builder/container_find_includes.go
+++ b/legacy/builder/container_find_includes.go
@@ -371,6 +371,10 @@ func findIncludesUntilDone(ctx *types.Context, cache *includeCache, sourceFile t
 			return i18n.WrapError(preproc_err)
 		}
 
+		for _, el := range library.AdditionalIncludePaths {
+			appendIncludeFolder(ctx, cache, sourcePath, include, el)
+		}
+
 		// Add this library to the list of libraries, the
 		// include path and queue its source files for further
 		// include scanning
diff --git a/legacy/builder/phases/libraries_builder.go b/legacy/builder/phases/libraries_builder.go
index b01ffe70dc2..06ab152bcf3 100644
--- a/legacy/builder/phases/libraries_builder.go
+++ b/legacy/builder/phases/libraries_builder.go
@@ -192,6 +192,11 @@ func compileLibrary(ctx *types.Context, library *libraries.Library, buildPath *p
 	}
 
 	if library.Layout == libraries.RecursiveLayout {
+		if library.AdditionalIncludePaths != nil {
+			for _, el := range library.AdditionalIncludePaths {
+				includes = append(includes, utils.WrapWithHyphenI(el.String()))
+			}
+		}
 		libObjectFiles, err := builder_utils.CompileFilesRecursive(ctx, library.SourceDir, libraryBuildPath, buildProperties, includes)
 		if err != nil {
 			return nil, i18n.WrapError(err)
diff --git a/rpc/commands/lib.proto b/rpc/commands/lib.proto
index 2de44ab28e2..7c4c878c74e 100644
--- a/rpc/commands/lib.proto
+++ b/rpc/commands/lib.proto
@@ -160,6 +160,7 @@ message Library {
     string version = 21;
     string license = 22;
     map<string, string> properties = 23;
+    string additional_include_paths = 24;
 }
 
 enum LibraryLayout {