aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples/external/CMakeModules
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2018-05-03 18:22:48 +0200
committerMarijn Tamis <[email protected]>2018-05-03 18:22:48 +0200
commitca32c59a58d37c1822e185a2d5f3d0d3e8943593 (patch)
treeb06b9eec03f34344ef8fc31aa147b2714d3962ee /NvCloth/samples/external/CMakeModules
parentForced rename of platform folders in cmake dir. Git didn't pick this up before. (diff)
downloadnvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.tar.xz
nvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.zip
NvCloth 1.1.4 Release. (24070740)
Diffstat (limited to 'NvCloth/samples/external/CMakeModules')
-rw-r--r--NvCloth/samples/external/CMakeModules/FindAssimp.cmake76
-rw-r--r--NvCloth/samples/external/CMakeModules/FindPxShared.cmake13
2 files changed, 81 insertions, 8 deletions
diff --git a/NvCloth/samples/external/CMakeModules/FindAssimp.cmake b/NvCloth/samples/external/CMakeModules/FindAssimp.cmake
new file mode 100644
index 0000000..4f20396
--- /dev/null
+++ b/NvCloth/samples/external/CMakeModules/FindAssimp.cmake
@@ -0,0 +1,76 @@
+# - Try to find Assimp
+# - Sets ASSIMP_LIBRARIES - list of the libraries found
+# - Sets ASSIMP_INCLUDE_DIRS
+
+include(FindPackageHandleStandardArgs)
+
+# Find the includes
+
+find_path(ASSIMP_PATH include/assimp/version.h
+ PATHS
+ ${NVCLOTH_ROOT_DIR}/samples/external/assimp-${Assimp_FIND_VERSION}
+)
+
+# If the project pulling in this dependency needs the static crt, then append that to the path.
+
+#if (STATIC_WINCRT)
+# SET(ASSIMP_CRT_FOLDER "staticcrt")
+#else()
+# SET(ASSIMP_CRT_FOLDER "dynamiccrt")
+#endif()
+
+if (CMAKE_CL_64)
+ SET(ASSIMP_ARCH_FOLDER "x64")
+else()
+ SET(ASSIMP_ARCH_FOLDER "Win32")
+endif()
+
+if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 18.0.0.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.0.0)
+ #SET(VS_STR "vc13win64-cmake")
+ MESSAGE(FATAL_ERROR "Failed to find compatible ASSIMP - Only supporting VS2015 currently")
+elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.0.0.0)
+ if (CMAKE_CL_64)
+ SET(VS_STR "vc14win64-cmake")
+ else()
+ SET(VS_STR "vc14win32-cmake")
+ endif()
+else()
+ MESSAGE(FATAL_ERROR "Failed to find compatible ASSIMP - Only supporting VS2015 currently")
+endif()
+
+
+SET(LIB_PATH ${ASSIMP_PATH}/compiler/${VS_STR}/code)
+
+find_library(ASSIMP_LIB
+ NAMES assimp-vc140-mt.lib
+ PATHS ${LIB_PATH}/Release
+)
+find_library(ASSIMP_LIB_DEBUG
+ NAMES assimp-vc140-mt.lib
+ PATHS ${LIB_PATH}/Debug
+)
+
+#MESSAGE(${LIB_PATH}/Release)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASSIMP
+ DEFAULT_MSG
+ ASSIMP_PATH
+
+ ASSIMP_LIB
+
+ ASSIMP_LIB_DEBUG
+)
+
+if (ASSIMP_FOUND)
+ # NOTE: This include list is way too long and reaches into too many internals.
+ # Also may not be good enough for all users.
+ SET(ASSIMP_INCLUDE_DIRS
+ ${ASSIMP_PATH}/include
+ )
+
+ SET(ASSIMP_DLL_PATH
+ ${LIB_PATH}
+ )
+
+ SET(ASSIMP_LIBRARIES optimized ${ASSIMP_LIB} debug ${ASSIMP_LIB_DEBUG})
+endif()
diff --git a/NvCloth/samples/external/CMakeModules/FindPxShared.cmake b/NvCloth/samples/external/CMakeModules/FindPxShared.cmake
index c094676..a252b47 100644
--- a/NvCloth/samples/external/CMakeModules/FindPxShared.cmake
+++ b/NvCloth/samples/external/CMakeModules/FindPxShared.cmake
@@ -4,16 +4,13 @@
# PXSHARED_ROOT_DIR - The root of PxShared
# NOTE: We're including a version in this, but the first hint is without one - we should use that!
-FIND_PATH( PXSHARED_ROOT_DIR include/cudamanager/PxGpuCopyDesc.h
+FIND_PATH( PXSHARED_ROOT_DIR include/foundation/Px.h
HINTS
- ${GW_DEPS_ROOT}/PxShared/${PxShared_FIND_VERSION}
+ ${GW_DEPS_ROOT}/PxShared
${GW_DEPS_ROOT}/sw/physx/PxShared/1.0/trunk
-
- )
-
-
-
-
+ NO_DEFAULT_PATH
+ NO_CMAKE_FIND_ROOT_PATH)
+
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PxShared DEFAULT_MSG PXSHARED_ROOT_DIR)