I'm trying to integrate PhysX into my project using cmake, the PhysX library is added to my project as git submodule, currently i got to the point where I can use the library in my project but it seems that some cmake variables are not set correctly and i dont have a clean setup to continue working.
The issue im finding is that the "engine\external\physx\physx\source\compiler\cmake\windows\CMakeLists.txt" tries to copy dlls from folders that don't exist on my drive , the commented out lines are the ones that i've disabled in order to make CMake finish configurating and generating files.
the "$ENV{PM_PhysXDevice_PATH}" and "$ENV{PM_freeglut_PATH}" are empty when i print them out , and also the "/bin/x86/" is folder that is not generated , instead i get "win.x86_64.vc143.mt" folder that has the checked , debug, profile and release subfolders containg the dlls...
I didn't try to change those paths manually because I've already integrated PhysX library in my older project by manually copy/pasting source files and dlls to output directory, i don't want to do that again
So im wondering if there are some steps I've missed in my setup or maybe there's something i can do to initialize those values correctly to be in sync with the workflow im currently using...
Below is the part of my project's cmakelists.txt that im using to setup PhysX , I've found the example that uses most of these settings
#physx
set( PHYSX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/physx/physx )
set( PHYSX_ROOT_DIR ${PHYSX_PATH} ) #This is needed for $ENV{PHYSX_PATH}/compiler/public/CMakeLists.txt
set( PHYSX_INCLUDE_DIRS {PHYSX_PATH}/include/ {PHYSX_PATH}/../pxshared/include/ )
set( PHYSX_LIBRARIES
PhysXExtensions
PhysX
PhysXPvdSDK
PhysXVehicle
PhysXCharacterKinematic
PhysXCooking
PhysXCommon
PhysXFoundation
# SnippetUtils
)
set(TARGET_BUILD_PLATFORM "windows") # has to match the TARGET_BUILD_PLATFORM in $ENV{PHYSX_PATH}/physix/buildtools/cmake_generate_projects.py
set(PX_BUILDSNIPPETS OFF CACHE BOOL "Generate the snippets")
set(PX_BUILDPUBLICSAMPLES OFF CACHE BOOL "Generate the samples projects")
set(PX_GENERATE_STATIC_LIBRARIES ON CACHE BOOL "Generate static libraries")
set(PX_FLOAT_POINT_PRECISE_MATH OFF CACHE BOOL "Float point precise math")
set(NV_USE_STATIC_WINCRT ON CACHE BOOL "Use the statically linked windows CRT")
set(NV_USE_DEBUG_WINCRT ON CACHE BOOL "Use the debug version of the CRT")
set(PXSHARED_PATH ${PHYSX_PATH}/../pxshared)
set(PXSHARED_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CMAKEMODULES_VERSION "1.27")
set(CMAKEMODULES_PATH ${PHYSX_PATH}/../externals/cmakemodules)
set(PX_OUTPUT_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/externals/physx)
set(PX_OUTPUT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}/externals/physx)
add_subdirectory(${PHYSX_PATH}/compiler/public externals/physx)
include_directories(external/physx/physx/include)
I'm trying to integrate PhysX into my project using cmake, the PhysX library is added to my project as git submodule, currently i got to the point where I can use the library in my project but it seems that some cmake variables are not set correctly and i dont have a clean setup to continue working.
The issue im finding is that the "engine\external\physx\physx\source\compiler\cmake\windows\CMakeLists.txt" tries to copy dlls from folders that don't exist on my drive , the commented out lines are the ones that i've disabled in order to make CMake finish configurating and generating files.
the "$ENV{PM_PhysXDevice_PATH}" and "$ENV{PM_freeglut_PATH}" are empty when i print them out , and also the "/bin/x86/" is folder that is not generated , instead i get "win.x86_64.vc143.mt" folder that has the checked , debug, profile and release subfolders containg the dlls...
I didn't try to change those paths manually because I've already integrated PhysX library in my older project by manually copy/pasting source files and dlls to output directory, i don't want to do that again
So im wondering if there are some steps I've missed in my setup or maybe there's something i can do to initialize those values correctly to be in sync with the workflow im currently using...
Below is the part of my project's cmakelists.txt that im using to setup PhysX , I've found the example that uses most of these settings