{"action":"created","issue":{"url":"https://api.github.com/repos/ruslo/hunter/issues/980","repository_url":"https://api.github.com/repos/ruslo/hunter","labels_url":"https://api.github.com/repos/ruslo/hunter/issues/980/labels{/name}","comments_url":"https://api.github.com/repos/ruslo/hunter/issues/980/comments","events_url":"https://api.github.com/repos/ruslo/hunter/issues/980/events","html_url":"https://github.com/ruslo/hunter/issues/980","id":252596720,"number":980,"title":"How to use hunter","user":{"login":"nowox","id":1132849,"avatar_url":"https://avatars1.githubusercontent.com/u/1132849?v=4","gravatar_id":"","url":"https://api.github.com/users/nowox","html_url":"https://github.com/nowox","followers_url":"https://api.github.com/users/nowox/followers","following_url":"https://api.github.com/users/nowox/following{/other_user}","gists_url":"https://api.github.com/users/nowox/gists{/gist_id}","starred_url":"https://api.github.com/users/nowox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nowox/subscriptions","organizations_url":"https://api.github.com/users/nowox/orgs","repos_url":"https://api.github.com/users/nowox/repos","events_url":"https://api.github.com/users/nowox/events{/privacy}","received_events_url":"https://api.github.com/users/nowox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-24T13:11:20Z","updated_at":"2017-08-24T13:26:42Z","closed_at":null,"body":"Yeah this is a very dumb question, but I've read the documentation and tried the demo examples. Now I would like to make my own example. \r\n\r\nI have two GitHub repositories: \r\n\r\n- my-foolib\r\n- my-main\r\n\r\nOn the main repository I have one main file: \r\n\r\n```\r\n#include <stdio.h>\r\n#include \"foo.h\"\r\n\r\nint main() {\r\n    printf(\"Foo says %d\", foo());\r\n    return 0;\r\n}\r\n```\r\n\r\nAnd of course a `CMakeLists.txt`\r\n\r\n```\r\ncmake_minimum_required(VERSION 3.0)\r\n\r\ninclude(\"cmake/HunterGate.cmake\")\r\n\r\ninclude(ExternalProject)\r\n\r\nHunterGate(\r\n    URL \"https://github.com/ruslo/hunter/archive/v0.10.9.tar.gz\"\r\n    SHA1 \"53b198e364dc7bc8360fc545f798563229bd7e20\"\r\n)\r\n\r\n# This one doesn't work \r\n#HunterGate(\r\n#    URL \"https://github.mycompany.com/user/my-foolib.git\"\r\n#    SHA1 \"b9f5026a3dcba667dd685669bd815e53d8709472\"\r\n#)\r\n\r\n# This one doesn't work either\r\n#ExternalProject_Add(\r\n#   FooLib\r\n#   URL \"https://github.mycompany.com/user/my-foolib.git\"\r\n#   URL_HASH SHA1=b9f5026a3dcba667dd685669bd815e53d8709472\r\n#)    \r\n\r\nproject(Demo)\r\nadd_executable(demo main.c)\r\n```\r\n\r\nSo ... I haven't figured out how I can simply create simple dependencies\r\n\r\nIs there anything in the Hunter documentation?"},"comment":{"url":"https://api.github.com/repos/ruslo/hunter/issues/comments/324634365","html_url":"https://github.com/ruslo/hunter/issues/980#issuecomment-324634365","issue_url":"https://api.github.com/repos/ruslo/hunter/issues/980","id":324634365,"user":{"login":"ruslo","id":4346993,"avatar_url":"https://avatars2.githubusercontent.com/u/4346993?v=4","gravatar_id":"","url":"https://api.github.com/users/ruslo","html_url":"https://github.com/ruslo","followers_url":"https://api.github.com/users/ruslo/followers","following_url":"https://api.github.com/users/ruslo/following{/other_user}","gists_url":"https://api.github.com/users/ruslo/gists{/gist_id}","starred_url":"https://api.github.com/users/ruslo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruslo/subscriptions","organizations_url":"https://api.github.com/users/ruslo/orgs","repos_url":"https://api.github.com/users/ruslo/repos","events_url":"https://api.github.com/users/ruslo/events{/privacy}","received_events_url":"https://api.github.com/users/ruslo/received_events","type":"User","site_admin":false},"created_at":"2017-08-24T13:26:42Z","updated_at":"2017-08-24T13:26:42Z","body":"```\r\n# This one doesn't work \r\n#HunterGate(\r\n#    URL \"https://github.mycompany.com/user/my-foolib.git\"\r\n#    SHA1 \"b9f5026a3dcba667dd685669bd815e53d8709472\"\r\n#)\r\n\r\n# This one doesn't work either\r\n#ExternalProject_Add(\r\n#   FooLib\r\n#   URL \"https://github.mycompany.com/user/my-foolib.git\"\r\n#   URL_HASH SHA1=b9f5026a3dcba667dd685669bd815e53d8709472\r\n#)\r\n```\r\n\r\nWhy do you think this should work? Make no sense at all. Read documentation again.\r\n\r\n> So ... I haven't figured out how I can simply create simple dependencies\r\n\r\nCreating new package:\r\n* https://docs.hunter.sh/en/latest/creating-new.html\r\n\r\nIf you are planning to change your dependency often it make sense to use Git submodule integration:\r\n* https://docs.hunter.sh/en/latest/user-guides/hunter-user/git-submodule.html\r\n\r\n\r\n"}}
{"actor":{"display_login":"ruslo"}}