Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support adding microxrceddsgen to PATH variable #83

Open
Ryanf55 opened this issue Mar 2, 2023 · 2 comments
Open

Support adding microxrceddsgen to PATH variable #83

Ryanf55 opened this issue Mar 2, 2023 · 2 comments

Comments

@Ryanf55
Copy link

Ryanf55 commented Mar 2, 2023

After I build the generator, I want to make it available on my system so CMake can find it with find_program(microxrceddsgen REQUIRED), or I can use the CLI from anywhere without having to find the path to microxrceddsgen

What do you think adding a section just after install to make the binary available on PATH so you can call the generator from anywhere, or use it in other build systems?

In FastDDSGen, it already has a note on it here.

I propose to be more explicit

Add this to ~/.bashrc to make microxrceddsgen available for use anywhere on your system. Customize the path to where 

export PATH=$PATH:/your/path/to/Micro-XRCE-DDS-Gen/scripts

Another approach would be to set up some sort of install task for the gradle build to install the binary in system headers.
https://docs.gradle.org/current/samples/sample_building_cpp_applications.html#build_the_application

I'm not familiar with Gradle, but maybe that's another approach.

@pablogs9
Copy link
Member

pablogs9 commented Mar 3, 2023

Go ahead

@khancyr
Copy link

khancyr commented Mar 20, 2023

On things to take into account is the build result structure. We need the scripts directory and the share one's and share should be a the same level as scripts.

So installing on /opt for example should give :

root@6362ab8c2df1:/dds-gen# tree .
.
├── scripts
│   ├── microxrceddsgen
│   ├── microxrceddsgen.bat
│   └── microxrceddsgen.in
└── share
    └── microxrcedds
        └── microxrceddsgen.jar

3 directories, 4 files

That was just for notice, I got the surprise doing a docker container and only keeping scripts/ but, of course, share/ was missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants