• 12
• 10
• 10
• 13
• 10

# How to find Install paths for PhysX SDK and other SDKs?

This topic is 2570 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I've successfully implemented cmake in my project but I still need to find the paths to some SDKs. Mainly PhysX and the FBX SDK. Seems like they should have registry keys with their paths but I can't seem to find any. How can I get the install paths for these SDKs?

##### Share on other sites
Usually you choose where to install them.

For example:
I install usually at D:\cpp\SDL\
Then you add "D:\cpp\SDL\include"to the include paths and "D:\cpp\SDL\lib"to the library paths.
Not related to the registry

##### Share on other sites

Usually you choose where to install them.

For example:
I install usually at D:\cpp\SDL\
Then you add "D:\cpp\SDL\include"to the include paths and "D:\cpp\SDL\lib"to the library paths.
Not related to the registry

No, I'm trying to find where they are installed. I'm trying to get the directories so that cmake can automatically generate project files that have the include and library paths set.

##### Share on other sites

[quote name='coderWalker' timestamp='1299438009' post='4782502']
Usually you choose where to install them.
*snip*

No, I'm trying to find where they are installed. I'm trying to get the directories so that cmake can automatically generate project files that have the include and library paths set.
[/quote]They're installed where ever you chose to install them, or if you did not change that option they'll be in the default location. I'd suggest using Explorer's search functionality to look for the directories if you don't know where these are. Alternatively, you could check the documentation to see if you can identify the default locations -- these will often be listed in tutorials on setting up the library in question.

##### Share on other sites
I think the OP is looking for some way to read the path information without knowing the specific system, to create abstract project files. Some SDK's exposes an environment variable that points to the install path. The DirectX SDK, for example, has DXSDK_DIR. Sadly this is not always the case and there is generally no standard way of getting SDK install paths.

##### Share on other sites
In theory, you'd use a line like
find_package( PhysX )
Then you should have
${PHYSX_INCLUDE_DIRS} You should be able to use the find_package() calls to find most installed libraries. But it does depend on some special package finder files that cmake uses for each library. A quick google turned up this promising find file that you'd put in your cmake modules directory alongside the other Find{name}.cmake files if you don't have a FindPhysX.cmake there already. #### Share this post ##### Link to post ##### Share on other sites In theory, you'd use a line like find_package( PhysX ) Then you should have${PHYSX_INCLUDE_DIRS}

Yes, exactly find_package( PhysX ) then calls a module file called FindPhysX.cmake. This is the file I am trying to create to find the directory.

Right now it's just this basically:

 FIND_PATH(PHYSX_INCLUDE_PATH NxPhysics.h PATHS "\$ENV{PROGRAMFILES}/NVIDIA Corporation/NVIDIA PhysX SDK/v2.8.3/SDKs/Physics/include" DOC "The directory where NxPhysics.h resides")

The problem with that is if the PhysX version is different than the directory will be different. Also if the user has the PhysX SDK install in a completely different location than there is no way to know where it is...

##### Share on other sites

Yes, exactly find_package( PhysX ) then calls a module file called FindPhysX.cmake. This is the file I am trying to create to find the directory.

Sorry, I edited my post above. I had put a link to a file someone else already made that looks to have all that in there?

##### Share on other sites

[quote name='SteveDeFacto' timestamp='1299463650' post='4782636']
Yes, exactly find_package( PhysX ) then calls a module file called FindPhysX.cmake. This is the file I am trying to create to find the directory.

Sorry, I edited my post above. I had put a link to a file someone else already made that looks to have all that in there?
[/quote]

I actually think I saw it but I thought it would not work on windows because the top line "[font=monospace][size=2]IF(UNIX)" I don't understand how that code would work on windows?[/font]