Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omri/tinyusdz2 #43

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions ports/libzip/fix-dependency.patch

This file was deleted.

8 changes: 3 additions & 5 deletions ports/libzip/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nih-at/libzip
REF 5532f9baa0c44cc5435ad135686a4ea009075b9a #v1.9.2
SHA512 1105bc48c8a554a7fce84028197427b02ff53508592889b37e81cc419eb208d91112b98df2bf2d6f5629887e4418230ee36e3bf03c9ae39cdc39cfa90e7e3e7f
REPO polycam/libzip
REF 54e536150b0b1e6ca547df1ef914a767e7614738
SHA512 897eb20e1f0c3341690af2e6867ef33e95ad9c0fc94427db8b4e6096077d9db86e433b9fcfa1551cfc921ef3458b7b94b8d86aeadcae4f05bd51e8efb9065986
HEAD_REF master
PATCHES
fix-dependency.patch
)

vcpkg_check_features(
Expand Down
2 changes: 1 addition & 1 deletion ports/libzip/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "libzip",
"version": "1.9.2",
"description": "A library for reading, creating, and modifying zip archives.",
"homepage": "https://github.com/nih-at/libzip",
"homepage": "https://github.com/polycam/libzip",
"license": "BSD-3-Clause",
"dependencies": [
{
Expand Down
27 changes: 27 additions & 0 deletions ports/tinyusdz/add_install.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb11cef..18a9d42 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -775,6 +775,22 @@ if(TINYUSDZ_BUILD_SHARED_LIBS)
else()
# static only
set(TINYUSDZ_LIBS ${TINYUSDZ_TARGET_STATIC})
+ install(TARGETS ${TINYUSDZ_TARGET_STATIC}
+ EXPORT tinyusdzConfig
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ PUBLIC_HEADER DESTINATION include
+ )
+ install(EXPORT tinyusdzConfig
+ DESTINATION share/tinyusdz)
+ file(GLOB TINYUSDZ_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.hh")
+ file(GLOB TINYUSDZ_HEADERS_NONSTD "${CMAKE_CURRENT_SOURCE_DIR}/src/nonstd/*.hpp")
+ file(GLOB TINYUSDZ_HEADERS_INC "${CMAKE_CURRENT_SOURCE_DIR}/src/*.inc")
+ message("${TINYUSDZ_HEADERS}")
+ install(FILES ${TINYUSDZ_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
+ install(FILES ${TINYUSDZ_HEADERS_NONSTD} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/nonstd")
+ install(FILES ${TINYUSDZ_HEADERS_INC} DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
endif()

if(WIN32 AND TINYUSDZ_WITH_PXR_COMPAT_API)
94 changes: 94 additions & 0 deletions ports/tinyusdz/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Common Ambient Variables:
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# CURRENT_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET}
# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
# VCPKG_TOOLCHAIN = ON OFF
# TRIPLET_SYSTEM_ARCH = arm x86 x64
# BUILD_ARCH = "Win32" "x64" "ARM"
# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH}
# DEBUG_CONFIG = "Debug Static" "Debug Dll"
# RELEASE_CONFIG = "Release Static"" "Release DLL"
# VCPKG_TARGET_IS_WINDOWS
# VCPKG_TARGET_IS_UWP
# VCPKG_TARGET_IS_LINUX
# VCPKG_TARGET_IS_OSX
# VCPKG_TARGET_IS_FREEBSD
# VCPKG_TARGET_IS_ANDROID
# VCPKG_TARGET_IS_MINGW
# VCPKG_TARGET_EXECUTABLE_SUFFIX
# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX
# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX
#
# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md

# Also consider vcpkg_from_* functions if you can; the generated code here is for any web accessable
# source archive.
# vcpkg_from_github
# vcpkg_from_gitlab
# vcpkg_from_bitbucket
# vcpkg_from_sourceforge
# vcpkg_download_distfile(ARCHIVE
# URLS "https://github.com/syoyo/tinyusdz/archive/refs/tags/v0.8.0rc4.tar.gz"
# FILENAME "v0.8.0rc4.tar.gz"
# SHA512 795322278c3bee4a0f1dd4242f15d8adbb916befc1ea68eb30008a62de06daa5b56091329c69e9104b5535f0d9af444baf085ee7fb89c4d40fba331eaa128328
# )
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO syoyo/tinyusdz
REF 550f22db47f1f1a47eae0703d7631b572d20b926
SHA512 e7784f1b6243e7824885718bb391767685535d38a989228ad38adffe4c934d26b3a415b1cdf9480cb5790bd0d73d9380efecd56a7654b8f446b51ea0df09a095
HEAD_REF dev
PATCHES
add_install.patch
)

#vcpkg_extract_source_archive_ex(
# OUT_SOURCE_PATH SOURCE_PATH
# ARCHIVE "${ARCHIVE}"
# # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag).
# # REF 1.0.0
# # (Optional) Read the docs for how to generate patches at:
# # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md
# # PATCHES
# # 001_port_fixes.patch
# # 002_more_port_fixes.patch
#)

# # Check if one or more features are a part of a package installation.
# # See /docs/maintainers/vcpkg_check_features.md for more details
# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used
# tbb WITH_TBB
# INVERTED_FEATURES
# tbb ROCKSDB_IGNORE_PACKAGE_TBB
# )

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
# OPTIONS_RELEASE -DOPTIMIZE=1
# OPTIONS_DEBUG -DDEBUGGABLE=1
)

vcpkg_cmake_install()

# # Moves all .cmake files from /debug/share/tinyusdz/ to /share/tinyusdz/
# # See /docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md for more details
# When you uncomment "vcpkg_cmake_config_fixup()", you need to add the following to "dependencies" vcpkg.json:
#{
# "name": "vcpkg-cmake-config",
# "host": true
#}
# vcpkg_cmake_config_fixup()

# Uncomment the line below if necessary to install the license file for the port
# as a file named `copyright` to the directory `${CURRENT_PACKAGES_DIR}/share/${PORT}`
# vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
12 changes: 12 additions & 0 deletions ports/tinyusdz/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "tinyusdz",
"version": "0.8.0-rc4",
"homepage": "",
"description": "",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
]
}
15 changes: 0 additions & 15 deletions ports/usd/find-tbb.patch

This file was deleted.

13 changes: 0 additions & 13 deletions ports/usd/fix_build-location.patch

This file was deleted.

83 changes: 0 additions & 83 deletions ports/usd/portfile.cmake

This file was deleted.

31 changes: 0 additions & 31 deletions ports/usd/vcpkg.json

This file was deleted.