-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vdb_example_fluid containing a Flip solver.
Signed-off-by: Andre Pradhana <[email protected]>
- Loading branch information
Showing
4 changed files
with
759 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## Copyright Contributors to the OpenVDB Project | ||
# SPDX-License-Identifier: MPL-2.0 | ||
# | ||
#[=======================================================================[ | ||
|
||
CMake Configuration for OpenVDB Examples | ||
|
||
#]=======================================================================] | ||
|
||
cmake_minimum_required(VERSION 3.18) | ||
project(OpenVDBExamples LANGUAGES CXX) | ||
|
||
include(GNUInstallDirs) | ||
|
||
###### OpenVDB Binary Component Options | ||
|
||
option(OPENVDB_BUILD_VDB_EXAMPLE_FLUIDS "Build vdb_example_fluids" OFF) | ||
|
||
######################################################################### | ||
|
||
message(STATUS "----------------------------------------------------") | ||
message(STATUS "----------- Configuring OpenVDBExamples ------------") | ||
message(STATUS "----------------------------------------------------") | ||
|
||
########################################################################## | ||
|
||
# Collect lib dependencies shared by all binaries | ||
|
||
if(NOT OPENVDB_BUILD_CORE) | ||
# @note Could also use the openvdb_je target here, but we just opt to | ||
# handle the value of CONCURRENT_MALLOC outside of this branching for | ||
# both cases | ||
set(OPENVDB_LIB OpenVDB::openvdb) | ||
else() | ||
set(OPENVDB_LIB openvdb) | ||
endif() | ||
|
||
set(OPENVDB_BINARIES_DEPENDENT_LIBS | ||
${OPENVDB_LIB} | ||
) | ||
|
||
if(CONCURRENT_MALLOC STREQUAL "Jemalloc") | ||
find_package(Jemalloc REQUIRED) | ||
list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS Jemalloc::jemalloc) | ||
elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc") | ||
find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc) | ||
list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS TBB::tbbmalloc) | ||
endif() | ||
|
||
########################################################################## | ||
|
||
if (OPENVDB_BUILD_VDB_EXAMPLE_FLUIDS) | ||
add_subdirectory(vdb_example_fluids) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright Contributors to the OpenVDB Project | ||
# SPDX-License-Identifier: MPL-2.0 | ||
# | ||
#[=======================================================================[ | ||
|
||
CMake Configuration for VDB Example Fluids | ||
|
||
#]=======================================================================] | ||
|
||
cmake_minimum_required(VERSION 3.18) | ||
project(VDBExampleFluids LANGUAGES CXX) | ||
|
||
include(GNUInstallDirs) | ||
|
||
set(SOURCE_FILES main.cc) | ||
add_executable(vdb_example_fluids ${SOURCE_FILES}) | ||
target_link_libraries(vdb_example_fluids ${OPENVDB_BINARIES_DEPENDENT_LIBS}) | ||
|
||
install(TARGETS vdb_example_fluids RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) |
Oops, something went wrong.