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

bullet provided cmake config files are pointing to the wrong header file installation path resulting in BulletDynamics/Vehicle/btRaycastVehicle.h not found #4624

Open
pattakosn opened this issue Jun 7, 2024 · 0 comments

Comments

@pattakosn
Copy link

pattakosn commented Jun 7, 2024

I am trying to compile a project using cmake. i have installed my linux distribuition package of bulled, bullet seems to be correctly found:

cmake ..
-- BULLET_FOUND="1" ; BULLET_INCLUDE_DIR="include/bullet" ; BULLET_INCLUDE_DIRS="include/bullet" ; BULLET_LIBRARIES="LinearMath;Bullet3Common;BulletInverseDynamics;BulletCollision;BulletDynamics;BulletSoftBody" ; BULLET_ROOT=""
-- PkgConfig::FREETYPE2="" ; PkgConfig::freetype2=""
-- Configuring done (0.0s)
-- Generating done (0.0s)

but I get this error:

cd build/runtime && /usr/bin/c++   -I/home/pattakosn/github.com/runtime/include/bullet  -O3 -DNDEBUG -std=gnu++20 -pthread -MD -MT runtime/CMakeFiles/runtime.dir/Physics/Car.cpp.o -MF CMakeFiles/runtime.dir/Physics/Car.cpp.o.d -o CMakeFiles/runtime.dir/Physics/Car.cpp.o -c /home/pattakosn/github.com/runtime/Physics/Car.cpp
/home/pattakosn/github.com/runtime/Physics/Car.cpp:32:10: fatal error: BulletDynamics/Vehicle/btRaycastVehicle.h: No such file or directory
   32 | #include <BulletDynamics/Vehicle/btRaycastVehicle.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

it seems to me that as the bullet include path is not an absolute path, it is incorrectly interpreted as relative to the current source dir which is obviously wrong.

edit: Apparently switching from find_package(Bullet CONFIG REQUIRED) to find_package(Bullet MODULE REQUIRED) fixes it but this is not how it is supposed to work.

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

1 participant