{"id":20099124,"url":"https://github.com/ros2/eigen3_cmake_module","last_synced_at":"2026-02-05T12:33:11.701Z","repository":{"id":40463900,"uuid":"198722008","full_name":"ros2/eigen3_cmake_module","owner":"ros2","description":"Adds a custom find module for Eigen3","archived":false,"fork":false,"pushed_at":"2025-07-08T07:41:10.000Z","size":25,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":17,"default_branch":"rolling","last_synced_at":"2025-07-17T19:43:23.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ros2.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2019-07-24T23:21:26.000Z","updated_at":"2025-07-07T13:19:12.000Z","dependencies_parsed_at":"2024-04-22T19:33:25.330Z","dependency_job_id":"0b4274b6-658d-4667-8f68-f1e3b8945378","html_url":"https://github.com/ros2/eigen3_cmake_module","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ros2/eigen3_cmake_module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Feigen3_cmake_module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Feigen3_cmake_module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Feigen3_cmake_module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Feigen3_cmake_module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ros2","download_url":"https://codeload.github.com/ros2/eigen3_cmake_module/tar.gz/refs/heads/rolling","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ros2%2Feigen3_cmake_module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29121775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T10:47:47.471Z","status":"ssl_error","status_checked_at":"2026-02-05T10:45:08.119Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T17:08:21.186Z","updated_at":"2026-02-05T12:33:11.678Z","avatar_url":"https://github.com/ros2.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eigen3_cmake_module\n\nOn Ubuntu Bionic, the `Eigen3` CMake package offers exported targets and non-standard CMake variables.\nThis is a problem for packages using [ament_cmake](https://github.com/ament/ament_cmake).\n\nTargets using `ament_target_dependencies(my_target Eigen3)` will fail to find `Eigen3` headers at compile time.\nDownstream packages will also fail to find `Eigen3` headers at compile time, even if your package uses `ament_export_dependencies(Eigen3)`.\n\nThis package adds a [CMake find module](https://cmake.org/cmake/help/v3.14/manual/cmake-developer.7.html#find-modulesjj) for [Eigen3](https://eigen.tuxfamily.org/dox/) that sets [standard CMake variables](https://cmake.org/cmake/help/v3.5/manual/cmake-developer.7.html#standard-variable-names).\nROS 2 packages using `Eigen3` should use this package to avoid these problems.\n\n## Using this package\n\n### Edit your CMakeLists.txt\nIn your `CMakeLists.txt`, call `find_package()` on this package using `REQUIRED`.\nAfterwards, find `Eigen3` with or without `REQUIRED` as appropriate for your package.\n\n```CMake\nfind_package(eigen3_cmake_module REQUIRED)\nfind_package(Eigen3)\n```\n\n#### Using with ament_cmake\nIf your package uses [ament_cmake](https://github.com/ament/ament_cmake), then use `ament_target_dependencies()` to give your library or executable targets access to the `Eigen3` headers.\n\n```CMake\n# add_library(my_thing ...)\n# # OR\n# add_executable(my_thing ...)\n# ...\nament_target_dependencies(my_thing Eigen3)\n```\n\nIf `Eigen3` appears in headers installed by your package, then downstream packages will need the `Eigen3` headers too.\nCall `ament_export_dependencies()` on this package, and afterwards do the same for `Eigen3`.\n\n```CMake\nament_export_dependencies(eigen3_cmake_module)\nament_export_dependencies(Eigen3)\n```\n\n#### Using without ament_cmake\n\nIf your package does not use `ament_cmake`, then use `target_include_directories()` to give your targets access to the `Eigen3` headers.\n\n```CMake\ntarget_include_directories(my_target PUBLIC \"${Eigen3_INCLUDE_DIRS}\")\n```\n\nIf `Eigen3` is used in headers installed by your package, then your `\u003cproject\u003e-config.cmake` must find both this package and `Eigen3`.\nAfterwards the `Eigen3` headers should be added to your package's include variable.\n\n```CMake\nfind_package(eigen3_cmake_module)\nif (NOT eigen3_cmake_module_FOUND)\n  set(your_package_name_FOUND 0)\n  return()\nendif()\n\nfind_package(Eigen3)\nif (NOT Eigen3_FOUND)\n  set(your_package_name_FOUND 0)\n  return()\nendif()\n\nlist(APPEND your_package_name_INCLUDE_DIRS ${Eigen3_INCLUDE_DIRS})\n```\n\n### Edit your package.xml\n\nAdd a buildtool dependency to this package, and a build dependency to `Eigen3` to your `package.xml`.\n\n```xml\n\u003cbuildtool_depend\u003eeigen3_cmake_module\u003c/buildtool_depend\u003e\n\u003cbuild_depend\u003eeigen\u003c/build_depend\u003e\n```\n\nIf your package uses `Eigen3` in public headers, then **also add** these tags so downstream packages also depend on this package and `Eigen3`.\n\n```xml\n\u003cbuildtool_export_depend\u003eeigen3_cmake_module\u003c/buildtool_export_depend\u003e\n\u003cbuild_export_depend\u003eeigen\u003c/build_export_depend\u003e\n```\n\n`\u003cexec_depend\u003e` is not necessary because `Eigen3` is a header only library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fros2%2Feigen3_cmake_module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fros2%2Feigen3_cmake_module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fros2%2Feigen3_cmake_module/lists"}