{"action":"opened","issue":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/194","repository_url":"https://api.github.com/repos/eclipse/paho.mqtt.c","labels_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/194/comments","events_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/194/events","html_url":"https://github.com/eclipse/paho.mqtt.c/issues/194","id":191811377,"number":194,"title":"Support CMake configure for apps using paho ","user":{"login":"fmikulu","id":17859927,"avatar_url":"https://avatars.githubusercontent.com/u/17859927?v=3","gravatar_id":"","url":"https://api.github.com/users/fmikulu","html_url":"https://github.com/fmikulu","followers_url":"https://api.github.com/users/fmikulu/followers","following_url":"https://api.github.com/users/fmikulu/following{/other_user}","gists_url":"https://api.github.com/users/fmikulu/gists{/gist_id}","starred_url":"https://api.github.com/users/fmikulu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fmikulu/subscriptions","organizations_url":"https://api.github.com/users/fmikulu/orgs","repos_url":"https://api.github.com/users/fmikulu/repos","events_url":"https://api.github.com/users/fmikulu/events{/privacy}","received_events_url":"https://api.github.com/users/fmikulu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-26T15:30:56Z","updated_at":"2016-11-26T15:30:56Z","closed_at":null,"body":"You can find attached patch and a simple **Findpaho.cmake** finder, resp. **pahoConfig.cmake.in**\r\nThe finder can be saved somewhere in a project referencing paho library, e.g:\r\n\r\n_referencing-app/cmake/modules/FindPaho.cmake_\r\n\r\nAnd apply commands in its CMakeLists.txt:\r\n\r\n**set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} \"${CMAKE_SOURCE_DIR}/cmake/Modules/\")\r\nFIND_PACKAGE(paho REQUIRED)\r\nIF (PAHO_FOUND)\r\n    MESSAGE(STATUS \"Paho found: \" ${PAHO_ROOT_DIR} )\r\nELSE()\r\n    MESSAGE(\"Paho cannot be found\")\r\nENDIF()**\r\n\r\nAnother way is to incorporate **pahoConfig.cmake.in** to paho source root and call there from CMakeLists.txt:\r\n\r\n**configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in  {PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY)**\r\n"}}
{"actor":{"display_login":"fmikulu"}}