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

Plugin examples not compiling due to cmake prefix path not set in CMakeLists.txt #158

Closed
siksal opened this issue Jan 17, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@siksal
Copy link

siksal commented Jan 17, 2025

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build? Source (gz-plugin3) with this latest commit

Description

  • Expected behavior: Compile the example plugin according to the README
  • Actual behavior: Compilation error after running cmake ..

Steps to reproduce

  1. Install gz-plugin3 from source according to this README
  2. Go to the examples directory
mkdir build
cd build
cmake ..

Output

Image

Additional Note

Cmake prefix path should be set in the CMakeLists.txt in the example directory to locate the necessary file for gz-plugin.

@siksal siksal added the bug Something isn't working label Jan 17, 2025
@azeey
Copy link
Contributor

azeey commented Jan 17, 2025

You'll need to install gz-plugin (sudo make install) so that it's available for the example. The example is designed to be a standalone project so that you can move it anywhere and customize it for your needs, but this requires the assumption that gz-plugin is either installed from binaries or if building from source, that you have compiled with -DCMAKE_INSTALL_PREFIX=/usr and ran sudo make install. There are other ways to accomplish this, but these are the easiest ones.

@azeey azeey removed this from Core development Jan 17, 2025
@azeey azeey self-assigned this Jan 17, 2025
@siksal
Copy link
Author

siksal commented Jan 17, 2025

You'll need to install gz-plugin (sudo make install) so that it's available for the example. The example is designed to be a standalone project so that you can move it anywhere and customize it for your needs, but this requires the assumption that gz-plugin is either installed from binaries or if building from source, that you have compiled with -DCMAKE_INSTALL_PREFIX=/usr and ran sudo make install. There are other ways to accomplish this, but these are the easiest ones.

Thank you. It worked that way.

@siksal siksal closed this as completed Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants