Skip to content

Commit

Permalink
Add ALIAS for all target adding the namespace Physx::
Browse files Browse the repository at this point in the history
This allow to refer to the target with the same name
`PhysX::PhysXCommon` when using either `add_subdirectory` or
`find_package`
  • Loading branch information
phcerdan committed Aug 8, 2020
1 parent 9789a7a commit 4bdc673
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/FastXml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ADD_LIBRARY(FastXml ${FASTXML_LIBTYPE}
${FASTXML_HEADERS}
${FASTXML_SOURCE}
)
ADD_LIBRARY(PhysX::FastXml ALIAS FastXml)

GET_TARGET_PROPERTY(PHYSXFOUNDATION_INCLUDES PhysXFoundation INTERFACE_INCLUDE_DIRECTORIES)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/LowLevel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ ADD_LIBRARY(LowLevel ${LOWLEVEL_LIBTYPE}
${LL_SOFTWARE_HEADERS}
${LL_SOFTWARE_SOURCE}
)
ADD_LIBRARY(PhysX::LowLevel ALIAS LowLevel)

GET_TARGET_PROPERTY(PHYSXFOUNDATION_INCLUDES PhysXFoundation INTERFACE_INCLUDE_DIRECTORIES)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/LowLevelAABB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ ADD_LIBRARY(LowLevelAABB ${LOWLEVELAABB_LIBTYPE}
${LLAABB_HEADERS}
${LLAABB_SOURCE}
)
ADD_LIBRARY(PhysX::LowLevelAABB ALIAS LowLevelAABB)

GET_TARGET_PROPERTY(PHYSXFOUNDATION_INCLUDES PhysXFoundation INTERFACE_INCLUDE_DIRECTORIES)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/LowLevelDynamics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ ADD_LIBRARY(LowLevelDynamics ${LOWLEVELDYNAMICS_LIBTYPE}
${LLDYNAMICS_SOURCE}
${LLDYNAMICS_INTERNAL_INCLUDES}
)
ADD_LIBRARY(PhysX::LowLevelDynamics ALIAS LowLevelDynamics)

GET_TARGET_PROPERTY(PHYSXFOUNDATION_INCLUDES PhysXFoundation INTERFACE_INCLUDE_DIRECTORIES)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ ADD_LIBRARY(PhysX ${PHYSX_LIBTYPE}

${PHYSX_PLATFORM_SRC_FILES}
)
ADD_LIBRARY(PhysX::PhysX ALIAS PhysX)

# Add the headers to the install
INSTALL(FILES ${PHYSX_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include)
Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXCharacterKinematic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ ADD_LIBRARY(PhysXCharacterKinematic ${PHYSXCHARACTERKINEMATIC_LIBTYPE}
${PHYSXCCT_HEADERS}
${PHYSXCCT_SOURCE}
)
ADD_LIBRARY(PhysX::PhysXCharacterKinematic ALIAS PhysXCharacterKinematic)

INSTALL(FILES ${PHYSXCCT_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/characterkinematic)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ ADD_LIBRARY(PhysXCommon ${PHYSXCOMMON_LIBTYPE}
${PHYSXCOMMON_GU_PCM_SOURCE}
${PHYSXCOMMON_GU_SWEEP_SOURCE}
)
ADD_LIBRARY(PhysX::PhysXCommon ALIAS PhysXCommon)

INSTALL(FILES ${PHYSXCOMMON_GEOMETRY_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/geometry)
INSTALL(FILES ${PHYSXCOMMON_GEOMUTILS_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/geomutils)
Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXCooking.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ ADD_LIBRARY(PhysXCooking ${PHYSXCOOKING_LIBTYPE}

${PHYSXCOOKING_PLATFORM_SRC_FILES}
)
ADD_LIBRARY(PhysX::PhysXCooking ALIAS PhysXCooking)

INSTALL(FILES ${PHYSX_COOKING_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/cooking)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXExtensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ ADD_LIBRARY(PhysXExtensions ${PHYSXEXTENSIONS_LIBTYPE}
${PHYSX_EXTENSIONS_SERIALIZATION_FILE_SOURCE}
${PHYSX_EXTENSIONS_SERIALIZATION_BINARY_SOURCE}
)
ADD_LIBRARY(PhysX::PhysXExtensions ALIAS PhysXExtensions)

INSTALL(FILES ${PHYSX_EXTENSIONS_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/extensions)
INSTALL(FILES ${PHYSX_FILEBUF_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/filebuf)
Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXFoundation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ ADD_LIBRARY(PhysXFoundation ${PHYSXFOUNDATION_LIBTYPE}
${PXSHARED_HEADERS}
${PXSHARED_PLATFORM_HEADERS}
)
ADD_LIBRARY(PhysX::PhysXFoundation ALIAS PhysXFoundation)

# Add the headers to the install
INSTALL(FILES ${PHYSXFOUNDATION_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include)
Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXPvdSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ ADD_LIBRARY(PhysXPvdSDK ${PHYSXPVDSDK_LIBTYPE}

${PHYSXPVDSDK_PLATFORM_FILES}
)
ADD_LIBRARY(PhysX::PhysXPvdSDK ALIAS PhysXPvdSDK)

TARGET_INCLUDE_DIRECTORIES(PhysXPvdSDK
PRIVATE ${PHYSXPVDSDK_PLATFORM_INCLUDES}
Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXTask.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ADD_LIBRARY(PhysXTask ${PHYSXTASK_LIBTYPE}
${PHYSXTASK_HEADERS}
${PHYSXTASK_SOURCE}
)
ADD_LIBRARY(PhysX::PhysXTask ALIAS PhysXTask)

INSTALL(FILES ${PHYSXTASK_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/task)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/PhysXVehicle.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ ADD_LIBRARY(PhysXVehicle ${PHYSXVEHICLE_LIBTYPE}
${PHYSX_VEHICLE_METADATA_HEADERS}
${PHYSX_VEHICLE_METADATA_SOURCE}
)
ADD_LIBRARY(PhysX::PhysXVehicle ALIAS PhysXVehicle)

INSTALL(FILES ${PHYSX_VEHICLE_HEADERS} DESTINATION ${PHYSX_INSTALL_PREFIX}/include/vehicle)

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/SceneQuery.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ ADD_LIBRARY(SceneQuery ${SCENEQUERY_LIBTYPE}
${SCENEQUERY_HEADERS}
${SCENEQUERY_SOURCE}
)
ADD_LIBRARY(PhysX::SceneQuery ALIAS SceneQuery)

# Target specific compile options

Expand Down
1 change: 1 addition & 0 deletions physx/source/compiler/cmake/SimulationController.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ ADD_LIBRARY(SimulationController ${SIMULATIONCONTROLLER_LIBTYPE}
${SIMULATIONCONTROLLER_HEADERS}
${SIMULATIONCONTROLLER_SOURCE}
)
ADD_LIBRARY(PhysX::SimulationController ALIAS SimulationController)

GET_TARGET_PROPERTY(PHYSXFOUNDATION_INCLUDES PhysXFoundation INTERFACE_INCLUDE_DIRECTORIES)

Expand Down

0 comments on commit 4bdc673

Please sign in to comment.