代码拉取完成,页面将自动刷新
同步操作将从 李开诚/position-based-dynamic-GPU 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
cmake_minimum_required(VERSION 2.8)
project(PositionBasedDynamics)
set(PROJECT_PATH ${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
include(${PROJECT_PATH}/CMake/Common.cmake)
add_definitions(-DPBD_DATA_PATH="../data")
if (NOT WIN32)
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
endif()
if (DEFINED PBD_EXTERNALINSTALLDIR)
set(ExternalInstallDir "${PBD_EXTERNALINSTALLDIR}" CACHE INTERNAL "External install directory")
else()
set(ExternalInstallDir "${PROJECT_BINARY_DIR}" CACHE INTERNAL "External install directory")
endif()
include(ExternalProject)
set(EigenDir "${CMAKE_SOURCE_DIR}/extern/eigen")
set(EXT_CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE})
if (NOT ${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(EXT_CMAKE_BUILD_TYPE "Release")
endif()
## CUDA
find_package(CUDA REQUIRED)
if(${CUDA_FOUND})
include_directories(${CUDA_INCLUDE_DIRS})
link_directories($ENV{CUDA_PATH}/lib/x64)
else(${CUDA_FOUND})
MESSAGE(STATUS "CUDA not found!")
endif(${CUDA_FOUND})
# nvcc flags
#set(CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20;-G;-g)
#set(CUDA_NVCC_FLAGS -gencode arch=compute_52,code=sm_52;-G;-g)
## Discregrid
if ((DEFINED Discregrid_INCLUDE_DIR) AND (DEFINED Discregrid_DEBUG_LIB) AND (DEFINED Discregrid_LIB))
message(STATUS "Using ${Discregrid_INCLUDE_DIR}")
set(Discregrid_LIBRARIES optimized ${Discregrid_LIB} debug ${Discregrid_DEBUG_LIB})
else()
ExternalProject_Add(
Ext_Discregrid
PREFIX "${ExternalInstallDir}/Discregrid"
GIT_REPOSITORY https://github.com/InteractiveComputerGraphics/Discregrid.git
GIT_TAG "267067f727c552eba7da8bdb406eafd40673823e"
INSTALL_DIR ${ExternalInstallDir}/Discregrid
CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${EXT_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=${ExternalInstallDir}/Discregrid
-DBUILD_AS_SHARED_LIBS:BOOL=0
-DBUILD_CMD_EXECUTABLE:BOOL=0 -DEIGEN3_INCLUDE_DIR:PATH=${EigenDir}
)
ExternalProject_Get_Property(Ext_Discregrid INSTALL_DIR)
set(Discregrid_INCLUDE_DIR ${INSTALL_DIR}/include)
set(Discregrid_LIBRARIES optimized ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}Discregrid${CMAKE_STATIC_LIBRARY_SUFFIX}
debug ${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}Discregrid_d${CMAKE_STATIC_LIBRARY_SUFFIX})
unset(INSTALL_DIR)
message(STATUS "Building ${Discregrid_INCLUDE_DIR}")
endif()
if (DEFINED GenericParameters_INCLUDE_DIR)
message(STATUS "Using ${GenericParameters_INCLUDE_DIR}")
else()
## GenericParameters
ExternalProject_Add(
Ext_GenericParameters
PREFIX "${ExternalInstallDir}/GenericParameters"
GIT_REPOSITORY https://github.com/InteractiveComputerGraphics/GenericParameters.git
GIT_TAG "b1ad669fac8d106515f6aa8514a03598d5766a36"
INSTALL_DIR ${ExternalInstallDir}/GenericParameters
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${EXT_CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=${ExternalInstallDir}/GenericParameters -DGENERICPARAMETERS_NO_TESTS:BOOL=1
)
ExternalProject_Get_Property(Ext_GenericParameters INSTALL_DIR)
set(GenericParameters_INCLUDE_DIR ${INSTALL_DIR}/include)
unset(INSTALL_DIR)
endif()
add_subdirectory(PositionBasedDynamics)
add_subdirectory(Simulation)
add_subdirectory(Utils)
if (NOT PBD_NO_DEMOS)
if (WIN32)
add_subdirectory(extern/freeglut)
endif()
add_subdirectory(extern/AntTweakBar)
add_subdirectory(extern/glew)
add_subdirectory(extern/md5)
add_subdirectory(Demos)
endif()
install(DIRECTORY ./Common
DESTINATION include
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ./data
DESTINATION include
FILES_MATCHING PATTERN "*.glsl")
install(DIRECTORY ./Demos/Visualization
DESTINATION include
FILES_MATCHING PATTERN "*.h")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。