update cmake, re-add physx libs

* Physx library is special, while compiling physx-character-kinematic lib, it will cause CRT problems and link error. while we try to use compile as shared libs, its causing unresolved symbols problems and hard to fix.
This commit is contained in:
timlyeee 2021-08-02 18:09:58 +08:00
parent 35fc0ba5fb
commit a97e6f95e4
34 changed files with 5 additions and 5 deletions

View File

@ -275,11 +275,10 @@ list(APPEND CC_EXTERNAL_PRIVATE_DEFINITIONS __TBB_LIB_NAME=tbb)
if(USE_PHYSICS_PHYSX) if(USE_PHYSICS_PHYSX)
set(PhysXSDK PhysX PhysXCommon PhysXFoundation PhysXExtensions PhysXCooking PhysXCharacterKinematic PhysXVehicle PhysXPvdSDK) set(PhysXSDK PhysX PhysXCommon PhysXFoundation PhysXExtensions PhysXCooking PhysXCharacterKinematic PhysXVehicle PhysXPvdSDK)
foreach(PX IN LISTS PhysXSDK) foreach(PX IN LISTS PhysXSDK)
add_library(${PX} SHARED IMPORTED GLOBAL) add_library(${PX} STATIC IMPORTED GLOBAL)
set_target_properties(${PX} PROPERTIES set_target_properties(${PX} PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/${PX}_static_32.dll IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_LIST_DIR}/libs/PhysX/debug/${PX}_static_32.lib
IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/libs/${PX}_static_32.lib IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_LIST_DIR}/libs/PhysX/release/${PX}_static_32.lib
) )
endforeach() endforeach()
else() else()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -277,7 +277,8 @@ if(USE_PHYSICS_PHYSX)
foreach(PX IN LISTS PhysXSDK) foreach(PX IN LISTS PhysXSDK)
add_library(${PX} STATIC IMPORTED GLOBAL) add_library(${PX} STATIC IMPORTED GLOBAL)
set_target_properties(${PX} PROPERTIES set_target_properties(${PX} PROPERTIES
IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/libs/${PX}_static_64.lib IMPORTED_LOCATION_DEBUG ${CMAKE_CURRENT_LIST_DIR}/libs/PhysX/debug/${PX}_static_64.lib
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_LIST_DIR}/libs/PhysX/release/${PX}_static_64.lib
) )
endforeach() endforeach()
else() else()

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.