{"action":"created","issue":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/309","labels_url":"https://api.github.com/repos/mesonbuild/meson/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/mesonbuild/meson/issues/309/comments","events_url":"https://api.github.com/repos/mesonbuild/meson/issues/309/events","html_url":"https://github.com/mesonbuild/meson/issues/309","id":115823488,"number":309,"title":"Using option variables in cross compile file","user":{"login":"germandiagogomez","id":13551083,"avatar_url":"https://avatars.githubusercontent.com/u/13551083?v=3","gravatar_id":"","url":"https://api.github.com/users/germandiagogomez","html_url":"https://github.com/germandiagogomez","followers_url":"https://api.github.com/users/germandiagogomez/followers","following_url":"https://api.github.com/users/germandiagogomez/following{/other_user}","gists_url":"https://api.github.com/users/germandiagogomez/gists{/gist_id}","starred_url":"https://api.github.com/users/germandiagogomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/germandiagogomez/subscriptions","organizations_url":"https://api.github.com/users/germandiagogomez/orgs","repos_url":"https://api.github.com/users/germandiagogomez/repos","events_url":"https://api.github.com/users/germandiagogomez/events{/privacy}","received_events_url":"https://api.github.com/users/germandiagogomez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-09T07:46:11Z","updated_at":"2015-11-17T15:54:48Z","closed_at":null,"body":"As I see in the documentation, there seems to be no way of:\r\n\r\n- Using custom environment variables in meson. See #9.\r\n- Using an option in a cross compile file.\r\n\r\nI am using two machines: linux and mac, but I will be using also windows. The android ndk is in different places in different machines. I would like to not hardcode that in my cross build file, since the NDK for android can be installed at arbitrary locations.\r\n\r\nAm I missing something or this is not possible?"},"comment":{"url":"https://api.github.com/repos/mesonbuild/meson/issues/comments/157411714","html_url":"https://github.com/mesonbuild/meson/issues/309#issuecomment-157411714","issue_url":"https://api.github.com/repos/mesonbuild/meson/issues/309","id":157411714,"user":{"login":"germandiagogomez","id":13551083,"avatar_url":"https://avatars.githubusercontent.com/u/13551083?v=3","gravatar_id":"","url":"https://api.github.com/users/germandiagogomez","html_url":"https://github.com/germandiagogomez","followers_url":"https://api.github.com/users/germandiagogomez/followers","following_url":"https://api.github.com/users/germandiagogomez/following{/other_user}","gists_url":"https://api.github.com/users/germandiagogomez/gists{/gist_id}","starred_url":"https://api.github.com/users/germandiagogomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/germandiagogomez/subscriptions","organizations_url":"https://api.github.com/users/germandiagogomez/orgs","repos_url":"https://api.github.com/users/germandiagogomez/repos","events_url":"https://api.github.com/users/germandiagogomez/events{/privacy}","received_events_url":"https://api.github.com/users/germandiagogomez/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T15:54:48Z","updated_at":"2015-11-17T15:54:48Z","body":"Before a section getting env variables or using meson syntax would be nice:\r\n\r\n```python\r\n#Env variables and using meson language in this section would not harm either.\r\n#Maybe would be good even enable meson syntax in full file\r\ncross-root = getopt('my_option')\r\n\r\n[binaries]\r\nc = '{0}arm-linux-gnueabihf-gcc'.format(cross-root)\r\n#...\r\n```\r\n\r\nThis effectively makes my cross file at least usable on other machines with same OS. I suspect that having full meson syntax would be good in these files as well. If the ini style sections are not compatible with this, just move the meson syntax to top of the file. I think it should be implementable."}}