Init
This commit is contained in:
119
physx/snippets/compiler/cmake/CMakeLists.txt
Normal file
119
physx/snippets/compiler/cmake/CMakeLists.txt
Normal file
@ -0,0 +1,119 @@
|
||||
##
|
||||
## 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(Snippets 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_SHARED_LINKER_FLAGS_CHECKED "/DEBUG")
|
||||
SET(CMAKE_SHARED_LINKER_FLAGS_PROFILE "/DEBUG")
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_PROFILE "/DEBUG")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_CHECKED "/DEBUG")
|
||||
ENDIF()
|
||||
|
||||
|
||||
SET(PROJECT_CMAKE_FILES_DIR compiler/cmake)
|
||||
SET(PLATFORM_CMAKELISTS ${PHYSX_ROOT_DIR}/snippets/${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}/snippets/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/CMakeLists.txt)
|
||||
|
||||
SET(SOURCE_DISTRO_FILE_LIST "")
|
||||
|
||||
# Include all of the projects
|
||||
SET(SNIPPETS_LIST Articulation BVHStructure ContactModification ContactReport ContactReportCCD ConvexMeshCreate
|
||||
CustomJoint CustomProfiler DeformableMesh HelloWorld ImmediateArticulation ImmediateMode Joint MBP MultiThreading
|
||||
PrunerSerialization RaycastCCD Serialization SplitFetchResults
|
||||
SplitSim Stepper ToleranceScale TriangleMeshCreate Triggers)
|
||||
|
||||
LIST(APPEND SNIPPETS_LIST ${PLATFORM_SNIPPETS_LIST})
|
||||
|
||||
SET(SNIPPETS_VEHICLE_LIST NestedScene Vehicle4W VehicleContactMod VehicleMultiThreading
|
||||
VehicleNoDrive VehicleScale VehicleTank)
|
||||
|
||||
LIST(APPEND SNIPPETS_VEHICLE_LIST ${PLATFORM_SNIPPETS_VEHICLE_LIST})
|
||||
|
||||
IF(SNIPPET_RENDER_ENABLED)
|
||||
INCLUDE(SnippetRender.cmake)
|
||||
SET_PROPERTY(TARGET SnippetRender PROPERTY FOLDER "Snippets/Libraries only")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(SnippetUtils.cmake)
|
||||
SET_PROPERTY(TARGET SnippetUtils PROPERTY FOLDER "Snippets/Libraries only")
|
||||
|
||||
FOREACH(SNIPPET_NAME ${SNIPPETS_LIST})
|
||||
INCLUDE(SnippetTemplate.cmake)
|
||||
SET_PROPERTY(TARGET Snippet${SNIPPET_NAME} PROPERTY FOLDER "Snippets")
|
||||
ENDFOREACH()
|
||||
|
||||
FOREACH(SNIPPET_NAME ${SNIPPETS_VEHICLE_LIST})
|
||||
INCLUDE(SnippetVehicleTemplate.cmake)
|
||||
SET_PROPERTY(TARGET Snippet${SNIPPET_NAME} PROPERTY FOLDER "Snippets")
|
||||
ENDFOREACH()
|
||||
|
||||
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()
|
||||
87
physx/snippets/compiler/cmake/SnippetRender.cmake
Normal file
87
physx/snippets/compiler/cmake/SnippetRender.cmake
Normal file
@ -0,0 +1,87 @@
|
||||
##
|
||||
## 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 SnippetRender common
|
||||
#
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
include(${PHYSX_ROOT_DIR}/snippets/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SnippetRender.cmake)
|
||||
|
||||
SET(SNIPPETRENDER_FILES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetrender/SnippetCamera.cpp
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetrender/SnippetCamera.h
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetrender/SnippetRender.cpp
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetrender/SnippetRender.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(SnippetRender STATIC
|
||||
${SNIPPETRENDER_FILES}
|
||||
|
||||
${SNIPPETRENDER_PLATFORM_FILES}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(SnippetRender
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include
|
||||
PUBLIC ${SNIPPETRENDER_PLATFORM_INCLUDES}
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(SnippetRender
|
||||
PRIVATE ${SNIPPETRENDER_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(SnippetRender PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SnippetRender_static_${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SnippetRender_static_${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SnippetRender_static_${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SnippetRender_static_${CMAKE_RELEASE_POSTFIX}"
|
||||
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG "SnippetRender_static"
|
||||
ARCHIVE_OUTPUT_NAME_CHECKED "SnippetRender_static"
|
||||
ARCHIVE_OUTPUT_NAME_PROFILE "SnippetRender_static"
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE "SnippetRender_static"
|
||||
)
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(SnippetRender PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SnippetRender${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SnippetRender${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SnippetRender${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SnippetRender${CMAKE_RELEASE_POSTFIX}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(SnippetRender
|
||||
PUBLIC PhysXFoundation
|
||||
PUBLIC ${SNIPPETRENDER_PLATFORM_LINKED_LIBS})
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SNIPPETRENDER_FILES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SNIPPETRENDER_PLATFORM_FILES})
|
||||
ENDIF()
|
||||
91
physx/snippets/compiler/cmake/SnippetTemplate.cmake
Normal file
91
physx/snippets/compiler/cmake/SnippetTemplate.cmake
Normal file
@ -0,0 +1,91 @@
|
||||
##
|
||||
## 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 Snippet common template
|
||||
#
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
INCLUDE(${PHYSX_ROOT_DIR}/snippets/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SnippetTemplate.cmake)
|
||||
|
||||
STRING(TOLOWER ${SNIPPET_NAME} SNIPPET_NAME_LOWER)
|
||||
FILE(GLOB SnippetSources ${PHYSX_ROOT_DIR}/snippets/snippet${SNIPPET_NAME_LOWER}/*.cpp)
|
||||
FILE(GLOB SnippetHeaders ${PHYSX_ROOT_DIR}/snippets/snippet${SNIPPET_NAME_LOWER}/*.h)
|
||||
|
||||
ADD_EXECUTABLE(Snippet${SNIPPET_NAME} ${SNIPPET_BUNDLE}
|
||||
${SNIPPET_PLATFORM_SOURCES}
|
||||
|
||||
${SnippetSources}
|
||||
${SnippetHeaders}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(Snippet${SNIPPET_NAME}
|
||||
PRIVATE ${SNIPPET_PLATFORM_INCLUDES}
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include/
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/physxextensions/src
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(Snippet${SNIPPET_NAME}
|
||||
PRIVATE ${SNIPPET_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(Snippet${SNIPPET_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX_EXE_OUTPUT_DIRECTORY_DEBUG}${EXE_PLATFORM_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_PROFILE ${PX_EXE_OUTPUT_DIRECTORY_PROFILE}${EXE_PLATFORM_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_CHECKED ${PX_EXE_OUTPUT_DIRECTORY_CHECKED}${EXE_PLATFORM_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX_EXE_OUTPUT_DIRECTORY_RELEASE}${EXE_PLATFORM_DIR}
|
||||
|
||||
OUTPUT_NAME Snippet${SNIPPET_NAME}${EXE_SUFFIX}
|
||||
)
|
||||
ELSE()
|
||||
IF(APPEND_CONFIG_NAME)
|
||||
SET_TARGET_PROPERTIES(Snippet${SNIPPET_NAME} PROPERTIES
|
||||
DEBUG_OUTPUT_NAME Snippet${SNIPPET_NAME}DEBUG
|
||||
PROFILE_OUTPUT_NAME Snippet${SNIPPET_NAME}PROFILE
|
||||
CHECKED_OUTPUT_NAME Snippet${SNIPPET_NAME}CHECKED
|
||||
RELEASE_OUTPUT_NAME Snippet${SNIPPET_NAME}
|
||||
)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES(Snippet${SNIPPET_NAME}
|
||||
PUBLIC PhysXExtensions PhysX PhysXPvdSDK PhysXVehicle PhysXCharacterKinematic PhysXCooking PhysXCommon PhysXFoundation SnippetUtils
|
||||
PUBLIC ${SNIPPET_PLATFORM_LINKED_LIBS})
|
||||
|
||||
IF(CUSTOM_SNIPPET_TARGET_PROPERTIES)
|
||||
SET_TARGET_PROPERTIES(Snippet${SNIPPET_NAME} PROPERTIES
|
||||
${CUSTOM_SNIPPET_TARGET_PROPERTIES}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SNIPPET_PLATFORM_SOURCES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SnippetSources})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SnippetHeaders})
|
||||
ENDIF()
|
||||
84
physx/snippets/compiler/cmake/SnippetUtils.cmake
Normal file
84
physx/snippets/compiler/cmake/SnippetUtils.cmake
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.
|
||||
|
||||
#
|
||||
# Build SnippetUtils common
|
||||
#
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
INCLUDE(${PHYSX_ROOT_DIR}/snippets/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SnippetUtils.cmake)
|
||||
|
||||
SET(SNIPPETUTILS_FILES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetutils/SnippetUtils.cpp
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetutils/SnippetUtils.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(SnippetUtils STATIC
|
||||
${SNIPPETUTILS_FILES}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(SnippetUtils
|
||||
PRIVATE ${SNIPPETUTILS_PLATFORM_INCLUDES}
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/source/common/src
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(SnippetUtils
|
||||
PRIVATE ${SNIPPETUTILS_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(SnippetUtils PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SnippetUtils_static_${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SnippetUtils_static_${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SnippetUtils_static_${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SnippetUtils_static_${CMAKE_RELEASE_POSTFIX}"
|
||||
|
||||
ARCHIVE_OUTPUT_NAME_DEBUG "SnippetUtils_static"
|
||||
ARCHIVE_OUTPUT_NAME_CHECKED "SnippetUtils_static"
|
||||
ARCHIVE_OUTPUT_NAME_PROFILE "SnippetUtils_static"
|
||||
ARCHIVE_OUTPUT_NAME_RELEASE "SnippetUtils_static"
|
||||
)
|
||||
ELSE()
|
||||
SET_TARGET_PROPERTIES(SnippetUtils PROPERTIES
|
||||
COMPILE_PDB_NAME_DEBUG "SnippetUtils${CMAKE_DEBUG_POSTFIX}"
|
||||
COMPILE_PDB_NAME_CHECKED "SnippetUtils${CMAKE_CHECKED_POSTFIX}"
|
||||
COMPILE_PDB_NAME_PROFILE "SnippetUtils${CMAKE_PROFILE_POSTFIX}"
|
||||
COMPILE_PDB_NAME_RELEASE "SnippetUtils${CMAKE_RELEASE_POSTFIX}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
TARGET_LINK_LIBRARIES(SnippetUtils
|
||||
PUBLIC PhysXFoundation
|
||||
)
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SNIPPETUTILS_FILES})
|
||||
ENDIF()
|
||||
96
physx/snippets/compiler/cmake/SnippetVehicleTemplate.cmake
Normal file
96
physx/snippets/compiler/cmake/SnippetVehicleTemplate.cmake
Normal file
@ -0,0 +1,96 @@
|
||||
##
|
||||
## 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 Snippetvehicle common template
|
||||
#
|
||||
|
||||
# Include here after the directories are defined so that the platform specific file can use the variables.
|
||||
INCLUDE(${PHYSX_ROOT_DIR}/snippets/${PROJECT_CMAKE_FILES_DIR}/${TARGET_BUILD_PLATFORM}/SnippetVehicleTemplate.cmake)
|
||||
|
||||
STRING(TOLOWER ${SNIPPET_NAME} SNIPPET_NAME_LOWER)
|
||||
FILE(GLOB SnippetSources ${PHYSX_ROOT_DIR}/snippets/snippet${SNIPPET_NAME_LOWER}/*.cpp)
|
||||
FILE(GLOB VehicleSources ${PHYSX_ROOT_DIR}/snippets/snippetvehiclecommon/*.cpp)
|
||||
FILE(GLOB SnippetHeaders ${PHYSX_ROOT_DIR}/snippets/snippet${SNIPPET_NAME_LOWER}/*.h)
|
||||
FILE(GLOB VehicleHeaders ${PHYSX_ROOT_DIR}/snippets/snippetvehiclecommon/*.h)
|
||||
|
||||
ADD_EXECUTABLE(Snippet${SNIPPET_NAME} ${SNIPPET_BUNDLE}
|
||||
${SNIPPET_PLATFORM_SOURCES}
|
||||
|
||||
${SnippetSources}
|
||||
${VehicleSources}
|
||||
${SnippetHeaders}
|
||||
${VehicleHeaders}
|
||||
)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES(Snippet${SNIPPET_NAME}
|
||||
PRIVATE ${SNIPPET_PLATFORM_INCLUDES}
|
||||
|
||||
PRIVATE ${PHYSX_ROOT_DIR}/include/
|
||||
)
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS(Snippet${SNIPPET_NAME}
|
||||
PRIVATE ${SNIPPET_COMPILE_DEFS}
|
||||
)
|
||||
|
||||
IF(NV_USE_GAMEWORKS_OUTPUT_DIRS)
|
||||
SET_TARGET_PROPERTIES(Snippet${SNIPPET_NAME} PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX_EXE_OUTPUT_DIRECTORY_DEBUG}${EXE_PLATFORM_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_PROFILE ${PX_EXE_OUTPUT_DIRECTORY_PROFILE}${EXE_PLATFORM_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_CHECKED ${PX_EXE_OUTPUT_DIRECTORY_CHECKED}${EXE_PLATFORM_DIR}
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX_EXE_OUTPUT_DIRECTORY_RELEASE}${EXE_PLATFORM_DIR}
|
||||
|
||||
OUTPUT_NAME Snippet${SNIPPET_NAME}${EXE_SUFFIX}
|
||||
)
|
||||
ELSE()
|
||||
IF(APPEND_CONFIG_NAME)
|
||||
SET_TARGET_PROPERTIES(Snippet${SNIPPET_NAME} PROPERTIES
|
||||
DEBUG_OUTPUT_NAME Snippet${SNIPPET_NAME}DEBUG
|
||||
PROFILE_OUTPUT_NAME Snippet${SNIPPET_NAME}PROFILE
|
||||
CHECKED_OUTPUT_NAME Snippet${SNIPPET_NAME}CHECKED
|
||||
RELEASE_OUTPUT_NAME Snippet${SNIPPET_NAME}
|
||||
)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES(Snippet${SNIPPET_NAME}
|
||||
PUBLIC PhysXExtensions PhysX PhysXPvdSDK PhysXVehicle PhysXCharacterKinematic PhysXCooking PhysXCommon PhysXFoundation SnippetUtils
|
||||
PUBLIC ${SNIPPET_PLATFORM_LINKED_LIBS})
|
||||
|
||||
IF(CUSTOM_SNIPPET_TARGET_PROPERTIES)
|
||||
SET_TARGET_PROPERTIES(Snippet${SNIPPET_NAME} PROPERTIES
|
||||
${CUSTOM_SNIPPET_TARGET_PROPERTIES}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(PX_GENERATE_SOURCE_DISTRO)
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SNIPPET_PLATFORM_SOURCES})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SnippetSources})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${VehicleSources})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${SnippetHeaders})
|
||||
LIST(APPEND SOURCE_DISTRO_FILE_LIST ${VehicleHeaders})
|
||||
ENDIF()
|
||||
53
physx/snippets/compiler/cmake/android/CMakeLists.txt
Normal file
53
physx/snippets/compiler/cmake/android/CMakeLists.txt
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.
|
||||
|
||||
IF(NOT DEFINED PHYSX_ANDROID_COMPILE_DEFS)
|
||||
MESSAGE(FATAL ERROR "Snippets 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 "Snippets uses the PhysX CXX flags, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE)
|
||||
|
||||
# Get the CXX Flags from the Cached variables set by the PhysX CMakeLists
|
||||
SET(CMAKE_CXX_FLAGS "${PHYSX_CXX_FLAGS}")
|
||||
|
||||
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")
|
||||
|
||||
SET(PHYSX_LIB_PATH "${PHYSX_ROOT_DIR}/lib/${COMPILER_AND_PLATFORM}")
|
||||
|
||||
|
||||
|
||||
|
||||
54
physx/snippets/compiler/cmake/android/SnippetTemplate.cmake
Normal file
54
physx/snippets/compiler/cmake/android/SnippetTemplate.cmake
Normal file
@ -0,0 +1,54 @@
|
||||
##
|
||||
## 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 Snippet android template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_ANDROID_COMPILE_DEFS};ANDROID;GLES2;
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_ANDROID_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_ANDROID_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_ANDROID_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_ANDROID_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
|
||||
)
|
||||
|
||||
44
physx/snippets/compiler/cmake/android/SnippetUtils.cmake
Normal file
44
physx/snippets/compiler/cmake/android/SnippetUtils.cmake
Normal file
@ -0,0 +1,44 @@
|
||||
##
|
||||
## 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 SnippetUtils
|
||||
#
|
||||
|
||||
SET(SNIPPETUTILS_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SNIPPETUTILS_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
${PHYSX_ANDROID_COMPILE_DEFS};PX_PHYSX_STATIC_LIB;ANDROID;GLES2
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_ANDROID_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_ANDROID_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_ANDROID_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_ANDROID_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
##
|
||||
## 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 SnippetVehicle android template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_ANDROID_COMPILE_DEFS};ANDROID;GLES2;
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_ANDROID_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_ANDROID_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_ANDROID_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_ANDROID_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
|
||||
)
|
||||
|
||||
62
physx/snippets/compiler/cmake/ios/CMakeLists.txt
Normal file
62
physx/snippets/compiler/cmake/ios/CMakeLists.txt
Normal file
@ -0,0 +1,62 @@
|
||||
##
|
||||
## 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_IOS_COMPILE_DEFS)
|
||||
MESSAGE(FATAL ERROR "Snippets 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 "Snippets uses the PhysX CXX flags, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
# Get the CXX Flags from the Cached variables set by the PhysX CMakeLists
|
||||
SET(CMAKE_CXX_FLAGS "${PHYSX_CXX_FLAGS}")
|
||||
|
||||
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")
|
||||
|
||||
SET(PHYSX_LIB_PATH "${PHYSX_ROOT_DIR}/lib/${COMPILER_AND_PLATFORM}")
|
||||
|
||||
SET(SNIPPET_BUNDLE MACOSX_BUNDLE)
|
||||
|
||||
SET(CUSTOM_SNIPPET_TARGET_PROPERTIES
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
|
||||
XCODE_ATTRIBUTE_INFOPLIST_FILE "${PHYSX_ROOT_DIR}/snippets/deployment/ios64/PhysXAppIos64-Info.plist"
|
||||
MACOSX_BUNDLE_INFO_PLIST "${PHYSX_ROOT_DIR}/snippets/deployment/ios64/PhysXAppIos64-Info.plist"
|
||||
XCODE_ATTRIBUTE_INFOPLIST_PREPROCESS YES
|
||||
CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "7.0"
|
||||
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "YES"
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
53
physx/snippets/compiler/cmake/ios/SnippetTemplate.cmake
Normal file
53
physx/snippets/compiler/cmake/ios/SnippetTemplate.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 Snippet ios template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_IOS_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_IOS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_IOS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_IOS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_IOS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
|
||||
)
|
||||
45
physx/snippets/compiler/cmake/ios/SnippetUtils.cmake
Normal file
45
physx/snippets/compiler/cmake/ios/SnippetUtils.cmake
Normal file
@ -0,0 +1,45 @@
|
||||
##
|
||||
## 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 SnippetUtils
|
||||
#
|
||||
|
||||
SET(SNIPPETUTILS_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SNIPPETUTILS_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
${PHYSX_IOS_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_IOS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_IOS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_IOS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_IOS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
|
||||
@ -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 SnippetVehicle ios template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_IOS_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_IOS_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_IOS_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_IOS_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_IOS_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
|
||||
)
|
||||
61
physx/snippets/compiler/cmake/linux/CMakeLists.txt
Normal file
61
physx/snippets/compiler/cmake/linux/CMakeLists.txt
Normal file
@ -0,0 +1,61 @@
|
||||
##
|
||||
## 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 "Snippets 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 "Snippets uses the PhysX CXX flags, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT DEFINED TINYXML2_PATH)
|
||||
SET(TINYXML2_PATH $ENV{PM_tinyxml2_PATH} CACHE INTERNAL "Path to tinyxml2")
|
||||
ENDIF()
|
||||
|
||||
# Get the CXX Flags from the Cached variables set by the PhysX CMakeLists
|
||||
SET(CMAKE_CXX_FLAGS "${PHYSX_CXX_FLAGS}")
|
||||
|
||||
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")
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath='$ORIGIN'")
|
||||
|
||||
# Include all of the projects
|
||||
SET(PLATFORM_SNIPPETS_LIST Convert LoadCollection)
|
||||
|
||||
IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
SET(SNIPPET_RENDER_ENABLED 0)
|
||||
ELSE()
|
||||
SET(SNIPPET_RENDER_ENABLED 1)
|
||||
LIST(APPEND PLATFORM_SNIPPETS_LIST HelloGRB)
|
||||
ENDIF()
|
||||
48
physx/snippets/compiler/cmake/linux/SnippetRender.cmake
Normal file
48
physx/snippets/compiler/cmake/linux/SnippetRender.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 SnippetRender
|
||||
#
|
||||
find_package(OpenGL $ENV{PM_OpenGL_VERSION} CONFIG REQUIRED) # Pull in OpenGL and GLUT
|
||||
|
||||
SET(SNIPPETRENDER_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(SNIPPETRENDER_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SNIPPETRENDER_PLATFORM_LINKED_LIBS GL GLUT GLU)
|
||||
90
physx/snippets/compiler/cmake/linux/SnippetTemplate.cmake
Normal file
90
physx/snippets/compiler/cmake/linux/SnippetTemplate.cmake
Normal file
@ -0,0 +1,90 @@
|
||||
##
|
||||
## 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 Snippet linux template
|
||||
#
|
||||
|
||||
IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
SET(SNIPPET_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};>
|
||||
)
|
||||
ELSE()
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};RENDER_SNIPPET;
|
||||
|
||||
$<$<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};>
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
IF(${SNIPPET_NAME} STREQUAL "ArticulationLoader")
|
||||
LIST(APPEND SNIPPET_PLATFORM_SOURCES
|
||||
${TINYXML2_PATH}/tinyxml2.h
|
||||
${TINYXML2_PATH}/tinyxml2.cpp
|
||||
)
|
||||
LIST(APPEND SNIPPET_PLATFORM_INCLUDES
|
||||
${TINYXML2_PATH}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
rt pthread dl
|
||||
)
|
||||
ELSE()
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
SnippetRender GL GLU GLUT X11 rt pthread dl -Wl,-rpath='${ORIGIN}'
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(PX_GENERATE_GPU_STATIC_LIBRARIES)
|
||||
IF(${SNIPPET_NAME} STREQUAL "ConvexDecomposition")
|
||||
LIST(APPEND SNIPPET_PLATFORM_LINKED_LIBS VHACD)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
45
physx/snippets/compiler/cmake/linux/SnippetUtils.cmake
Normal file
45
physx/snippets/compiler/cmake/linux/SnippetUtils.cmake
Normal file
@ -0,0 +1,45 @@
|
||||
##
|
||||
## 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 SnippetUtils
|
||||
#
|
||||
|
||||
SET(SNIPPETUTILS_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
|
||||
SET(SNIPPETUTILS_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};PX_PHYSX_STATIC_LIB;
|
||||
|
||||
$<$<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};>
|
||||
)
|
||||
@ -0,0 +1,72 @@
|
||||
##
|
||||
## 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 SnippetVehicle linux template
|
||||
#
|
||||
|
||||
IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
SET(SNIPPET_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};>
|
||||
)
|
||||
ELSE()
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_LINUX_COMPILE_DEFS};RENDER_SNIPPET;
|
||||
|
||||
$<$<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};>
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
rt pthread dl
|
||||
)
|
||||
ELSE()
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
SnippetRender GL GLU GLUT X11 rt pthread dl
|
||||
)
|
||||
ENDIF()
|
||||
57
physx/snippets/compiler/cmake/mac/CMakeLists.txt
Normal file
57
physx/snippets/compiler/cmake/mac/CMakeLists.txt
Normal file
@ -0,0 +1,57 @@
|
||||
##
|
||||
## 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_MAC_COMPILE_DEFS)
|
||||
MESSAGE(FATAL ERROR "Snippets 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 "Snippets uses the PhysX CXX flags, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
# Get the CXX Flags from the Cached variables set by the PhysX CMakeLists
|
||||
SET(CMAKE_CXX_FLAGS "${PHYSX_CXX_FLAGS}")
|
||||
|
||||
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 "")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_PROFILE "")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
|
||||
|
||||
SET(PHYSX_LIB_PATH "${PHYSX_ROOT_DIR}/lib/${COMPILER_AND_PLATFORM}")
|
||||
|
||||
|
||||
SET(SNIPPET_RENDER_ENABLED 1)
|
||||
|
||||
# Include all of the projects
|
||||
SET(PLATFORM_SNIPPETS_LIST Convert LoadCollection)
|
||||
|
||||
|
||||
44
physx/snippets/compiler/cmake/mac/SnippetRender.cmake
Normal file
44
physx/snippets/compiler/cmake/mac/SnippetRender.cmake
Normal file
@ -0,0 +1,44 @@
|
||||
##
|
||||
## 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 SnippetRender
|
||||
#
|
||||
|
||||
SET(SNIPPETRENDER_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SNIPPETRENDER_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
${PHYSX_MAC_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_MAC_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_MAC_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_MAC_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_MAC_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
63
physx/snippets/compiler/cmake/mac/SnippetTemplate.cmake
Normal file
63
physx/snippets/compiler/cmake/mac/SnippetTemplate.cmake
Normal file
@ -0,0 +1,63 @@
|
||||
##
|
||||
## 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 Snippet mac template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_MAC_COMPILE_DEFS};RENDER_SNIPPET;
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_MAC_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_MAC_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_MAC_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_MAC_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
FIND_PACKAGE(GLUT REQUIRED)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
SnippetRender ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
|
||||
)
|
||||
|
||||
IF(${SNIPPET_NAME} STREQUAL "ConvexDecomposition")
|
||||
LIST(APPEND SNIPPET_PLATFORM_LINKED_LIBS
|
||||
VHACD
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
44
physx/snippets/compiler/cmake/mac/SnippetUtils.cmake
Normal file
44
physx/snippets/compiler/cmake/mac/SnippetUtils.cmake
Normal file
@ -0,0 +1,44 @@
|
||||
##
|
||||
## 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 SnippetUtils
|
||||
#
|
||||
|
||||
SET(SNIPPETUTILS_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SNIPPETUTILS_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
${PHYSX_MAC_COMPILE_DEFS};
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_MAC_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_MAC_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_MAC_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_MAC_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
##
|
||||
## 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 SnippetVehicle mac template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_MAC_COMPILE_DEFS};RENDER_SNIPPET;
|
||||
|
||||
$<$<CONFIG:debug>:${PHYSX_MAC_DEBUG_COMPILE_DEFS};>
|
||||
$<$<CONFIG:checked>:${PHYSX_MAC_CHECKED_COMPILE_DEFS};>
|
||||
$<$<CONFIG:profile>:${PHYSX_MAC_PROFILE_COMPILE_DEFS};>
|
||||
$<$<CONFIG:release>:${PHYSX_MAC_RELEASE_COMPILE_DEFS};>
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
FIND_PACKAGE(GLUT REQUIRED)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
SnippetRender ${OPENGL_LIBRARIES} ${GLUT_LIBRARY}
|
||||
)
|
||||
|
||||
71
physx/snippets/compiler/cmake/windows/CMakeLists.txt
Normal file
71
physx/snippets/compiler/cmake/windows/CMakeLists.txt
Normal file
@ -0,0 +1,71 @@
|
||||
##
|
||||
## 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 "Snippets 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 "Snippets uses the PhysX CXX flags, and they're not defined when they need to be.")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT DEFINED TINYXML2_PATH)
|
||||
SET(TINYXML2_PATH $ENV{PM_tinyxml2_PATH} CACHE INTERNAL "Path to tinyxml2")
|
||||
ENDIF()
|
||||
|
||||
# Get the CXX Flags from the Cached variables set by the PhysX CMakeLists
|
||||
SET(CMAKE_CXX_FLAGS "${PHYSX_CXX_FLAGS} /EHsc")
|
||||
|
||||
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")
|
||||
|
||||
SET(SLN_PHYSXDEVICE_PATH "$ENV{PM_PhysXDevice_PATH}/bin/x86/")
|
||||
|
||||
# Include ConfigureFileMT to expose that function
|
||||
INCLUDE(ConfigureFileMt)
|
||||
|
||||
SET(SNIPPET_RENDER_ENABLED 1)
|
||||
|
||||
# Include all of the projects
|
||||
SET(PLATFORM_SNIPPETS_LIST Convert LoadCollection DelayLoadHook)
|
||||
|
||||
IF(PUBLIC_RELEASE)
|
||||
LIST(APPEND PLATFORM_SNIPPETS_LIST HelloGRB)
|
||||
ELSE()
|
||||
IF(PX_GENERATE_GPU_PROJECTS)
|
||||
LIST(APPEND PLATFORM_SNIPPETS_LIST HelloGRB)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(PX_BUILDVHACD)
|
||||
LIST(APPEND PLATFORM_SNIPPETS_LIST ConvexDecomposition)
|
||||
ENDIF()
|
||||
52
physx/snippets/compiler/cmake/windows/SnippetRender.cmake
Normal file
52
physx/snippets/compiler/cmake/windows/SnippetRender.cmake
Normal file
@ -0,0 +1,52 @@
|
||||
##
|
||||
## 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 SnippetRender
|
||||
#
|
||||
|
||||
SET(SNIPPETRENDER_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};PX_PHYSX_STATIC_LIB;GLUT_NO_LIB_PRAGMA;${PHYSX_LIBTYPE_DEFS};${PHYSXGPU_LIBTYPE_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(SNIPPETRENDER_PLATFORM_FILES
|
||||
${PHYSX_ROOT_DIR}/snippets/graphics/include/win32/GL/glut.h
|
||||
)
|
||||
|
||||
# Include OpenGL
|
||||
SET(SNIPPETRENDER_PLATFORM_INCLUDES
|
||||
${PHYSX_ROOT_DIR}/snippets/Graphics/include/win32/GL
|
||||
)
|
||||
|
||||
SET(SNIPPETRENDER_PLATFORM_LINKED_LIBS ${PHYSX_ROOT_DIR}/snippets/Graphics/lib/win${LIBPATH_SUFFIX}/glut/glut32.lib opengl32.lib glu32.lib)
|
||||
80
physx/snippets/compiler/cmake/windows/SnippetTemplate.cmake
Normal file
80
physx/snippets/compiler/cmake/windows/SnippetTemplate.cmake
Normal file
@ -0,0 +1,80 @@
|
||||
##
|
||||
## 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 Snippet win template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};RENDER_SNIPPET;${PHYSX_LIBTYPE_DEFS};${PHYSXGPU_LIBTYPE_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(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/SnippetPrint.h
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/SnippetPVD.h
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
SnippetRender
|
||||
)
|
||||
|
||||
IF(${SNIPPET_NAME} STREQUAL "ArticulationLoader")
|
||||
LIST(APPEND SNIPPET_PLATFORM_SOURCES
|
||||
${TINYXML2_PATH}/tinyxml2.h
|
||||
${TINYXML2_PATH}/tinyxml2.cpp
|
||||
)
|
||||
LIST(APPEND SNIPPET_PLATFORM_INCLUDES
|
||||
${TINYXML2_PATH}
|
||||
)
|
||||
|
||||
ENDIF()
|
||||
|
||||
IF(${SNIPPET_NAME} STREQUAL "ConvexDecomposition")
|
||||
LIST(APPEND SNIPPET_PLATFORM_LINKED_LIBS
|
||||
VHACD
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF(PX_GENERATE_GPU_STATIC_LIBRARIES)
|
||||
LIST(APPEND SNIPPET_PLATFORM_LINKED_LIBS PhysXGpu ${CUDA_CUDA_LIBRARY})
|
||||
ENDIF()
|
||||
44
physx/snippets/compiler/cmake/windows/SnippetUtils.cmake
Normal file
44
physx/snippets/compiler/cmake/windows/SnippetUtils.cmake
Normal file
@ -0,0 +1,44 @@
|
||||
##
|
||||
## 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 SnippetUtils
|
||||
#
|
||||
|
||||
SET(SNIPPETUTILS_PLATFORM_INCLUDES
|
||||
)
|
||||
|
||||
SET(SNIPPETUTILS_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};${PHYSX_LIBTYPE_DEFS};${PHYSXGPU_LIBTYPE_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};>
|
||||
)
|
||||
@ -0,0 +1,61 @@
|
||||
##
|
||||
## 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 Snippet win template
|
||||
#
|
||||
|
||||
SET(SNIPPET_COMPILE_DEFS
|
||||
# Common to all configurations
|
||||
|
||||
${PHYSX_WINDOWS_COMPILE_DEFS};RENDER_SNIPPET;${PHYSX_LIBTYPE_DEFS};${PHYSXGPU_LIBTYPE_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(SNIPPET_PLATFORM_SOURCES
|
||||
${PHYSX_ROOT_DIR}/snippets/snippetcommon/ClassicMain.cpp
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_INCLUDES
|
||||
|
||||
)
|
||||
|
||||
SET(SNIPPET_PLATFORM_LINKED_LIBS
|
||||
SnippetRender
|
||||
)
|
||||
|
||||
IF(PX_GENERATE_GPU_STATIC_LIBRARIES)
|
||||
LIST(APPEND SNIPPET_PLATFORM_LINKED_LIBS PhysXGpu)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT PX_GENERATE_STATIC_LIBRARIES)
|
||||
LIST(APPEND SNIPPET_PLATFORM_LINKED_LIBS PhysXTask)
|
||||
ENDIF()
|
||||
Reference in New Issue
Block a user