{"action":"created","issue":{"url":"https://api.github.com/repos/jrowberg/i2cdevlib/issues/197","labels_url":"https://api.github.com/repos/jrowberg/i2cdevlib/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/jrowberg/i2cdevlib/issues/197/comments","events_url":"https://api.github.com/repos/jrowberg/i2cdevlib/issues/197/events","html_url":"https://github.com/jrowberg/i2cdevlib/issues/197","id":115338010,"number":197,"title":"MPU6050 library is not cmake-friendly","user":{"login":"ibalashov","id":2815653,"avatar_url":"https://avatars.githubusercontent.com/u/2815653?v=3","gravatar_id":"","url":"https://api.github.com/users/ibalashov","html_url":"https://github.com/ibalashov","followers_url":"https://api.github.com/users/ibalashov/followers","following_url":"https://api.github.com/users/ibalashov/following{/other_user}","gists_url":"https://api.github.com/users/ibalashov/gists{/gist_id}","starred_url":"https://api.github.com/users/ibalashov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibalashov/subscriptions","organizations_url":"https://api.github.com/users/ibalashov/orgs","repos_url":"https://api.github.com/users/ibalashov/repos","events_url":"https://api.github.com/users/ibalashov/events{/privacy}","received_events_url":"https://api.github.com/users/ibalashov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-05T17:50:32Z","updated_at":"2015-11-21T16:22:14Z","closed_at":null,"body":"@see https://github.com/queezythegreat/arduino-cmake/issues/105\r\n\r\nApparently in cmake the include file must be named after the directory.\r\nIn MPU6050 library one has to include \"MPU6050_6Axis_MotionApps20.h\" which is not compilable by cmake."},"comment":{"url":"https://api.github.com/repos/jrowberg/i2cdevlib/issues/comments/158659769","html_url":"https://github.com/jrowberg/i2cdevlib/issues/197#issuecomment-158659769","issue_url":"https://api.github.com/repos/jrowberg/i2cdevlib/issues/197","id":158659769,"user":{"login":"maartenverbandt","id":11255669,"avatar_url":"https://avatars.githubusercontent.com/u/11255669?v=3","gravatar_id":"","url":"https://api.github.com/users/maartenverbandt","html_url":"https://github.com/maartenverbandt","followers_url":"https://api.github.com/users/maartenverbandt/followers","following_url":"https://api.github.com/users/maartenverbandt/following{/other_user}","gists_url":"https://api.github.com/users/maartenverbandt/gists{/gist_id}","starred_url":"https://api.github.com/users/maartenverbandt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maartenverbandt/subscriptions","organizations_url":"https://api.github.com/users/maartenverbandt/orgs","repos_url":"https://api.github.com/users/maartenverbandt/repos","events_url":"https://api.github.com/users/maartenverbandt/events{/privacy}","received_events_url":"https://api.github.com/users/maartenverbandt/received_events","type":"User","site_admin":false},"created_at":"2015-11-21T16:22:14Z","updated_at":"2015-11-21T16:22:14Z","body":"As people on the arduino forum (http://forum.arduino.cc/index.php?topic=351281.15) pointed out, the header file should not include definitions of the functions. This results in serious problems when compiling to .o and linking afterwards. What you can do however is put the MPU6050_6Axis_MotionApps20.h in the MPU6050.cpp file, with an additional include guard, such that it only gets built when the motion apps are requested.\r\nFrom a transparency point of view, it is probably better to make a separate dmp class, inheriting from the mpu6050 device class, in order to access its dmp functions.   "}}