Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
577 views
in Technique[技术] by (71.8m points)

cmake - Building bullet3 on Windows 10 - not all libraries installed

I have built bullet3-3.08 on Windows using cmake (commands have been executed from the build folder created in the bullet3-3.08 directory):

cmake -G "Visual Studio 16 2019" -A x64 -D "CMAKE_INSTALL_PREFIX:PATH=C:/Workspace/MyLibs/bullet3-3.08" ..
cmake --build . --config Release --parallel 8 --target install

I have noticed that the installation folder doesn't contain all built libraries, for example BulletCollision.lib is present the build/lib/Release folder but hasn't been installed in the C:/Workspace/MyLibs/bullet3-3.08/lib Moreover C:/Workspace/MyLibs/bullet3-3.08/include directory doesn't contain all headers, for example btBulletDynamicsCommon.h

How to fix that ? I don't want to copy headers/libs manually.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

When building bullet3-3.08 on Windows with Visual Studio project files the libraries are not installed by default.

You need to add -DINSTALL_LIBS=ON to your command line to enable the installation, e.g.

cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX:PATH=C:/Workspace/MyLibs/bullet3-3.08 -DINSTALL_LIBS=ON ..

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...