-
Notifications
You must be signed in to change notification settings - Fork 811
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
How in include Physx in a cmake project #249
Comments
Hi Arijeet, I've recently used PhysX 4 with CMake in this way, although it's probably not an intended/supported use. The proposed changes in #222 and #208 should make using PhysX in our own CMake projects easier in the future. Until then, try something like this just before your
|
It's working now, thankx |
Here towards the end of 2020 and #222 , #208 are still open. It appears on 4.1, cmake_generate_projects requires some more variables: CMAKE_CONFIGURATION_TYPES and TARGET_BUILD_PLATFORM
EDIT: set PX_GENERATE_STATIC_LIBRARIES to ON. Removed CMAKE_CONFIGURATION_TYPES line. Added copy command. |
Hi thanks for that. But I now am getting C2220 and C5045 compiler errors and cannot solve them. Any suggestions? Google did not help. |
@cemoezdemir please share your CMakeLists file, path to PhysX and informative lines from the build log. Thanks. |
You can see the path above. If something seems out of place I am new to CMake and I basically pasted your CMakelList into the provided one from university. And this is my second CMakeList:
The CMake build finishes without problems, but then I get this when compiling:
|
I do not see anything in the logs that may help, except "NMAKE: fatal error U1077", which when I googled seems to be a problem with the Visual Studio installation or a missing path to compiler executable. I suspect you've been using your environment for a while, so I'm not really sure what's wrong with nmake. However, I personally use CMake (cmake.org) and I've had zero problems, if it's not too much trouble could you give it a try? Thanks. |
Thanks for you fast reply, but I am not sure if I am understanding you right. I am using CMake already, version 3.18.4 to be exact. Maybe I also should mention that I am using CLion. |
Your logs say you're running NMAKE. The issue is "NMAKE: fatal error U1077". I was suggesting to fix nmake, I suspect you should go into your Build Configuration and choose the path to the compiler: https://www.jetbrains.com/help/clion/clion-quick-start-guide.html#build-and-run. The alternative I was suggesting is to quickly install cmake (cmake.org), clean, configure, generate and run |
Hi again. I managed to get it to work. I just needed PhysX 4.1 and added some ccompiler options to stop treating warnings as errors. Thank you for your help! |
I am using PhysX and cmake to make a game for my university project. However, I am having issues with cmake library. My PhysX code is added as a git submodule within my project in submodules directory
but on running cmake I am getting these error:
The text was updated successfully, but these errors were encountered: