colcon / colcon-cmake

Extension for colcon to support CMake packages
http://colcon.readthedocs.io
Apache License 2.0
16 stars 25 forks source link

About changing the default compilation method of colcon build #139

Open Heyangq opened 1 month ago

Heyangq commented 1 month ago

Now colcon build compilation should be used cmake --build . --target install

I want to implement cmake --build . --target package Generate the content I need to install as deb

All install content is generated in deb

How can I modify core to do this

Requirement: Multiple function packages in a workspace are compiled to generate a deb file

Heyangq commented 1 month ago

colcon Whether the related configuration can be implemented What about the "cmake --build. --target package" function?

cottsay commented 3 weeks ago

You might be able to do this with the --cmake-target option in colcon-cmake: https://github.com/colcon/colcon-cmake/blob/1509c77ecb417dd0b47e4d54b73833fa5e4c1baa/colcon_cmake/task/cmake/build.py#L44-L46

I'm transferring this issue to that package.

If --cmake-target isn't sufficient, it's likely that colcon can't do what you want out of the box, and you may need to implement a new colcon extension.