{"action":"created","issue":{"url":"https://api.github.com/repos/libigl/libigl/issues/132","labels_url":"https://api.github.com/repos/libigl/libigl/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/libigl/libigl/issues/132/comments","events_url":"https://api.github.com/repos/libigl/libigl/issues/132/events","html_url":"https://github.com/libigl/libigl/pull/132","id":110763458,"number":132,"title":"Enable out of source tutorial build","user":{"login":"decrispell","id":1390275,"avatar_url":"https://avatars.githubusercontent.com/u/1390275?v=3","gravatar_id":"","url":"https://api.github.com/users/decrispell","html_url":"https://github.com/decrispell","followers_url":"https://api.github.com/users/decrispell/followers","following_url":"https://api.github.com/users/decrispell/following{/other_user}","gists_url":"https://api.github.com/users/decrispell/gists{/gist_id}","starred_url":"https://api.github.com/users/decrispell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decrispell/subscriptions","organizations_url":"https://api.github.com/users/decrispell/orgs","repos_url":"https://api.github.com/users/decrispell/repos","events_url":"https://api.github.com/users/decrispell/events{/privacy}","received_events_url":"https://api.github.com/users/decrispell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-10T03:09:02Z","updated_at":"2015-10-10T23:34:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/libigl/libigl/pulls/132","html_url":"https://github.com/libigl/libigl/pull/132","diff_url":"https://github.com/libigl/libigl/pull/132.diff","patch_url":"https://github.com/libigl/libigl/pull/132.patch"},"body":"If the tutorials are built out of source, the paths to the data files in tutorial/shared will be incorrect.  This pull request fixes that by using CMake's \"configure_file\" command to store the correct absolute location of the directory.   (Note that this may cause issues if the tutorial binaries are ever packaged up for distribution.)"},"comment":{"url":"https://api.github.com/repos/libigl/libigl/issues/comments/147136520","html_url":"https://github.com/libigl/libigl/pull/132#issuecomment-147136520","issue_url":"https://api.github.com/repos/libigl/libigl/issues/132","id":147136520,"user":{"login":"alecjacobson","id":2241689,"avatar_url":"https://avatars.githubusercontent.com/u/2241689?v=3","gravatar_id":"","url":"https://api.github.com/users/alecjacobson","html_url":"https://github.com/alecjacobson","followers_url":"https://api.github.com/users/alecjacobson/followers","following_url":"https://api.github.com/users/alecjacobson/following{/other_user}","gists_url":"https://api.github.com/users/alecjacobson/gists{/gist_id}","starred_url":"https://api.github.com/users/alecjacobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alecjacobson/subscriptions","organizations_url":"https://api.github.com/users/alecjacobson/orgs","repos_url":"https://api.github.com/users/alecjacobson/repos","events_url":"https://api.github.com/users/alecjacobson/events{/privacy}","received_events_url":"https://api.github.com/users/alecjacobson/received_events","type":"User","site_admin":false},"created_at":"2015-10-10T23:34:13Z","updated_at":"2015-10-10T23:34:13Z","body":"I like the idea, but I'm not wild about defining `tutorial_shared_path` in an _automatically generated_ header file. I think a preprocessor macro would be more appropriate: `-DTUTORIAL_DIR=/path/to/libigl/tutorial` and then as a fallback inside each `*/main.cpp` something like:\r\n\r\n```cpp\r\n#ifndef TUTORIAL_DIR\r\n// assume default build from within tutorial/build/\r\n#  define TUTORIAL_DIR \"../\"\r\n#endif\r\n```"}}