{"id":20081908,"url":"https://github.com/jke94/cmakesharedlib","last_synced_at":"2026-04-28T12:38:08.132Z","repository":{"id":128613771,"uuid":"533936887","full_name":"jke94/CMakeSharedLib","owner":"jke94","description":"Example of shared library. Using docker and cmake, to build shared library, install it in a Linux environment, and used by a client.","archived":false,"fork":false,"pushed_at":"2022-09-10T17:48:14.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T12:02:33.564Z","etag":null,"topics":["cpp","docker","docker-compose","linux","shared-library"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jke94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-07T20:47:03.000Z","updated_at":"2022-09-10T17:38:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"36c4d283-5f6f-4948-be5c-ef5e318ddb07","html_url":"https://github.com/jke94/CMakeSharedLib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jke94/CMakeSharedLib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FCMakeSharedLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FCMakeSharedLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FCMakeSharedLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FCMakeSharedLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jke94","download_url":"https://codeload.github.com/jke94/CMakeSharedLib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jke94%2FCMakeSharedLib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262063448,"owners_count":23252761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","docker","docker-compose","linux","shared-library"],"created_at":"2024-11-13T15:40:54.223Z","updated_at":"2026-04-28T12:38:08.087Z","avatar_url":"https://github.com/jke94.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMakeSharedLib\nExample of shared library. Using docker and cmake, to build shared library, install it in a Linux environment, and used by a client.\n## A. Build shared lib and install it.\n\n- From \"HeroesLibrary/build\" directory as base directory: \n\n### 1. Make the generator and build from the build directory.\n```\ncmake ..\n```\n### 2. Make\n```\nmake\n```\n### 3. Make the library available system wide. This will install and place in /usr/lib\n```\nsudo make install\n```\n## B. Consume shared lib by a client.\n\n- From \"HeroesClient/build\" directory as base directory: \n\n### 1. Make the generator and build from the build directory.\n```\ncmake ..\n```\n### 2. Make\n```\nmake\n```\n### 3. Run executable\n```\n./main\n```\n\n## C. Docker.\n\n- From base repository folder as base directory: \n\n### 1. Docker-compose: build library.\n```\nsudo docker compose -f ./docker-compose.yml -p cpp-container up --build\n```\n\n## References \n- [A minimal example using cmake to create a c++ shared library](https://surfertas.github.io/cmake/cpp/projecteuler/2019/05/01/cmake.html)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjke94%2Fcmakesharedlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjke94%2Fcmakesharedlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjke94%2Fcmakesharedlib/lists"}