Open diegoferigo opened 4 years ago
Hi @diegoferigo, the PR #222 provides a PhysXConfig.cmake for the build and install tree,
so find_package(PhysX)
can be used.
It also removed the requirement of python and the presets for the different platforms. The goal is to facilitate integration of PhysX in third party projects. Any comments on that PR is welcome, and hope it helps!
Hi @phcerdan, thanks a lot, it looks great! I left few preliminary comments in the PR. I let you know more as soon as I can test it.
I am checking the best way to link PhysX against targets of my CMake project. The documentation reports the steps to add the include directories and the linked libraries.
However, considering that PhysX has a very good CMake structure, it would be great if the targets were directly exported by CMake.
I found that an export set already exists:
https://github.com/NVIDIAGameWorks/PhysX/blob/ae80dede0546d652040ae6260a810e53e20a06fa/physx/source/compiler/cmake/linux/CMakeLists.txt#L114-L118
But it is never installed. This means that something similar is missing:
The final goal is having properly exported targets that transitively carry properties. Exporting the targets, together with a proper package config file, would allow user code to do the following:
Note that in this way users do not have to specify anything but the linked imported target. As a bonus user would also get a proper release matching.
Resources: