diff options
| author | ousttrue <ousttrue@gmail.com> | 2020-10-09 15:28:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-08 23:28:05 -0700 |
| commit | 956f73a6bde87c9ddc9f2a7f03994c526af68ba5 (patch) | |
| tree | 52438a9800e00a9e43ec1186ec5337ba43469001 | |
| parent | e040433ae09963ab8860c1491ad90b4cec58892e (diff) | |
| download | vcpkg-956f73a6bde87c9ddc9f2a7f03994c526af68ba5.tar.gz vcpkg-956f73a6bde87c9ddc9f2a7f03994c526af68ba5.zip | |
[opensubdiv] New port (#13695)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
| -rw-r--r-- | ports/opensubdiv/fix_compile-option.patch | 13 | ||||
| -rw-r--r-- | ports/opensubdiv/portfile.cmake | 46 | ||||
| -rw-r--r-- | ports/opensubdiv/vcpkg.json | 7 |
3 files changed, 66 insertions, 0 deletions
diff --git a/ports/opensubdiv/fix_compile-option.patch b/ports/opensubdiv/fix_compile-option.patch new file mode 100644 index 000000000..1acae92c8 --- /dev/null +++ b/ports/opensubdiv/fix_compile-option.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b69912ae..dcde4297 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,7 +218,7 @@ elseif(MSVC) + + list(APPEND OSD_COMPILER_FLAGS + /W3 # Use warning level recommended for production purposes. +- /WX # Treat all compiler warnings as errors. ++ # /WX # Treat all compiler warnings as errors. + + # warning C4005: macro redefinition + /wd4005 diff --git a/ports/opensubdiv/portfile.cmake b/ports/opensubdiv/portfile.cmake new file mode 100644 index 000000000..c23e14476 --- /dev/null +++ b/ports/opensubdiv/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "linux" "osx" "uwp")
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO PixarAnimationStudios/OpenSubdiv
+ REF 82ab1b9f54c87fdd7e989a3470d53e137b8ca270 # 3.4.3
+ SHA512 607cb9aa05d83a24bc2102bfd28abfec58f5723b1c56f6f431111ebf98f105ff7ca2a77610953acd21f73cb74d8d8ec68db3aeb11be1f9ca56d87c36c58dd095
+ HEAD_REF master
+ PATCHES
+ fix_compile-option.patch
+)
+
+vcpkg_find_acquire_program(PYTHON2)
+get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY)
+vcpkg_add_to_path("${PYTHON2_DIR}")
+
+if (VCPKG_CRT_LINKAGE STREQUAL static)
+ set(STATIC_CRT_LNK ON)
+else()
+ set(STATIC_CRT_LNK OFF)
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS
+ -DNO_DX=ON
+ -DNO_CUDA=ON
+ -DNO_EXAMPLES=ON
+ -DNO_TUTORIALS=ON
+ -DNO_REGRESSION=ON
+ -DNO_TESTS=ON
+ -DMSVC_STATIC_CRT=${STATIC_CRT_LNK}
+)
+
+vcpkg_install_cmake()
+
+# # Moves all .cmake files from /debug/share/opensubdiv/ to /share/opensubdiv/
+# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details
+# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/opensubdiv)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/opensubdiv/vcpkg.json b/ports/opensubdiv/vcpkg.json new file mode 100644 index 000000000..b66c98d7b --- /dev/null +++ b/ports/opensubdiv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "opensubdiv", + "version-string": "3.4.3", + "description": "An Open-Source subdivision surface library.", + "homepage": "https://github.com/PixarAnimationStudios/OpenSubdiv", + "supports": "windows & !arm & !uwp" +} |
