{"action":"created","issue":{"url":"https://api.github.com/repos/andrewrk/libsoundio/issues/106","repository_url":"https://api.github.com/repos/andrewrk/libsoundio","labels_url":"https://api.github.com/repos/andrewrk/libsoundio/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/andrewrk/libsoundio/issues/106/comments","events_url":"https://api.github.com/repos/andrewrk/libsoundio/issues/106/events","html_url":"https://github.com/andrewrk/libsoundio/issues/106","id":179655468,"number":106,"title":"Simplify CMake listfile","user":{"login":"iskunk","id":523357,"avatar_url":"https://avatars.githubusercontent.com/u/523357?v=3","gravatar_id":"","url":"https://api.github.com/users/iskunk","html_url":"https://github.com/iskunk","followers_url":"https://api.github.com/users/iskunk/followers","following_url":"https://api.github.com/users/iskunk/following{/other_user}","gists_url":"https://api.github.com/users/iskunk/gists{/gist_id}","starred_url":"https://api.github.com/users/iskunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskunk/subscriptions","organizations_url":"https://api.github.com/users/iskunk/orgs","repos_url":"https://api.github.com/users/iskunk/repos","events_url":"https://api.github.com/users/iskunk/events{/privacy}","received_events_url":"https://api.github.com/users/iskunk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/andrewrk/libsoundio/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/andrewrk/libsoundio/milestones/5","html_url":"https://github.com/andrewrk/libsoundio/milestones/2.0.0","labels_url":"https://api.github.com/repos/andrewrk/libsoundio/milestones/5/labels","id":1314231,"number":5,"title":"2.0.0","description":"","creator":{"login":"andrewrk","id":106511,"avatar_url":"https://avatars.githubusercontent.com/u/106511?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewrk","html_url":"https://github.com/andrewrk","followers_url":"https://api.github.com/users/andrewrk/followers","following_url":"https://api.github.com/users/andrewrk/following{/other_user}","gists_url":"https://api.github.com/users/andrewrk/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewrk/subscriptions","organizations_url":"https://api.github.com/users/andrewrk/orgs","repos_url":"https://api.github.com/users/andrewrk/repos","events_url":"https://api.github.com/users/andrewrk/events{/privacy}","received_events_url":"https://api.github.com/users/andrewrk/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":0,"state":"open","created_at":"2015-09-19T01:48:09Z","updated_at":"2016-10-05T01:44:17Z","due_on":null,"closed_at":null},"comments":35,"created_at":"2016-09-28T01:01:13Z","updated_at":"2016-10-06T20:51:00Z","closed_at":null,"body":"I see that the `CMakeLists.txt` file for libsoundio has two separate options for building dynamic vs. static libraries.\r\n\r\nI take it this was inspired by Libtool, which in its usual way of working compiles both static and shared libraries in one pass.\r\n\r\nHowever, in CMake, it is conventional to build either one or the other, controlled by the special variable `BUILD_SHARED_LIBS`. I've put together a patch that simplifies the listfile accordingly.\r\n\r\n(I don't currently have a proper setup to prepare a Git pull request, and I see that GitHub still doesn't allow issue attachments, so I've uploaded my patch [here](http://pastebin.com/jZ9vwND2).)\r\n\r\nThe immediate issue that spurred this was breakage when I disabled the dynamic lib and attempted to build the examples. The examples are hard-coded to use the shared form of the library. It would be possible to code the listfile so the examples/tests link with one or the other as appropriate, but because this approach is foreign to CMake anyway, I believe reducing the complexity is preferable.\r\n\r\nOh, and as an extra, I added a bit to set `CMAKE_INSTALL_RPATH`. This allows the executables linked to a shared libsoundio to work in the install tree (without needing to set `LD_LIBRARY_PATH`) as well as the build tree."},"comment":{"url":"https://api.github.com/repos/andrewrk/libsoundio/issues/comments/252084715","html_url":"https://github.com/andrewrk/libsoundio/issues/106#issuecomment-252084715","issue_url":"https://api.github.com/repos/andrewrk/libsoundio/issues/106","id":252084715,"user":{"login":"andrewrk","id":106511,"avatar_url":"https://avatars.githubusercontent.com/u/106511?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewrk","html_url":"https://github.com/andrewrk","followers_url":"https://api.github.com/users/andrewrk/followers","following_url":"https://api.github.com/users/andrewrk/following{/other_user}","gists_url":"https://api.github.com/users/andrewrk/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewrk/subscriptions","organizations_url":"https://api.github.com/users/andrewrk/orgs","repos_url":"https://api.github.com/users/andrewrk/repos","events_url":"https://api.github.com/users/andrewrk/events{/privacy}","received_events_url":"https://api.github.com/users/andrewrk/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T20:51:00Z","updated_at":"2016-10-06T20:51:00Z","body":"I agree that not providing an uninstall target is a missing feature in cmake. However, in favor of the convention argument - cmake does provide install_manifest.txt, which a distribution could use to provide an uninstall target, solving the problem system-wide. cmake users would need to do nothing for this to work. Versus if cmake users tried to solve the problem themselves we would end up with competing conventions and overall more complexity.\r\n\r\n\r\n\r\n> I guess we'll just have to go with any convention a random build system author imposes on us, so the rest of the users can go screw themselves...\r\n\r\nAt the end of the day I'm going to go with the thing that is best for the users. This means people building libsoundio from source directly and it also includes folks such as yourself who are maintaining packages. I'm on your side. Let's figure out what is best for users together."}}
{"actor":{"display_login":"andrewrk"}}