2017-11-22 01:55:55 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2019-02-27 00:16:20 +08:00
|
|
|
REPO AcademySoftwareFoundation/openvdb
|
2020-10-14 07:21:27 +08:00
|
|
|
REF 2a7966ccb184092a49355c04bccb014d84956ff7 # v7.1.0
|
|
|
|
SHA512 6d3d2481fd116c5fd8fdf84a5139cd6e6986e188c3a5def05ec3bee47bd31bee3099a1d317a330b10c2cf93094f305eeeea02cadcabfc81f8ffc60bf8acdb84e
|
2017-11-22 01:55:55 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2019-06-27 01:33:36 +08:00
|
|
|
0003-fix-cmake.patch
|
2017-11-22 01:55:55 +08:00
|
|
|
)
|
|
|
|
|
2019-11-20 02:59:56 +08:00
|
|
|
file(REMOVE ${SOURCE_PATH}/cmake/FindTBB.cmake)
|
2020-11-21 05:25:30 +08:00
|
|
|
file(REMOVE ${SOURCE_PATH}/cmake/FindIlmBase.cmake)
|
|
|
|
file(REMOVE ${SOURCE_PATH}/cmake/FindBlosc.cmake)
|
|
|
|
file(REMOVE ${SOURCE_PATH}/cmake/FindOpenEXR.cmake)
|
2019-11-20 02:59:56 +08:00
|
|
|
|
2020-10-14 07:21:27 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" OPENVDB_STATIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OPENVDB_SHARED)
|
2017-11-22 01:55:55 +08:00
|
|
|
|
2020-10-14 07:21:27 +08:00
|
|
|
set(OPENVDB_BUILD_TOOLS OFF)
|
2017-11-22 01:55:55 +08:00
|
|
|
if ("tools" IN_LIST FEATURES)
|
2019-02-27 00:16:20 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
2017-11-22 01:55:55 +08:00
|
|
|
set(OPENVDB_BUILD_TOOLS ON)
|
2019-02-27 00:16:20 +08:00
|
|
|
else()
|
2019-11-20 02:59:56 +08:00
|
|
|
message(FATAL_ERROR "Unable to build tools if static libraries are required")
|
2019-02-27 00:16:20 +08:00
|
|
|
endif()
|
2017-11-22 01:55:55 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2019-02-27 00:16:20 +08:00
|
|
|
OPTIONS
|
|
|
|
-DOPENVDB_BUILD_UNITTESTS=OFF
|
|
|
|
-DOPENVDB_BUILD_PYTHON_MODULE=OFF
|
|
|
|
-DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF
|
|
|
|
-DUSE_GLFW3=ON
|
2019-06-27 01:33:36 +08:00
|
|
|
-DOPENVDB_CORE_STATIC=${OPENVDB_STATIC}
|
|
|
|
-DOPENVDB_CORE_SHARED=${OPENVDB_SHARED}
|
|
|
|
-DOPENVDB_BUILD_VDB_PRINT=${OPENVDB_BUILD_TOOLS}
|
|
|
|
-DOPENVDB_BUILD_VDB_VIEW=${OPENVDB_BUILD_TOOLS}
|
2020-10-14 07:21:27 +08:00
|
|
|
-DOPENVDB_BUILD_VDB_RENDER=${OPENVDB_BUILD_TOOLS}
|
2019-06-27 01:33:36 +08:00
|
|
|
-DOPENVDB_BUILD_VDB_LOD=${OPENVDB_BUILD_TOOLS}
|
2020-10-14 07:21:27 +08:00
|
|
|
-DUSE_PKGCONFIG=OFF
|
2017-11-22 01:55:55 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2019-06-27 01:33:36 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenVDB TARGET_PATH share/openvdb)
|
|
|
|
|
2017-11-22 01:55:55 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2019-06-27 01:33:36 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
2017-11-22 01:55:55 +08:00
|
|
|
|
|
|
|
if (OPENVDB_BUILD_TOOLS)
|
2020-10-14 07:21:27 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES vdb_print vdb_render vdb_view vdb_lod AUTO_CLEAN)
|
2017-11-22 01:55:55 +08:00
|
|
|
endif()
|
|
|
|
|
2021-01-28 10:16:47 +08:00
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY)
|
2020-11-21 05:25:30 +08:00
|
|
|
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
|
|
|
file(INSTALL ${SOURCE_PATH}/openvdb/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|