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

Meson requires to set the root include dir by setting the INCLUDE env var #124

Closed
nacho opened this issue Mar 2, 2017 · 8 comments
Closed

Comments

@nacho
Copy link
Contributor

nacho commented Mar 2, 2017

@guruDanny67 we should probably fix this problem otherwise the header files that are in the root dir will not be found.

@TingPing
Copy link
Member

TingPing commented Mar 2, 2017

I haven't tried it personally, but maybe LIB and LIBPATH too?

A test would be:

project('foo', 'c')

cc = meson.get_compiler('c')
cc.find_library('something_in_libpath')

@guruDanny67
Copy link
Contributor

Which projects can I use to test this ?

Thanks

@TingPing
Copy link
Member

TingPing commented Mar 2, 2017

To test include:

project('foo', 'c')

cc = meson.get_compiler('c')
cc.has_header('libintl.h')

@guruDanny67
Copy link
Contributor

Ok, you mean the gtk stack include dir (i.e. c:\gtk-build\gtk\win32\release\include) and the similar for libpath ?

@TingPing
Copy link
Member

TingPing commented Mar 2, 2017

Yea.

@guruDanny67
Copy link
Contributor

If I understand correctly (I'm at work now and I can't check deep) if the project use ONLY pkg-config to get the stuff it's ok (because LIBPATH and the include dir are added), while in these simple case we got an error.

We can add the enviroment globally in the script (or before, manually, to test things) or on a per-project basis, like the add_path keyword

@TingPing
Copy link
Member

TingPing commented Mar 2, 2017

if the project use ONLY pkg-config to get the stuff it's ok (because LIBPATH and the include dir are added), while in these simple case we got an error.

Indeed.

I think it is safe to always set these variables and would avoid potential duplication.

@guruDanny67
Copy link
Contributor

A fast solution will be to set (or add) INCLUDE, LIB and LIBPATH to the gtk ones just before initializing the vs environment (vcvarsall.bat): in this way the data are saved internally and any time we use the build_vs(...) we have it.

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

3 participants