Add PhysX to a multi platform CMake project #89
-
I am setting up a CMake project for a multiplatform app (Windows and Linux x64), what is the best way to add PhysX to the project? Do I need to build manually the library and then mantain two different projects? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'm in the same situation and looking for advice with this as well |
Beta Was this translation helpful? Give feedback.
-
PhysX have support for both Windows and Linux. We don't provide precompiled PhysX so you need to compile it from source. This involves including in your project and linking PhysX Libraries to your targets etc, Use CMake’s platform checks to handle different compiler flags, preprocessor definitions, and include directories needed for Windows and Linux conditionally. You can refer to PhysX's cmake files to understand more or less how it does support multiple platforms and to configure your project. Thanks |
Beta Was this translation helpful? Give feedback.
At present, we don't have such a thing as "click and deploy". Integrating PhysX, particularly on multiple platforms, involves a fair understanding of build systems and compilers, which CMake manages. Given PhysX's complexity and the nature of custom setups it often requires, having a basic knowledge of how CMake and compilers work is essential.