SSL-Roots / consai2r2

https://github.com/SSL-Roots/consai_ros2 へ開発を移行しています。
MIT License
8 stars 7 forks source link

Package Layoutのルールに従ってヘッダーファイルをinstallする #36

Open ShotaAk opened 4 years ago

ShotaAk commented 4 years ago

https://index.ros.org/doc/ros2/Contributing/Developer-Guide/#package-layout によると

src: contains all C and C++ code
    Also contains C/C++ headers which are not installed

include: contains all C and C++ headers which are installed
    <package name>: for all C and C++ installed headers they should be folder namespaced by the 
                                  package name

とある。

includeディレクトリにあるヘッダーファイルをinstallしてないものがいくつかあるので修正する。

参考:https://github.com/ros2/rosbag2/blob/master/rosbag2/CMakeLists.txt

やり方:

install(
  DIRECTORY include/
  DESTINATION include)

結果(例): $ ls ~ros2_ws/install/hoge/include/hoge huga.hpp

ShotaAk commented 4 years ago

コンフリクトを避けるため、PRを消化し、パッケージが揃ってきてから取り掛かること

spiralray commented 4 years ago

protoファイルについてはパッケージ直下のprotoディレクトリに配置し、 CMakeLists.txtにて以下のようにインストールするのはいかがでしょうか。

install(
  DIRECTORY proto/
  DESTINATION proto)
spiralray commented 4 years ago

protoについて、pythonパッケージの関係もありますので #43 で議論したいです。 よろしくお願い致します