early-access version 2853
This commit is contained in:
31
externals/vcpkg/ports/draco/disable-symlinks.patch
vendored
Executable file
31
externals/vcpkg/ports/draco/disable-symlinks.patch
vendored
Executable file
@@ -0,0 +1,31 @@
|
||||
diff --git a/cmake/draco_targets.cmake b/cmake/draco_targets.cmake
|
||||
index f2acc72..fb8ce4a 100644
|
||||
--- a/cmake/draco_targets.cmake
|
||||
+++ b/cmake/draco_targets.cmake
|
||||
@@ -102,10 +102,6 @@ macro(draco_add_executable)
|
||||
|
||||
add_executable(${exe_NAME} ${exe_SOURCES})
|
||||
|
||||
- if(NOT EMSCRIPTEN)
|
||||
- set_target_properties(${exe_NAME} PROPERTIES VERSION ${DRACO_VERSION})
|
||||
- endif()
|
||||
-
|
||||
if(exe_OUTPUT_NAME)
|
||||
set_target_properties(${exe_NAME} PROPERTIES OUTPUT_NAME ${exe_OUTPUT_NAME})
|
||||
endif()
|
||||
@@ -337,15 +333,6 @@ macro(draco_add_library)
|
||||
set_target_properties(${lib_NAME} PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
- if(NOT EMSCRIPTEN)
|
||||
- # VERSION and SOVERSION as necessary
|
||||
- if((lib_TYPE STREQUAL BUNDLE OR lib_TYPE STREQUAL SHARED) AND NOT MSVC)
|
||||
- set_target_properties(${lib_NAME}
|
||||
- PROPERTIES VERSION ${DRACO_SOVERSION} SOVERSION
|
||||
- ${DRACO_SOVERSION_MAJOR})
|
||||
- endif()
|
||||
- endif()
|
||||
-
|
||||
if(BUILD_SHARED_LIBS AND (MSVC OR WIN32))
|
||||
if(lib_TYPE STREQUAL SHARED)
|
||||
target_compile_definitions(${lib_NAME} PRIVATE "DRACO_BUILDING_DLL=1")
|
||||
30
externals/vcpkg/ports/draco/fix-compile-error-uwp.patch
vendored
Executable file
30
externals/vcpkg/ports/draco/fix-compile-error-uwp.patch
vendored
Executable file
@@ -0,0 +1,30 @@
|
||||
diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc
|
||||
index 6e42a58..3c302b9 100644
|
||||
--- a/src/draco/io/parser_utils.cc
|
||||
+++ b/src/draco/io/parser_utils.cc
|
||||
@@ -152,7 +152,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) {
|
||||
if (!ParseUnsignedInt(buffer, &v)) {
|
||||
return false;
|
||||
}
|
||||
- *value = (sign < 0) ? -v : v;
|
||||
+ if (sign < 0)
|
||||
+ v *= -1;
|
||||
+ *value = v;
|
||||
return true;
|
||||
}
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7e79da7..c4d9880 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -70,6 +70,10 @@ draco_set_build_definitions()
|
||||
draco_set_cxx_flags()
|
||||
draco_generate_features_h()
|
||||
|
||||
+if (MSVC)
|
||||
+ add_compile_options(/wd4996)
|
||||
+endif()
|
||||
+
|
||||
# Draco source file listing variables.
|
||||
list(APPEND draco_attributes_sources
|
||||
"${draco_src_root}/attributes/attribute_octahedron_transform.cc"
|
||||
13
externals/vcpkg/ports/draco/fix-uwperror.patch
vendored
Executable file
13
externals/vcpkg/ports/draco/fix-uwperror.patch
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/draco/core/bit_utils.h b/src/draco/core/bit_utils.h
|
||||
index a102095..b6ba69b 100644
|
||||
--- a/src/draco/core/bit_utils.h
|
||||
+++ b/src/draco/core/bit_utils.h
|
||||
@@ -27,6 +27,8 @@
|
||||
#include <intrin.h>
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
+#pragma warning(disable:4146)
|
||||
+
|
||||
namespace draco {
|
||||
|
||||
// Returns the number of '1' bits within the input 32 bit integer.
|
||||
38
externals/vcpkg/ports/draco/portfile.cmake
vendored
Executable file
38
externals/vcpkg/ports/draco/portfile.cmake
vendored
Executable file
@@ -0,0 +1,38 @@
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO google/draco
|
||||
REF 1.4.3
|
||||
SHA512 f2220d5e84a4ca2d14c6bbc3dca0a2ed5c988849d3a98ce3dea910efe005e0ccdff06677d782cdb1673db9e158905aa91a9305432dc5621e8947b2d90f5996d3
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-compile-error-uwp.patch
|
||||
fix-uwperror.patch
|
||||
disable-symlinks.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Install tools and plugins
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES
|
||||
draco_encoder
|
||||
draco_decoder
|
||||
AUTO_CLEAN
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
16
externals/vcpkg/ports/draco/vcpkg.json
vendored
Executable file
16
externals/vcpkg/ports/draco/vcpkg.json
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "draco",
|
||||
"version": "1.4.3",
|
||||
"description": " A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.",
|
||||
"homepage": "https://github.com/google/draco",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user