Skip to content
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

Do not include resource files when creating a static library on Windows #413

Open
wants to merge 3 commits into
base: 4.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions physx/source/compiler/cmake/windows/PhysX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ SET(PHYSX_COMMON_WINDOWS_HEADERS
)
SOURCE_GROUP(include\\common\\windows FILES ${PHYSX_COMMON_WINDOWS_HEADERS})

IF(NOT PX_GENERATE_STATIC_LIBRARIES)
SET(PHYSX_RESOURCE
${PHYSX_SOURCE_DIR}/compiler/resource_${RESOURCE_LIBPATH_SUFFIX}/PhysX.rc
${PHYSX_SOURCE_DIR}/compiler/resource_${RESOURCE_LIBPATH_SUFFIX}/resource.h
)
SOURCE_GROUP(resource FILES ${PHYSX_RESOURCE})
ENDIF()

SET(PHYSX_DEVICE_SOURCE
${PX_SOURCE_DIR}/device/nvPhysXtoDrv.h
Expand Down
4 changes: 3 additions & 1 deletion physx/source/compiler/cmake/windows/PhysXCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ SET(PHYSXCOMMON_WINDOWS_SOURCE
)
SOURCE_GROUP(common\\src\\windows FILES ${PHYSXCOMMON_WINDOWS_SOURCE})

IF(NOT PX_GENERATE_STATIC_LIBRARIES)
SET(PHYSXCOMMON_RESOURCE
${PHYSX_SOURCE_DIR}/compiler/resource_${RESOURCE_LIBPATH_SUFFIX}/PhysXCommon.rc)
SOURCE_GROUP(resource FILES ${PHYSXCOMMON_RESOURCE})
ENDIF()

SET(PXCOMMON_PLATFORM_SRC_FILES
${PHYSXCOMMON_WINDOWS_HEADERS}
Expand Down Expand Up @@ -104,4 +106,4 @@ IF(PHYSXCOMMON_LIBTYPE STREQUAL "SHARED")
ELSE()
INSTALL(FILES ${PHYSX_ROOT_DIR}/$<$<CONFIG:debug>:${PX_ROOT_LIB_DIR}/debug>$<$<CONFIG:release>:${PX_ROOT_LIB_DIR}/release>$<$<CONFIG:checked>:${PX_ROOT_LIB_DIR}/checked>$<$<CONFIG:profile>:${PX_ROOT_LIB_DIR}/profile>/$<$<CONFIG:debug>:${PHYSXCOMMON_COMPILE_PDB_NAME_DEBUG}>$<$<CONFIG:checked>:${PHYSXCOMMON_COMPILE_PDB_NAME_CHECKED}>$<$<CONFIG:profile>:${PHYSXCOMMON_COMPILE_PDB_NAME_PROFILE}>$<$<CONFIG:release>:${PHYSXCOMMON_COMPILE_PDB_NAME_RELEASE}>.pdb
DESTINATION $<$<CONFIG:debug>:${PX_ROOT_LIB_DIR}/debug>$<$<CONFIG:release>:${PX_ROOT_LIB_DIR}/release>$<$<CONFIG:checked>:${PX_ROOT_LIB_DIR}/checked>$<$<CONFIG:profile>:${PX_ROOT_LIB_DIR}/profile> OPTIONAL)
ENDIF()
ENDIF()
2 changes: 2 additions & 0 deletions physx/source/compiler/cmake/windows/PhysXCooking.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ SET(PHYSX_COOKING_WINDOWS_SOURCE
)
SOURCE_GROUP(src\\windows FILES ${PHYSX_COOKING_WINDOWS_SOURCE})

IF(NOT PX_GENERATE_STATIC_LIBRARIES)
SET(PHYSX_COOKING_RESOURCE
${PHYSX_SOURCE_DIR}/compiler/resource_${RESOURCE_LIBPATH_SUFFIX}/PhysXCooking.rc
)
SOURCE_GROUP(resource FILES ${PHYSX_COOKING_RESOURCE})
ENDIF()

SET(PHYSXCOOKING_PLATFORM_SRC_FILES
${PHYSX_COOKING_WINDOWS_SOURCE}
Expand Down
4 changes: 3 additions & 1 deletion physx/source/compiler/cmake/windows/PhysXFoundation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ SET(PXSHARED_UNIXPLATFORM_HEADERS
)
SOURCE_GROUP(shared\\include\\unix FILES ${PXSHARED_UNIXPLATFORM_HEADERS})

IF(NOT PX_GENERATE_STATIC_LIBRARIES)
SET(PHYSXFOUNDATION_RESOURCE_FILE
${PHYSX_SOURCE_DIR}/compiler/resource_${RESOURCE_LIBPATH_SUFFIX}/PhysXFoundation.rc
)
SOURCE_GROUP(resource FILES ${PHYSXFOUNDATION_RESOURCE_FILE})
ENDIF()

SET(PHYSXFOUNDATION_PLATFORM_SOURCE
${LL_SOURCE_DIR}/src/windows/PsWindowsAtomic.cpp
Expand Down Expand Up @@ -117,4 +119,4 @@ IF(PHYSXFOUNDATION_LIBTYPE STREQUAL "SHARED")
ELSE()
INSTALL(FILES ${PHYSX_ROOT_DIR}/$<$<CONFIG:debug>:${PX_ROOT_LIB_DIR}/debug>$<$<CONFIG:release>:${PX_ROOT_LIB_DIR}/release>$<$<CONFIG:checked>:${PX_ROOT_LIB_DIR}/checked>$<$<CONFIG:profile>:${PX_ROOT_LIB_DIR}/profile>/$<$<CONFIG:debug>:${PHYSXFOUNDATION_COMPILE_PDB_NAME_DEBUG}>$<$<CONFIG:checked>:${PHYSXFOUNDATION_COMPILE_PDB_NAME_CHECKED}>$<$<CONFIG:profile>:${PHYSXFOUNDATION_COMPILE_PDB_NAME_PROFILE}>$<$<CONFIG:release>:${PHYSXFOUNDATION_COMPILE_PDB_NAME_RELEASE}>.pdb
DESTINATION $<$<CONFIG:debug>:${PX_ROOT_LIB_DIR}/debug>$<$<CONFIG:release>:${PX_ROOT_LIB_DIR}/release>$<$<CONFIG:checked>:${PX_ROOT_LIB_DIR}/checked>$<$<CONFIG:profile>:${PX_ROOT_LIB_DIR}/profile> OPTIONAL)
ENDIF()
ENDIF()
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ bool SweepTest::doSweepTest(const InternalCBData_FindTouchedGeom* userData,
// TODO: 1. should we treat stationary kinematics the same as statics.
// 2. should we treat all kinematics the same as statics.
// 3. should we treat no kinematics the same as statics.
if((touchedActor->getConcreteType() == PxConcreteType::eRIGID_STATIC) && (C.mInternalIndex!=PX_INVALID_U32))
if((C.mInternalIndex!=PX_INVALID_U32))
{
mFlags |= STF_VALIDATE_TRIANGLE_DOWN;
const PxTriangle& touchedTri = mWorldTriangles.getTriangle(C.mInternalIndex);
Expand Down Expand Up @@ -1558,7 +1558,7 @@ bool SweepTest::doSweepTest(const InternalCBData_FindTouchedGeom* userData,
}
else if(sweepPass==SWEEP_PASS_SIDE || sweepPass==SWEEP_PASS_SENSOR)
{
if((touchedActor->getConcreteType() == PxConcreteType::eRIGID_STATIC) && (C.mInternalIndex!=PX_INVALID_U32))
if((C.mInternalIndex!=PX_INVALID_U32))
{
mFlags |= STF_VALIDATE_TRIANGLE_SIDE;
const PxTriangle& touchedTri = mWorldTriangles.getTriangle(C.mInternalIndex);
Expand Down