Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlatformIO Registry #13

Open
hagaigold opened this issue Jan 9, 2022 · 2 comments
Open

PlatformIO Registry #13

hagaigold opened this issue Jan 9, 2022 · 2 comments

Comments

@hagaigold
Copy link

Hi Tilen,

I am not sure this is an issue, but still...

Tried to consume the library thru PlatformIO IDE and had some issues building the library as-is.
I have very little experience with PlatofrmIO but I assumed it should work out of the box.

Is the library.json file for use only by the PlatformIO? or have another purpose in life?
After changing it a bit, I could build the library:

		]
	},
	"build": {
		"includeDir": "lwprintf/src/include",
		"srcDir": "lwprintf",
		"flags": [
			"-I../../include"
		]
    }
}

without the includeDir, I couldn't include the library
without the srcDir, PlatoformIO try to build also the dev folder

the last bit, which I found helpful, is adding another include folder (-I) so I can place the options header, lwprintf_opts.h, in a project folder and not inside the library itself.

@MaJerle
Copy link
Owner

MaJerle commented Jan 13, 2022

I think you are right, problem is that there are also some files that are "optional" versus platform.

Could you prepare pull request with your changes?

@hagaigold
Copy link
Author

hagaigold commented Jan 13, 2022

I have some concerns about the included path for the option header, lwprintf_opts.h:
in the sample above I used relative path '-I../../include'.
This path can be different if you use manual clone into the lib folder versus automatic install of the library using the lib_deps = majerle/LwPRINTF@^1.0.3 in platformio.ini.

one option is just to leave it for the user to set up a global include folder thru platformio.ini.
another option is using an absolute path. e.g -I$PROJECT_INCLUDE_DIR, -I$PROJECT_DIR/<some folder>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants