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

FindPhysX should search specific lib names first #1598

Merged
merged 1 commit into from
Jul 9, 2024
Merged
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
8 changes: 8 additions & 0 deletions cmake/FindPhysX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,15 @@ elseif(NOT VCPKG_TOOLCHAIN)
set(_PHYSX_RELEASE_PATHS ${CMAKE_PREFIX_PATH})
endif()

if(VCPKG_TOOLCHAIN)
set(_PHYSX_SKIP_SYSTEM_PATHS NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
endif()

find_path(PHYSX_INCLUDE_DIR NAMES PxPhysicsAPI.h
PATHS ${_PHYSX_PREFIX}
PATH_SUFFIXES include/physx include
NO_CMAKE_PATH
${_PHYSX_SKIP_SYSTEM_PATHS}
)
mark_as_advanced(PHYSX_INCLUDE_DIR)

Expand All @@ -154,6 +159,7 @@ if(PHYSX_INCLUDE_DIR)
PATHS ${_PHYSX_PREFIX}
PATH_SUFFIXES include/physx include
NO_CMAKE_PATHS
${_PHYSX_SKIP_SYSTEM_PATHS}
)
mark_as_advanced(PHYSX_FOUNDATION_INCLUDE_DIR)
else()
Expand All @@ -173,12 +179,14 @@ macro(_find_physx_library SUFFIX)
PATHS ${_PHYSX_RELEASE_PATHS}
PATH_SUFFIXES lib
NO_CMAKE_PATH
${_PHYSX_SKIP_SYSTEM_PATHS}
)
find_library(${VAR_NAME}_LIBRARY_DEBUG
NAMES ${_${VAR_NAME}_LIBRARY_NAMES}
PATHS ${_PHYSX_DEBUG_PATHS}
PATH_SUFFIXES lib
NO_CMAKE_PATH
${_PHYSX_SKIP_SYSTEM_PATHS}
)
select_library_configurations(${VAR_NAME})

Expand Down