bullet3
bullet3 copied to clipboard
CMake reformat
This pr consist of the cmake reformatting of #2389:
- Bump CMake version: bullet3 was already using functions from more recent cmake versions
- Use targets of CMake by using
TARGET_LINK_LIBRARIES
- Make the
install()
calls a bit easier to read by wrapping it.
@erwincoumans Please review.
@erwincoumans Looks like @madebr did good work here and has a solid understanding of CMake. Any chance you can have a look at this and later the other CMake PR?
@madebr Are you still using bullet CMake actively? Will you be able to take care of following-up on bug reports if this is merged?
I'm still using it + packaging it for conan-center-index. If problems/issues arrive, I'd be happy to look at them. But I think the main issue is that @erwincoumans is overloaded with other work to perform a thorough review.
This PR looks solid and makes Bullet usable with CMake - right now the targets don't define include dirs so linking to Bulet targets via target_link_libraries
is not enough to use Bullet properly.
P.S. It will also be nice to add aliases for targets as was done in https://github.com/bulletphysics/bullet3/pull/1303 which was reverted, unfortunately.