Init
This commit is contained in:
84
physx/samples/compiler/cmake/CMakeLists.txt
Normal file
84
physx/samples/compiler/cmake/CMakeLists.txt
Normal file
@ -0,0 +1,84 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
|
||||
project(SamplesAndSDK C CXX)
|
||||
|
||||
IF(NOT DEFINED CMAKEMODULES_VERSION)
|
||||
SET(CMAKEMODULES_PATH $ENV{PM_CMakeModules_PATH} CACHE INTERNAL "Path to CMakeModules")
|
||||
SET(CMAKEMODULES_NAME $ENV{PM_CMakeModules_NAME} CACHE INTERNAL "CMakeModules name")
|
||||
SET(CMAKEMODULES_VERSION $ENV{PM_CMakeModules_VERSION} CACHE INTERNAL "CMakeModules version from generation batch")
|
||||
|
||||
#TODO: More elegance
|
||||
IF(NOT EXISTS ${CMAKEMODULES_PATH})
|
||||
MESSAGE(FATAL_ERROR "Could not find ${CMAKEMODULES_PATH}")
|
||||
ENDIF()
|
||||
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_MODULE_PATH ${CMAKEMODULES_PATH})
|
||||
|
||||
# This is required to be defined by external callers!
|
||||
IF(NOT DEFINED PHYSX_ROOT_DIR)
|
||||
MESSAGE(FATAL_ERROR "PHYSX_ROOT_DIR variable wasn't set.")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT EXISTS ${PHYSX_ROOT_DIR})
|
||||
MESSAGE(FATAL_ERROR "PHYSX_ROOT_DIR variable was invalid.")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(NvidiaBuildOptions)
|
||||
|
||||
IF(CMAKE_CONFIGURATION_TYPES)
|
||||
SET(CMAKE_CONFIGURATION_TYPES debug checked profile release)
|
||||
SET(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
|
||||
"Reset config to what we need"
|
||||
FORCE)
|
||||
|
||||
# Need to define these at least once.
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_PROFILE "")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
|
||||
ENDIF()
|
||||
|
||||
SET(SOURCE_DISTRO_FILE_LIST "")
|
||||
|
||||
SET(PROJECT_CMAKE_FILES_DIR compiler/cmake)
|
||||
SET(PLATFORM_CMAKELISTS ${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/CMakeLists.txt)
|
||||
|
||||
IF(NOT EXISTS ${PLATFORM_CMAKELISTS})
|
||||
MESSAGE(FATAL_ERROR "Unable to find platform CMakeLists.txt for ${TARGET_BUILD_PLATFORM} at ${PLATFORM_CMAKELISTS}")
|
||||
ENDIF()
|
||||
|
||||
# Include the platform specific CMakeLists
|
||||
INCLUDE(${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/CMakeLists.txt)
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
FOREACH(FILE_NAME ${SOURCE_DISTRO_FILE_LIST})
|
||||
FILE(APPEND "${CMAKE_CURRENT_BINARY_DIR}/source_distro_list.txt" "${FILE_NAME}\n")
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
177
physx/samples/compiler/cmake/SampleBase.cmake
Normal file
177
physx/samples/compiler/cmake/SampleBase.cmake
Normal file
@ -0,0 +1,177 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleBase common
|
||||
#
|
||||
|
||||
SET(SAMPLEBASE_DIR ${PHYSX_ROOT_DIR}/samples/samplebase/)
|
||||
|
||||
# One of the test files reaches into this directory for an include
|
||||
SET(UTILS_SRC_DIR "${PHYSX_ROOT_DIR}/test/common/Utils")
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
include(${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SampleBase.cmake)
|
||||
|
||||
SET(SAMPLEBASE_FILES
|
||||
${SAMPLEBASE_DIR}/AcclaimLoader.cpp
|
||||
${SAMPLEBASE_DIR}/AcclaimLoader.h
|
||||
${SAMPLEBASE_DIR}/Dummy.cpp
|
||||
${SAMPLEBASE_DIR}/InputEventBuffer.cpp
|
||||
${SAMPLEBASE_DIR}/InputEventBuffer.h
|
||||
${SAMPLEBASE_DIR}/PhysXSample.cpp
|
||||
${SAMPLEBASE_DIR}/PhysXSample.h
|
||||
${SAMPLEBASE_DIR}/PhysXSampleApplication.cpp
|
||||
${SAMPLEBASE_DIR}/PhysXSampleApplication.h
|
||||
${SAMPLEBASE_DIR}/Picking.cpp
|
||||
${SAMPLEBASE_DIR}/Picking.h
|
||||
${SAMPLEBASE_DIR}/RawLoader.cpp
|
||||
${SAMPLEBASE_DIR}/RawLoader.h
|
||||
${SAMPLEBASE_DIR}/RaycastCCD.cpp
|
||||
${SAMPLEBASE_DIR}/RaycastCCD.h
|
||||
${SAMPLEBASE_DIR}/RenderBaseActor.cpp
|
||||
${SAMPLEBASE_DIR}/RenderBaseActor.h
|
||||
${SAMPLEBASE_DIR}/RenderBaseObject.cpp
|
||||
${SAMPLEBASE_DIR}/RenderBaseObject.h
|
||||
${SAMPLEBASE_DIR}/RenderBoxActor.cpp
|
||||
${SAMPLEBASE_DIR}/RenderBoxActor.h
|
||||
${SAMPLEBASE_DIR}/RenderCapsuleActor.cpp
|
||||
${SAMPLEBASE_DIR}/RenderCapsuleActor.h
|
||||
${SAMPLEBASE_DIR}/RenderGridActor.cpp
|
||||
${SAMPLEBASE_DIR}/RenderGridActor.h
|
||||
${SAMPLEBASE_DIR}/RenderMaterial.cpp
|
||||
${SAMPLEBASE_DIR}/RenderMaterial.h
|
||||
${SAMPLEBASE_DIR}/RenderMeshActor.cpp
|
||||
${SAMPLEBASE_DIR}/RenderMeshActor.h
|
||||
${SAMPLEBASE_DIR}/RenderPhysX3Debug.cpp
|
||||
${SAMPLEBASE_DIR}/RenderPhysX3Debug.h
|
||||
${SAMPLEBASE_DIR}/RenderSphereActor.cpp
|
||||
${SAMPLEBASE_DIR}/RenderSphereActor.h
|
||||
${SAMPLEBASE_DIR}/RenderTexture.cpp
|
||||
${SAMPLEBASE_DIR}/RenderTexture.h
|
||||
${SAMPLEBASE_DIR}/SampleAllocator.cpp
|
||||
${SAMPLEBASE_DIR}/SampleAllocator.h
|
||||
${SAMPLEBASE_DIR}/SampleAllocatorSDKClasses.h
|
||||
${SAMPLEBASE_DIR}/SampleArray.h
|
||||
${SAMPLEBASE_DIR}/SampleBaseInputEventIds.h
|
||||
${SAMPLEBASE_DIR}/SampleCamera.cpp
|
||||
${SAMPLEBASE_DIR}/SampleCamera.h
|
||||
${SAMPLEBASE_DIR}/SampleCameraController.cpp
|
||||
${SAMPLEBASE_DIR}/SampleCameraController.h
|
||||
${SAMPLEBASE_DIR}/SampleCharacterHelpers.cpp
|
||||
${SAMPLEBASE_DIR}/SampleCharacterHelpers.h
|
||||
${SAMPLEBASE_DIR}/SampleConsole.cpp
|
||||
${SAMPLEBASE_DIR}/SampleConsole.h
|
||||
${SAMPLEBASE_DIR}/SampleInputMappingAsset.cpp
|
||||
${SAMPLEBASE_DIR}/SampleInputMappingAsset.h
|
||||
${SAMPLEBASE_DIR}/SampleMain.cpp
|
||||
${SAMPLEBASE_DIR}/SampleMouseFilter.cpp
|
||||
${SAMPLEBASE_DIR}/SampleMouseFilter.h
|
||||
${SAMPLEBASE_DIR}/SamplePreprocessor.h
|
||||
${SAMPLEBASE_DIR}/SampleRandomPrecomputed.cpp
|
||||
${SAMPLEBASE_DIR}/SampleRandomPrecomputed.h
|
||||
${SAMPLEBASE_DIR}/SampleStepper.cpp
|
||||
${SAMPLEBASE_DIR}/SampleStepper.h
|
||||
${SAMPLEBASE_DIR}/SampleUserInputDefines.h
|
||||
${SAMPLEBASE_DIR}/SampleUtils.h
|
||||
${SAMPLEBASE_DIR}/Test.h
|
||||
${SAMPLEBASE_DIR}/TestGeometryHelpers.cpp
|
||||
${SAMPLEBASE_DIR}/TestGeometryHelpers.h
|
||||
${SAMPLEBASE_DIR}/TestGroup.cpp
|
||||
${SAMPLEBASE_DIR}/TestGroup.h
|
||||
${SAMPLEBASE_DIR}/TestMotionGenerator.cpp
|
||||
${SAMPLEBASE_DIR}/TestMotionGenerator.h
|
||||
${SAMPLEBASE_DIR}/wavefront.cpp
|
||||
${SAMPLEBASE_DIR}/wavefront.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(SampleBase STATIC
|
||||
${SAMPLEBASE_FILES}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(SampleBase
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/src
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/framework/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/platform/include
|
||||
|
||||
PRIVATE ${UTILS_SRC_DIR}
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/src
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/contact
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/common
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/convex
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/distance
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/gjk
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/intersection
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/mesh
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/Ice
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/hf
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/pcm
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(SampleBase
|
||||
PRIVATE ${SAMPLEBASE_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(SampleBase PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SampleBase_static_${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SampleBase_static_${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SampleBase_static_${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SampleBase_static_${CMAKE_RELEASE_POSTFIX}"
|
||||
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG "SampleBase_static"
|
||||
ARCHIVE_OUTPUT_NAME_CHECKED "SampleBase_static"
|
||||
ARCHIVE_OUTPUT_NAME_PROFILE "SampleBase_static"
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE "SampleBase_static"
|
||||
)
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(SampleBase PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SampleBase${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SampleBase${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SampleBase${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SampleBase${CMAKE_RELEASE_POSTFIX}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(SampleBase
|
||||
PUBLIC SampleToolkit
|
||||
PUBLIC ${SAMPLEBASE_PLATFORM_LINKED_LIBS}
|
||||
)
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEBASE_FILES})
|
||||
ENDIF()
|
||||
134
physx/samples/compiler/cmake/SampleFramework.cmake
Normal file
134
physx/samples/compiler/cmake/SampleFramework.cmake
Normal file
@ -0,0 +1,134 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleFramework common
|
||||
#
|
||||
|
||||
FIND_PACKAGE(Targa $ENV{PM_targa_VERSION} CONFIG REQUIRED)
|
||||
|
||||
SET(SAMPLEFRAMEWORK_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework)
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
include(${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SampleFramework.cmake)
|
||||
|
||||
SET(SAMPLEFRAMEWORK_FILES
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/nv_dds.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/nv_dds.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/ODBlock.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleApplication.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleAsset.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleAssetManager.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleCommandLine.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleDirManager.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleInputAsset.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleLineDebugRender.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleMaterialAsset.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SamplePointDebugRender.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleTextureAsset.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleTree.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/src/SampleTriangleDebugRender.cpp
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/FrameworkFoundation.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/ODBlock.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleActor.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleApplication.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleArray.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleAsset.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleAssetManager.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleCommandLine.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleDirManager.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleFilesystem.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleFrameworkInputEventIds.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleInputAsset.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleLineDebugRender.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleMaterialAsset.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SamplePointDebugRender.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleTextureAsset.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleTree.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleTriangleDebugRender.h
|
||||
${SAMPLEFRAMEWORK_DIR}/framework/include/SampleXml.h
|
||||
|
||||
${TARGA_SRC_DIR}/targa.cpp
|
||||
)
|
||||
|
||||
ADD_LIBRARY(SampleFramework STATIC
|
||||
${SAMPLEFRAMEWORK_PLATFORM_SOURCES}
|
||||
|
||||
${SAMPLEFRAMEWORK_FILES}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(SampleFramework
|
||||
PUBLIC ${SAMPLEFRAMEWORK_PLATFORM_INCLUDES}
|
||||
PUBLIC ${SAMPLEFRAMEWORK_DIR}/framework/include
|
||||
PUBLIC ${SAMPLEFRAMEWORK_DIR}/renderer/include
|
||||
PUBLIC ${SAMPLEFRAMEWORK_DIR}/platform/include
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/src
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/fastxml/include
|
||||
|
||||
PRIVATE ${TARGA_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(SampleFramework
|
||||
PRIVATE ${SAMPLEFRAMEWORK_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(SampleFramework PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SampleFramework_static_${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SampleFramework_static_${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SampleFramework_static_${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SampleFramework_static_${CMAKE_RELEASE_POSTFIX}"
|
||||
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG "SampleFramework_static"
|
||||
ARCHIVE_OUTPUT_NAME_CHECKED "SampleFramework_static"
|
||||
ARCHIVE_OUTPUT_NAME_PROFILE "SampleFramework_static"
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE "SampleFramework_static"
|
||||
)
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(SampleFramework PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SampleFramework${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SampleFramework${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SampleFramework${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SampleFramework${CMAKE_RELEASE_POSTFIX}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(SampleFramework
|
||||
PRIVATE ${SAMPLEFRAMEWORK_PRIVATE_PLATFORM_LINKED_LIBS}
|
||||
PUBLIC PhysXFoundation SampleToolkit
|
||||
PUBLIC ${SAMPLEFRAMEWORK_PLATFORM_LINKED_LIBS}
|
||||
)
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEFRAMEWORK_PLATFORM_SOURCES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEFRAMEWORK_FILES})
|
||||
ENDIF()
|
||||
98
physx/samples/compiler/cmake/SamplePlatform.cmake
Normal file
98
physx/samples/compiler/cmake/SamplePlatform.cmake
Normal file
@ -0,0 +1,98 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SamplePlatform common
|
||||
#
|
||||
|
||||
SET(SAMPLEPLATFORM_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/platform)
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
INCLUDE(${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SamplePlatform.cmake)
|
||||
|
||||
SET(SAMPLEPLATFORM_FILES
|
||||
${SAMPLEPLATFORM_DIR}/src/SamplePlatform.cpp
|
||||
${SAMPLEPLATFORM_DIR}/src/SampleUserInput.cpp
|
||||
${SAMPLEPLATFORM_DIR}/include/SampleUserInputIds.h
|
||||
${SAMPLEPLATFORM_DIR}/include/SampleUserInput.h
|
||||
${SAMPLEPLATFORM_DIR}/include/SamplePlatform.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(SamplePlatform STATIC
|
||||
${SAMPLEPLATFORM_PLATFORM_SOURCES}
|
||||
|
||||
${SAMPLEPLATFORM_FILES}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(SamplePlatform
|
||||
PRIVATE ${SAMPLEPLATFORM_PLATFORM_INCLUDES}
|
||||
|
||||
PRIVATE ${SAMPLEPLATFORM_DIR}/include
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/framework/include
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/src
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(SamplePlatform
|
||||
PRIVATE ${SAMPLEPLATFORM_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(SamplePlatform PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SamplePlatform_static_${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SamplePlatform_static_${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SamplePlatform_static_${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SamplePlatform_static_${CMAKE_RELEASE_POSTFIX}"
|
||||
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG "SamplePlatform_static"
|
||||
ARCHIVE_OUTPUT_NAME_CHECKED "SamplePlatform_static"
|
||||
ARCHIVE_OUTPUT_NAME_PROFILE "SamplePlatform_static"
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE "SamplePlatform_static"
|
||||
)
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(SamplePlatform PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SamplePlatform${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SamplePlatform${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SamplePlatform${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SamplePlatform${CMAKE_RELEASE_POSTFIX}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(SamplePlatform
|
||||
PUBLIC SampleToolkit
|
||||
PUBLIC ${SAMPLEPLATFORM_PLATFORM_LINKED_LIBS}
|
||||
)
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEPLATFORM_PLATFORM_SOURCES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEPLATFORM_FILES})
|
||||
ENDIF()
|
||||
175
physx/samples/compiler/cmake/SampleRenderer.cmake
Normal file
175
physx/samples/compiler/cmake/SampleRenderer.cmake
Normal file
@ -0,0 +1,175 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleRenderer common
|
||||
#
|
||||
|
||||
SET(SAMPLERENDERER_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer)
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
include(${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SampleRenderer.cmake)
|
||||
|
||||
SET(SAMPLERENDERER_FILES
|
||||
${SAMPLERENDERER_DIR}/src/Renderer.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererBoxShape.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererCapsuleShape.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererColor.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererDirectionalLight.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererDirectionalLightDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererGridShape.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererIndexBuffer.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererIndexBufferDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererInstanceBuffer.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererInstanceBufferDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererLight.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererLightDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererMaterial.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererMaterialDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererMaterialInstance.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererMesh.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererMeshContext.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererMeshDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererMeshShape.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererProjection.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererShape.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererSpotLight.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererSpotLightDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererTarget.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererTargetDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererTerrainShape.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererTexture.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererTexture2D.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererTexture2DDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererTextureDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererVertexBuffer.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererVertexBufferDesc.cpp
|
||||
${SAMPLERENDERER_DIR}/src/RendererWindow.cpp
|
||||
)
|
||||
|
||||
SET(SAMPLERENDERER_HEADERS
|
||||
${SAMPLERENDERER_DIR}/include/GLIncludes.h
|
||||
${SAMPLERENDERER_DIR}/include/Renderer.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererBoxShape.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererCapsuleShape.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererColor.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererConfig.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererDirectionalLight.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererDirectionalLightDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererFoundation.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererGridShape.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererIndexBuffer.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererIndexBufferDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererInstanceBuffer.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererInstanceBufferDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererInteropableBuffer.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererLight.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererLightDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMaterial.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMaterialDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMaterialInstance.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMemoryMacros.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMesh.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMeshContext.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMeshDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererMeshShape.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererProjection.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererShape.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererSpotLight.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererSpotLightDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererTarget.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererTargetDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererTerrainShape.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererTexture.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererTexture2D.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererTexture2DDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererTextureDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererUtils.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererVertexBuffer.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererVertexBufferDesc.h
|
||||
${SAMPLERENDERER_DIR}/include/RendererWindow.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(SampleRenderer STATIC
|
||||
${SAMPLERENDERER_PLATFORM_SOURCES}
|
||||
|
||||
${SAMPLERENDERER_FILES}
|
||||
${SAMPLERENDERER_HEADERS}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(SampleRenderer
|
||||
PRIVATE ${SAMPLERENDERER_PLATFORM_INCLUDES}
|
||||
|
||||
PRIVATE ${SAMPLERENDERER_DIR}/include
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/platform/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/framework/include
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/src
|
||||
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(SampleRenderer
|
||||
PRIVATE ${SAMPLERENDERER_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(SampleRenderer PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SampleRenderer_static_${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SampleRenderer_static_${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SampleRenderer_static_${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SampleRenderer_static_${CMAKE_RELEASE_POSTFIX}"
|
||||
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG "SampleRenderer_static"
|
||||
ARCHIVE_OUTPUT_NAME_CHECKED "SampleRenderer_static"
|
||||
ARCHIVE_OUTPUT_NAME_PROFILE "SampleRenderer_static"
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE "SampleRenderer_static"
|
||||
)
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(SampleRenderer PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SampleRenderer${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SampleRenderer${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SampleRenderer${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SampleRenderer${CMAKE_RELEASE_POSTFIX}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(SampleRenderer
|
||||
PUBLIC SampleToolkit
|
||||
PUBLIC ${SAMPLERENDERER_PLATFORM_LINKED_LIBS}
|
||||
)
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLERENDERER_PLATFORM_SOURCES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLERENDERER_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLERENDERER_HEADERS})
|
||||
ENDIF()
|
||||
228
physx/samples/compiler/cmake/Samples.cmake
Normal file
228
physx/samples/compiler/cmake/Samples.cmake
Normal file
@ -0,0 +1,228 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build Samples common
|
||||
#
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
include(${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/Samples.cmake)
|
||||
|
||||
SET(SAMPLEBRIDGES_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplebridges)
|
||||
SET(SAMPLEBRIDGES_SOURCE_FILES
|
||||
${SAMPLEBRIDGES_SOURCE_DIR}/SampleBridges.cpp
|
||||
${SAMPLEBRIDGES_SOURCE_DIR}/SampleBridges.h
|
||||
${SAMPLEBRIDGES_SOURCE_DIR}/SampleBridgesCCT.cpp
|
||||
${SAMPLEBRIDGES_SOURCE_DIR}/SampleBridgesInputEventIds.h
|
||||
${SAMPLEBRIDGES_SOURCE_DIR}/SampleBridgesSettings.h
|
||||
)
|
||||
SOURCE_GROUP("Sample bridges" FILES ${SAMPLEBRIDGES_SOURCE_FILES})
|
||||
|
||||
SET(SAMPLEHELLOWORLD_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplehelloworld)
|
||||
SET(SAMPLEHELLOWORLD_SOURCE_FILES
|
||||
${SAMPLEHELLOWORLD_SOURCE_DIR}/SampleHelloWorld.h
|
||||
${SAMPLEHELLOWORLD_SOURCE_DIR}/SampleHelloWorld.cpp
|
||||
)
|
||||
SOURCE_GROUP("Sample helloworld" FILES ${SAMPLEHELLOWORLD_SOURCE_FILES})
|
||||
|
||||
SET(SAMPLELARGEWORLD_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplelargeworld)
|
||||
SET(SAMPLELARGEWORLD_SOURCE_FILES
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/ChunkLoader.cpp
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/ChunkLoader.h
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/MeshBuilder.cpp
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/MeshBuilder.h
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/SampleLargeWorld.cpp
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/SampleLargeWorld.h
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/SampleLargeWorldCCT.cpp
|
||||
${SAMPLELARGEWORLD_SOURCE_DIR}/SampleLargeWorldInputEventIds.h
|
||||
)
|
||||
SOURCE_GROUP("Sample large world" FILES ${SAMPLELARGEWORLD_SOURCE_FILES})
|
||||
|
||||
SET(SAMPLENORTHPOLE_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplenorthpole)
|
||||
SET(SAMPLENORTHPOLE_SOURCE_FILES
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPole.cpp
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPole.h
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPoleBuilder.cpp
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPoleCameraController.cpp
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPoleCameraController.h
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPoleCCT.cpp
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPoleDynamics.cpp
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPoleFilterShader.cpp
|
||||
${SAMPLENORTHPOLE_SOURCE_DIR}/SampleNorthPoleInputEventIds.h
|
||||
)
|
||||
SOURCE_GROUP("Sample north pole" FILES ${SAMPLENORTHPOLE_SOURCE_FILES})
|
||||
|
||||
SET(SAMPLESUBMARINE_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplesubmarine)
|
||||
SET(SAMPLESUBMARINE_SOURCE_FILES
|
||||
${SAMPLESUBMARINE_SOURCE_DIR}/Crab.cpp
|
||||
${SAMPLESUBMARINE_SOURCE_DIR}/Crab.h
|
||||
${SAMPLESUBMARINE_SOURCE_DIR}/SampleSubmarine.cpp
|
||||
${SAMPLESUBMARINE_SOURCE_DIR}/SampleSubmarine.h
|
||||
${SAMPLESUBMARINE_SOURCE_DIR}/SampleSubmarineInputEventIds.h
|
||||
${SAMPLESUBMARINE_SOURCE_DIR}/SubmarineCameraController.h
|
||||
)
|
||||
SOURCE_GROUP("Sample submarine" FILES ${SAMPLESUBMARINE_SOURCE_FILES})
|
||||
|
||||
SET(SAMPLEVEHICLE_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplevehicle)
|
||||
SET(SAMPLEVEHICLE_SOURCE_FILES
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicleDebugRender.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicleInputEventIds.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicleTerrain.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_CameraController.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_CameraController.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_ControlInputs.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_ControlInputs.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_GameLogic.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_GameLogic.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_SceneQuery.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_SceneQuery.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_VehicleController.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_VehicleController.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_VehicleCooking.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_VehicleCooking.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_VehicleManager.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_VehicleManager.h
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_WheelQueryResults.cpp
|
||||
${SAMPLEVEHICLE_SOURCE_DIR}/SampleVehicle_WheelQueryResults.h
|
||||
)
|
||||
SOURCE_GROUP("Sample vehicle" FILES ${SAMPLEVEHICLE_SOURCE_FILES})
|
||||
|
||||
SET(SAMPLECUSTOMGRAVITY_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplecustomgravity)
|
||||
SET(SAMPLECUSTOMGRAVITY_SOURCE_FILES
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/Planet.cpp
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/Planet.h
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravity.cpp
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravity.h
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravity_CCT.cpp
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravityBuilder.cpp
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravityCameraController.cpp
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravityCameraController.h
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravityFilterShader.cpp
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_DIR}/SampleCustomGravityInputEventIds.h
|
||||
)
|
||||
SOURCE_GROUP("Sample custom gravity" FILES ${SAMPLECUSTOMGRAVITY_SOURCE_FILES})
|
||||
|
||||
SET(SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR ${PHYSX_ROOT_DIR}/samples/samplecctsharedcode)
|
||||
SET(SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_FILES
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/KinematicPlatform.cpp
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/KinematicPlatform.h
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/SampleCCTActor.cpp
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/SampleCCTActor.h
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/SampleCCTCameraController.cpp
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/SampleCCTCameraController.h
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/SampleCCTJump.cpp
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_DIR}/SampleCCTJump.h
|
||||
)
|
||||
SOURCE_GROUP("Sample CCT shared" FILES ${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_FILES})
|
||||
|
||||
ADD_EXECUTABLE(Samples
|
||||
${SAMPLEBRIDGES_SOURCE_FILES}
|
||||
${SAMPLECUSTOMGRAVITY_SOURCE_FILES}
|
||||
${SAMPLEHELLOWORLD_SOURCE_FILES}
|
||||
${SAMPLELARGEWORLD_SOURCE_FILES}
|
||||
${SAMPLENORTHPOLE_SOURCE_FILES}
|
||||
${SAMPLESUBMARINE_SOURCE_FILES}
|
||||
${SAMPLEVEHICLE_SOURCE_FILES}
|
||||
${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_FILES}
|
||||
)
|
||||
|
||||
SOURCE_GROUP(SampleBridges FILES ${SAMPLEBRIDGES_SOURCE_FILES})
|
||||
SOURCE_GROUP(SampleCustomGravity FILES ${SAMPLECUSTOMGRAVITY_SOURCE_FILES})
|
||||
SOURCE_GROUP(SampleHelloWorld FILES ${SAMPLEHELLOWORLD_SOURCE_FILES})
|
||||
SOURCE_GROUP(SampleLargeWorld FILES ${SAMPLELARGEWORLD_SOURCE_FILES})
|
||||
SOURCE_GROUP(SampleNorthPole FILES ${SAMPLENORTHPOLE_SOURCE_FILES})
|
||||
SOURCE_GROUP(SampleSubmarine FILES ${SAMPLESUBMARINE_SOURCE_FILES})
|
||||
SOURCE_GROUP(SampleVehicle FILES ${SAMPLEVEHICLE_SOURCE_FILES})
|
||||
SOURCE_GROUP(CCTShared FILES ${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_FILES})
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(Samples
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include/
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/samplecctsharedcode
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/samplebase
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/framework/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/samples/sampleframework/platform/include
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/src
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/contact
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/common
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/convex
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/distance
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/gjk
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/intersection
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/mesh
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/hf
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/geomutils/src/pcm
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/PhysXVehicle/src
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(Samples
|
||||
PRIVATE ${SAMPLES_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(Samples PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX_EXE_OUTPUT_DIRECTORY_DEBUG}
|
||||
RUNTIME_OUTPUT_DIRECTORY_PROFILE ${PX_EXE_OUTPUT_DIRECTORY_PROFILE}
|
||||
RUNTIME_OUTPUT_DIRECTORY_CHECKED ${PX_EXE_OUTPUT_DIRECTORY_CHECKED}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX_EXE_OUTPUT_DIRECTORY_RELEASE}
|
||||
|
||||
OUTPUT_NAME Samples${EXE_SUFFIX}
|
||||
)
|
||||
ELSE()
|
||||
IF(APPEND_CONFIG_NAME)
|
||||
SET_TARGET_PROPERTIES(Samples PROPERTIES
|
||||
DEBUG_OUTPUT_NAME SamplesDEBUG
|
||||
PROFILE_OUTPUT_NAME SamplesPROFILE
|
||||
CHECKED_OUTPUT_NAME SamplesCHECKED
|
||||
RELEASE_OUTPUT_NAME Samples
|
||||
)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES(Samples
|
||||
PUBLIC SampleBase SamplePlatform SampleFramework SampleRenderer SampleToolkit PhysX PhysXPvdSDK PhysXVehicle PhysXCharacterKinematic PhysXExtensions PhysXCooking PhysXCommon PhysXFoundation SampleToolkit
|
||||
PUBLIC ${SAMPLES_PLATFORM_LINKED_LIBS}
|
||||
)
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEBRIDGES_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLECUSTOMGRAVITY_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEHELLOWORLD_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLELARGEWORLD_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLENORTHPOLE_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLESUBMARINE_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLEVEHICLE_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLECHARACTERCONTROLLER_SHARED_SOURCE_FILES})
|
||||
ENDIF()
|
||||
107
physx/samples/compiler/cmake/SamplesToolkit.cmake
Normal file
107
physx/samples/compiler/cmake/SamplesToolkit.cmake
Normal file
@ -0,0 +1,107 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build PxToolkit common
|
||||
#
|
||||
|
||||
SET(PXTOOLKIT_ROOT_DIR ${PHYSX_ROOT_DIR}/samples/pxtoolkit)
|
||||
SET(PXTOOLKIT_SRC_DIR ${PXTOOLKIT_ROOT_DIR}/src)
|
||||
SET(PXTOOLKIT_INCLUDE_DIR ${PXTOOLKIT_ROOT_DIR}/include)
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
include(${PHYSX_ROOT_DIR}/samples/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SamplesToolkit.cmake)
|
||||
|
||||
SET(SAMPLETOOLKIT_FILES
|
||||
${PXTOOLKIT_SRC_DIR}/PxTkBmpLoader.cpp
|
||||
${PXTOOLKIT_SRC_DIR}/PxTkFPS.cpp
|
||||
${PXTOOLKIT_SRC_DIR}/PxTkMatrixUtils.cpp
|
||||
${PXTOOLKIT_SRC_DIR}/PxTkRandom.cpp
|
||||
${PXTOOLKIT_SRC_DIR}/PxTkStream.cpp
|
||||
)
|
||||
|
||||
SET(SAMPLETOOLKIT_HEADERS
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxTkBmpLoader.h
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxTkFile.h
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxTkFPS.h
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxTkMatrixUtils.h
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxTkNamespaceMangle.h
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxTkRandom.h
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxTkStream.h
|
||||
${PXTOOLKIT_INCLUDE_DIR}/PxToolkit.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(SampleToolkit STATIC
|
||||
${SAMPLETOOLKIT_PLATFORM_SOURCE_FILES}
|
||||
|
||||
${SAMPLETOOLKIT_FILES}
|
||||
${SAMPLETOOLKIT_HEADERS}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(SampleToolkit
|
||||
PRIVATE ${SAMPLETOOLKIT_PLATFORM_INCLUDES}
|
||||
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include/
|
||||
|
||||
PUBLIC ${PXTOOLKIT_INCLUDE_DIR}
|
||||
INTERFACE $<INSTALL_INTERFACE:include>$<BUILD_INTERFACE:${PXTOOLKIT_INCLUDE_DIR}>
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(SampleToolkit
|
||||
PRIVATE ${SAMPLETOOLKIT_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(SampleToolkit PhysXFoundation PhysXExtensions)
|
||||
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(SampleToolkit PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SamplesToolkit_static_${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SamplesToolkit_static_${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SamplesToolkit_static_${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SamplesToolkit_static_${CMAKE_RELEASE_POSTFIX}"
|
||||
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG "SamplesToolkit_static"
|
||||
ARCHIVE_OUTPUT_NAME_CHECKED "SamplesToolkit_static"
|
||||
ARCHIVE_OUTPUT_NAME_PROFILE "SamplesToolkit_static"
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE "SamplesToolkit_static"
|
||||
)
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(SampleToolkit PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SamplesToolkit${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SamplesToolkit${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SamplesToolkit${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SamplesToolkit${CMAKE_RELEASE_POSTFIX}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLETOOLKIT_PLATFORM_SOURCE_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLETOOLKIT_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SAMPLETOOLKIT_HEADERS})
|
||||
ENDIF()
|
||||
68
physx/samples/compiler/cmake/linux/CMakeLists.txt
Normal file
68
physx/samples/compiler/cmake/linux/CMakeLists.txt
Normal file
@ -0,0 +1,68 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
IF(NOT DEFINED PHYSX_LINUX_COMPILE_DEFS)
|
||||
MESSAGE(FATAL ERROR "Samples uses the PhysX compile defs, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
IF (NOT DEFINED PHYSX_CXX_FLAGS)
|
||||
MESSAGE(FATAL ERROR "Samples uses the PhysX CXX flags, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
SET(SAMPLES_ADDITIONAL_WARNINGS "-Wno-missing-field-initializers -Wno-macro-redefined -Wno-unused-parameter -Wno-header-hygiene -Wno-double-promotion -Wno-format-pedantic -Wno-switch-enum -Wno-unused-variable -Wno-sign-compare -Wno-shadow -Wno-sometimes-uninitialized -Wno-conditional-uninitialized -Wno-vla -Wno-vla-extension -Wno-reorder -Wno-duplicate-enum -Wno-unknown-pragmas -Wno-shadow-field -Wno-comma -Wno-cast-qual -Wno-null-pointer-arithmetic")
|
||||
|
||||
# Get the CXX Flags from the Cached variables set by the PhysX CMakeLists
|
||||
SET(CMAKE_CXX_FLAGS "${PHYSX_CXX_FLAGS} ${SAMPLES_ADDITIONAL_WARNINGS}")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG ${PHYSX_CXX_FLAGS_DEBUG})
|
||||
SET(CMAKE_CXX_FLAGS_CHECKED ${PHYSX_CXX_FLAGS_CHECKED})
|
||||
SET(CMAKE_CXX_FLAGS_PROFILE ${PHYSX_CXX_FLAGS_PROFILE})
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE ${PHYSX_CXX_FLAGS_RELEASE})
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath='$ORIGIN'")
|
||||
|
||||
#Include projects
|
||||
INCLUDE(SampleBase.cmake)
|
||||
INCLUDE(SampleFramework.cmake)
|
||||
INCLUDE(SampleRenderer.cmake)
|
||||
INCLUDE(SamplePlatform.cmake)
|
||||
INCLUDE(SamplesToolkit.cmake)
|
||||
SET_PROPERTY(TARGET SampleToolkit PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SampleBase PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SampleFramework PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SamplePlatform PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SampleRenderer PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
|
||||
IF(PX_BUILDSAMPLES)
|
||||
INCLUDE(Samples.cmake)
|
||||
SET_PROPERTY(TARGET Samples PROPERTY FOLDER "PhysX Samples")
|
||||
ENDIF()
|
||||
|
||||
IF(PX_BUILDPUBLICSAMPLES)
|
||||
INCLUDE(Samples.cmake)
|
||||
SET_PROPERTY(TARGET Samples PROPERTY FOLDER "PhysX Samples")
|
||||
ENDIF()
|
||||
43
physx/samples/compiler/cmake/linux/SampleBase.cmake
Normal file
43
physx/samples/compiler/cmake/linux/SampleBase.cmake
Normal file
@ -0,0 +1,43 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleBase
|
||||
#
|
||||
|
||||
SET(SAMPLEBASE_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_LINUX_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_LINUX_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SAMPLEBASE_PLATFORM_LINKED_LIBS Cg)
|
||||
60
physx/samples/compiler/cmake/linux/SampleFramework.cmake
Normal file
60
physx/samples/compiler/cmake/linux/SampleFramework.cmake
Normal file
@ -0,0 +1,60 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleFramework
|
||||
#
|
||||
|
||||
find_package(OpenGL $ENV{PM_OpenGL_VERSION} CONFIG REQUIRED) # Pull in OpenGL and GLUT
|
||||
find_package(Cg $ENV{PM_cg_VERSION} CONFIG REQUIRED)
|
||||
|
||||
|
||||
SET(SAMPLEFRAMEWORK_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SAMPLEFRAMEWORK_PLATFORM_OBJECT_FILES
|
||||
$<TARGET_OBJECTS:FastXml>
|
||||
)
|
||||
|
||||
SET(SAMPLEFRAMEWORK_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_LINUX_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_LINUX_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
|
||||
SET(SAMPLEFRAMEWORK_PLATFORM_SOURCES
|
||||
${SAMPLEFRAMEWORK_PLATFORM_OBJECT_FILES}
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/framework/src/linux/LinuxSampleAssetManager.cpp
|
||||
)
|
||||
|
||||
SET(SAMPLEFRAMEWORK_PLATFORM_LINKED_LIBS Cg GL GLUT)
|
||||
53
physx/samples/compiler/cmake/linux/SamplePlatform.cmake
Normal file
53
physx/samples/compiler/cmake/linux/SamplePlatform.cmake
Normal file
@ -0,0 +1,53 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SamplePlatform
|
||||
#
|
||||
|
||||
FIND_PACKAGE(glew $ENV{PM_glew_VERSION} REQUIRED CONFIG)
|
||||
|
||||
|
||||
SET(SAMPLEPLATFORM_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_LINUX_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_LINUX_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
|
||||
SET(SAMPLEPLATFORM_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/platform/src/linux/LinuxSamplePlatform.cpp
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/platform/src/linux/LinuxSampleUserInput.cpp
|
||||
)
|
||||
|
||||
|
||||
SET(SAMPLEPLATFORM_PLATFORM_LINKED_LIBS glew Cg)
|
||||
95
physx/samples/compiler/cmake/linux/SampleRenderer.cmake
Normal file
95
physx/samples/compiler/cmake/linux/SampleRenderer.cmake
Normal file
@ -0,0 +1,95 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleRenderer
|
||||
#
|
||||
|
||||
find_package(OpenGL $ENV{PM_OpenGL_VERSION} CONFIG REQUIRED) # Pull in OpenGL and GLUT
|
||||
|
||||
SET(SAMPLERENDERER_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_LINUX_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_LINUX_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SAMPLE_NULLRENDERER_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/src/null)
|
||||
SET(SAMPLERENDERER_NULLRENDERER_SOURCES
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRenderer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRenderer.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererDirectionalLight.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererDirectionalLight.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererIndexBuffer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererIndexBuffer.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererInstanceBuffer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererInstanceBuffer.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMaterial.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMaterial.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMesh.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMesh.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererSpotLight.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererSpotLight.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererTexture2D.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererTexture2D.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererVertexBuffer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererVertexBuffer.h
|
||||
)
|
||||
|
||||
|
||||
SET(SAMPLE_OGLRENDERER_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/src/ogl)
|
||||
SET(SAMPLERENDERER_OGLRENDERER_SOURCES
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRenderer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRenderer.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererDirectionalLight.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererDirectionalLight.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererIndexBuffer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererIndexBuffer.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererInstanceBuffer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererInstanceBuffer.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMaterial.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMaterial.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMesh.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMesh.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererSpotLight.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererSpotLight.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererTexture2D.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererTexture2D.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererVertexBuffer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererVertexBuffer.h
|
||||
)
|
||||
|
||||
SET(SAMPLERENDERER_PLATFORM_SOURCES
|
||||
${SAMPLERENDERER_NULLRENDERER_SOURCES}
|
||||
${SAMPLERENDERER_OGLRENDERER_SOURCES}
|
||||
)
|
||||
|
||||
SET(SAMPLERENDERER_PLATFORM_LINKED_LIBS SamplePlatform glew Cg CgGL GL X11 Xxf86vm)
|
||||
49
physx/samples/compiler/cmake/linux/Samples.cmake
Normal file
49
physx/samples/compiler/cmake/linux/Samples.cmake
Normal file
@ -0,0 +1,49 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build Samples
|
||||
#
|
||||
|
||||
FIND_PACKAGE(glew $ENV{PM_glew_VERSION} REQUIRED CONFIG)
|
||||
|
||||
find_package(OpenGL $ENV{PM_OpenGL_VERSION} CONFIG REQUIRED) # Pull in OpenGL and GLUT
|
||||
|
||||
|
||||
SET(SAMPLES_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_LINUX_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_LINUX_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
|
||||
SET(SAMPLES_PLATFORM_LINKED_LIBS GLU X11 Xxf86vm Cg CgGL GL rt pthread dl glew -Wl,-rpath='${ORIGIN}')
|
||||
48
physx/samples/compiler/cmake/linux/SamplesToolkit.cmake
Normal file
48
physx/samples/compiler/cmake/linux/SamplesToolkit.cmake
Normal file
@ -0,0 +1,48 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build PxToolkit
|
||||
#
|
||||
|
||||
SET(SAMPLETOOLKIT_PLATFORM_SOURCE_FILES
|
||||
)
|
||||
|
||||
SET(SAMPLETOOLKIT_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SAMPLETOOLKIT_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_LINUX_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_LINUX_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
114
physx/samples/compiler/cmake/windows/CMakeLists.txt
Normal file
114
physx/samples/compiler/cmake/windows/CMakeLists.txt
Normal file
@ -0,0 +1,114 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
IF(NOT DEFINED PHYSX_WINDOWS_COMPILE_DEFS)
|
||||
MESSAGE(FATAL ERROR "Samples uses the PhysX compile defs, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
IF (NOT DEFINED PHYSX_CXX_FLAGS)
|
||||
MESSAGE(FATAL ERROR "Samples uses the PhysX CXX flags, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
IF (MSVC12)
|
||||
SET(ADDL_WARNINGS "/wd4512")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT CMAKE_CL_64)
|
||||
# disable CUDA stuff for MSVC15 and MSVC14 win32
|
||||
IF(NOT PX_GENERATE_GPU_PROJECTS)
|
||||
SET(PHYSX_CUDA_DEFS "DISABLE_CUDA_PHYSX")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
SET(SAMPLES_WINDOWS_COMPILE_DEFS ${PHYSX_CUDA_DEFS};${PHYSX_LIBTYPE_DEFS})
|
||||
|
||||
# Get the CXX Flags from the Cached variables set by the PhysX CMakeLists
|
||||
SET(CMAKE_CXX_FLAGS "${PHYSX_CXX_FLAGS} /wd4245 /wd4512 /wd4996 /wd4244 /wd4100 /wd4456 /wd4189 /wd4505 /wd4389 /EHsc ${ADDL_WARNINGS}")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${PHYSX_CXX_FLAGS_DEBUG}")
|
||||
SET(CMAKE_CXX_FLAGS_CHECKED ${PHYSX_CXX_FLAGS_CHECKED})
|
||||
SET(CMAKE_CXX_FLAGS_PROFILE ${PHYSX_CXX_FLAGS_PROFILE})
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE ${PHYSX_CXX_FLAGS_RELEASE})
|
||||
|
||||
# Build PDBs for all configurations
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS "/DEBUG")
|
||||
|
||||
# Don't redefine PHYSX_WINDOWS_COMPILE_DEFS
|
||||
|
||||
# Get the PhysXDevice path
|
||||
|
||||
SET(SLN_PHYSXDEVICE_PATH "$ENV{PM_PhysXDevice_PATH}/bin/x86/")
|
||||
|
||||
# Include ConfigureFileMT to expose that function
|
||||
INCLUDE(ConfigureFileMt)
|
||||
|
||||
|
||||
# Include all of the projects
|
||||
INCLUDE(SampleBase.cmake)
|
||||
INCLUDE(SampleFramework.cmake)
|
||||
INCLUDE(SampleRenderer.cmake)
|
||||
INCLUDE(SamplePlatform.cmake)
|
||||
INCLUDE(SamplesToolkit.cmake)
|
||||
|
||||
SET_PROPERTY(TARGET SampleToolkit PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SampleBase PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SampleFramework PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SamplePlatform PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
SET_PROPERTY(TARGET SampleRenderer PROPERTY FOLDER "PhysX Samples/Libraries only")
|
||||
|
||||
IF(PX_BUILDSAMPLES)
|
||||
INCLUDE(SampleHelloWorld.cmake)
|
||||
INCLUDE(SampleBridges.cmake)
|
||||
INCLUDE(SampleCharacterController.cmake)
|
||||
INCLUDE(SampleCustomGravity.cmake)
|
||||
INCLUDE(SampleDebugRendering.cmake)
|
||||
INCLUDE(SampleInstancing.cmake)
|
||||
INCLUDE(SampleLargeWorld.cmake)
|
||||
INCLUDE(SampleNorthPole.cmake)
|
||||
INCLUDE(SampleRaycastCCD.cmake)
|
||||
INCLUDE(SampleSubmarine.cmake)
|
||||
INCLUDE(SampleVehicle.cmake)
|
||||
INCLUDE(Samples.cmake)
|
||||
|
||||
SET_PROPERTY(TARGET SampleHelloWorld PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleBridges PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleCharacterController PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleCustomGravity PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleDebugRendering PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleInstancing PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleLargeWorld PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleNorthPole PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleRaycastCCD PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleSubmarine PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET SampleVehicle PROPERTY FOLDER "PhysX Samples")
|
||||
SET_PROPERTY(TARGET Samples PROPERTY FOLDER "PhysX Samples")
|
||||
ENDIF()
|
||||
|
||||
IF(PX_BUILDPUBLICSAMPLES)
|
||||
INCLUDE(Samples.cmake)
|
||||
SET_PROPERTY(TARGET Samples PROPERTY FOLDER "PhysX Samples")
|
||||
ENDIF()
|
||||
|
||||
41
physx/samples/compiler/cmake/windows/SampleBase.cmake
Normal file
41
physx/samples/compiler/cmake/windows/SampleBase.cmake
Normal file
@ -0,0 +1,41 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleBase
|
||||
#
|
||||
|
||||
SET(SAMPLEBASE_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};${SAMPLES_WINDOWS_COMPILE_DEFS};_HAS_EXCEPTIONS=0;
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_WINDOWS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_WINDOWS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_WINDOWS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_WINDOWS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
49
physx/samples/compiler/cmake/windows/SampleFramework.cmake
Normal file
49
physx/samples/compiler/cmake/windows/SampleFramework.cmake
Normal file
@ -0,0 +1,49 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleFramework
|
||||
#
|
||||
|
||||
SET(SAMPLEFRAMEWORK_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};${SAMPLES_WINDOWS_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_WINDOWS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_WINDOWS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_WINDOWS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_WINDOWS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SAMPLEFRAMEWORK_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/framework/src/windows/WindowsSampleAssetManager.cpp
|
||||
)
|
||||
|
||||
SET(SAMPLEFRAMEWORK_PRIVATE_PLATFORM_LINKED_LIBS
|
||||
|
||||
)
|
||||
67
physx/samples/compiler/cmake/windows/SamplePlatform.cmake
Normal file
67
physx/samples/compiler/cmake/windows/SamplePlatform.cmake
Normal file
@ -0,0 +1,67 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SamplePlatform
|
||||
#
|
||||
|
||||
IF(NOT DIRECTX_INCLUDE_DIRS)
|
||||
IF($ENV{PM_DirectXSDK_VERSION})
|
||||
find_package(DirectXSDK $ENV{PM_DirectXSDK_VERSION} CONFIG REQUIRED)
|
||||
ELSE()
|
||||
IF(EXISTS $ENV{DXSDK_DIR})
|
||||
SET(DIRECTX_INCLUDE_DIRS $ENV{DXSDK_DIR}/Include)
|
||||
ELSE()
|
||||
MESSAGE("For samples compilation please install DXSDK.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
SET(DIRECTX_INCLUDE_DIRS ${DIRECTX_INCLUDE_DIRS} CACHE INTERNAL "DirectX SDK include path")
|
||||
ENDIF()
|
||||
|
||||
SET(SAMPLEPLATFORM_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};${SAMPLES_WINDOWS_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_WINDOWS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_WINDOWS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_WINDOWS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_WINDOWS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SAMPLEPLATFORM_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/platform/src/windows/WindowsSamplePlatform.cpp
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/platform/src/windows/WindowsSampleUserInput.cpp
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/platform/include/windows/WindowsSampleUserInputIds.h
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/platform/include/windows/WindowsSampleUserInput.h
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/platform/include/windows/WindowsSamplePlatform.h
|
||||
|
||||
)
|
||||
|
||||
SET(SAMPLEPLATFORM_PLATFORM_INCLUDES
|
||||
${DIRECTX_INCLUDE_DIRS}
|
||||
)
|
||||
171
physx/samples/compiler/cmake/windows/SampleRenderer.cmake
Normal file
171
physx/samples/compiler/cmake/windows/SampleRenderer.cmake
Normal file
@ -0,0 +1,171 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build SampleRenderer
|
||||
#
|
||||
|
||||
IF(NOT DIRECTX_INCLUDE_DIRS)
|
||||
IF($ENV{PM_DirectXSDK_VERSION})
|
||||
find_package(DirectXSDK $ENV{PM_DirectXSDK_VERSION} CONFIG REQUIRED)
|
||||
ELSE()
|
||||
IF(EXISTS $ENV{DXSDK_DIR})
|
||||
SET(DIRECTX_INCLUDE_DIRS $ENV{DXSDK_DIR}/Include)
|
||||
ELSE()
|
||||
MESSAGE("For samples compilation please install DXSDK.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
SET(DIRECTX_INCLUDE_DIRS ${DIRECTX_INCLUDE_DIRS} CACHE INTERNAL "DirectX SDK include path")
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(SAMPLERENDERER_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};${SAMPLES_WINDOWS_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_WINDOWS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_WINDOWS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_WINDOWS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_WINDOWS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SAMPLE_NULLRENDERER_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/src/null)
|
||||
SET(SAMPLERENDERER_NULLRENDERER_SOURCES
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRenderer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRenderer.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererDirectionalLight.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererDirectionalLight.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererIndexBuffer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererIndexBuffer.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererInstanceBuffer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererInstanceBuffer.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMaterial.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMaterial.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMesh.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererMesh.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererSpotLight.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererSpotLight.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererTexture2D.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererTexture2D.h
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererVertexBuffer.cpp
|
||||
${SAMPLE_NULLRENDERER_DIR}/NULLRendererVertexBuffer.h
|
||||
)
|
||||
|
||||
SET(SAMPLE_D3D9RENDERER_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/src/d3d9)
|
||||
SET(SAMPLERENDERER_D3D9RENDERER_SOURCES
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9Renderer.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9Renderer.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererDirectionalLight.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererDirectionalLight.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererIndexBuffer.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererIndexBuffer.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererInstanceBuffer.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererInstanceBuffer.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererMaterial.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererMaterial.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererMesh.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererMesh.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererSpotLight.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererSpotLight.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererTarget.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererTarget.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererTexture2D.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererTexture2D.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererVertexBuffer.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9RendererVertexBuffer.h
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9WPFRenderer.cpp
|
||||
${SAMPLE_D3D9RENDERER_DIR}/D3D9WPFRenderer.h
|
||||
)
|
||||
|
||||
SET(SAMPLE_D3D11RENDERER_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/src/d3d11)
|
||||
SET(SAMPLERENDERER_D3D11RENDERER_SOURCES
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11Renderer.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11Renderer.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererDirectionalLight.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererDirectionalLight.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererIndexBuffer.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererIndexBuffer.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererInstanceBuffer.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererInstanceBuffer.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererMaterial.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererMaterial.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererMemoryMacros.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererMesh.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererMesh.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererResourceManager.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererSpotLight.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererSpotLight.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTarget.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTarget.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTexture2D.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTexture2D.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTexture3D.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTexture3D.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTextureCommon.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererTraits.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererUtils.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererUtils.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererVariableManager.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererVariableManager.h
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererVertexBuffer.cpp
|
||||
${SAMPLE_D3D11RENDERER_DIR}/D3D11RendererVertexBuffer.h
|
||||
)
|
||||
|
||||
SET(SAMPLE_OGLRENDERER_DIR ${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/src/ogl)
|
||||
SET(SAMPLERENDERER_OGLRENDERER_SOURCES
|
||||
${PHYSX_ROOT_DIR}/samples/sampleframework/renderer/include/windows/WindowsGLIncludes.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRenderer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRenderer.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererDirectionalLight.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererDirectionalLight.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererIndexBuffer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererIndexBuffer.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererInstanceBuffer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererInstanceBuffer.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMaterial.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMaterial.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMesh.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererMesh.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererSpotLight.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererSpotLight.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererTexture2D.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererTexture2D.h
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererVertexBuffer.cpp
|
||||
${SAMPLE_OGLRENDERER_DIR}/OGLRendererVertexBuffer.h
|
||||
)
|
||||
|
||||
SET(SAMPLERENDERER_PLATFORM_SOURCES
|
||||
${SAMPLERENDERER_NULLRENDERER_SOURCES}
|
||||
${SAMPLERENDERER_D3D9RENDERER_SOURCES}
|
||||
${SAMPLERENDERER_D3D11RENDERER_SOURCES}
|
||||
${SAMPLERENDERER_OGLRENDERER_SOURCES}
|
||||
)
|
||||
|
||||
SET(SAMPLERENDERER_PLATFORM_INCLUDES
|
||||
${DIRECTX_INCLUDE_DIRS}
|
||||
)
|
||||
43
physx/samples/compiler/cmake/windows/Samples.cmake
Normal file
43
physx/samples/compiler/cmake/windows/Samples.cmake
Normal file
@ -0,0 +1,43 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build Samples
|
||||
#
|
||||
|
||||
SET(SAMPLES_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};${SAMPLES_WINDOWS_COMPILE_DEFS};_HAS_EXCEPTIONS=0;
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_WINDOWS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_WINDOWS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_WINDOWS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_WINDOWS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SAMPLES_PLATFORM_LINKED_LIBS Winmm.lib)
|
||||
48
physx/samples/compiler/cmake/windows/SamplesToolkit.cmake
Normal file
48
physx/samples/compiler/cmake/windows/SamplesToolkit.cmake
Normal file
@ -0,0 +1,48 @@
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted provided that the following conditions
|
||||
## are met:
|
||||
## * Redistributions of source code must retain the above copyright
|
||||
## notice, this list of conditions and the following disclaimer.
|
||||
## * Redistributions in binary form must reproduce the above copyright
|
||||
## notice, this list of conditions and the following disclaimer in the
|
||||
## documentation and/or other materials provided with the distribution.
|
||||
## * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
## contributors may be used to endorse or promote products derived
|
||||
## from this software without specific prior written permission.
|
||||
##
|
||||
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
|
||||
## EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
## PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
##
|
||||
## Copyright (c) 2008-2021 NVIDIA Corporation. All rights reserved.
|
||||
|
||||
#
|
||||
# Build PxToolkit
|
||||
#
|
||||
|
||||
SET(SAMPLETOOLKIT_PLATFORM_SOURCE_FILES
|
||||
)
|
||||
|
||||
SET(SAMPLETOOLKIT_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SAMPLETOOLKIT_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};${SAMPLES_WINDOWS_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_WINDOWS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_WINDOWS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_WINDOWS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_WINDOWS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user