зеркало из https://github.com/microsoft/vcpkg.git
[bgfx] Update to v1.118.8398-400 (#28702)
Remove vendored copies of 3rdparty bimg dependencies. No more installed 3rdparty static libraries from bimg. Add `BGFX_CMAKE_USER_SCRIPT` as entry point to change functionality of bgfx.cmake config without the need for patches. Insert miniz, tinyexr and libsquish from vcpkg repo into config. Remove vcpkg's nvtt because bgfx's is completely different. Co-authored-by: Jonliu1993 <13720414433@163.com>
This commit is contained in:
Родитель
9e36a44338
Коммит
d1366382d3
|
@ -1,49 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 14eb13d..dad3b53 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -149,7 +149,7 @@ if( BGFX_INSTALL )
|
||||
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
)
|
||||
if( NOT BGFX_LIBRARY_TYPE MATCHES "SHARED" )
|
||||
- install( TARGETS bimg bx astc-encoder edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr
|
||||
+ install( TARGETS bimg bx astc-encoder edtaa3 etc1 etc2 iqa pvrtc
|
||||
EXPORT "${TARGETS_EXPORT_NAME}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
diff --git a/cmake/bimg.cmake b/cmake/bimg.cmake
|
||||
index 9519b3a..e4b6341 100644
|
||||
--- a/cmake/bimg.cmake
|
||||
+++ b/cmake/bimg.cmake
|
||||
@@ -14,10 +14,11 @@ include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/edtaa3.cmake )
|
||||
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/etc1.cmake )
|
||||
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/etc2.cmake )
|
||||
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/iqa.cmake )
|
||||
-include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/libsquish.cmake )
|
||||
-include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/nvtt.cmake )
|
||||
include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/pvrtc.cmake )
|
||||
-include( ${CMAKE_CURRENT_LIST_DIR}/3rdparty/tinyexr.cmake )
|
||||
+find_package(tinyexr CONFIG REQUIRED)
|
||||
+find_package(unofficial-libsquish CONFIG REQUIRED)
|
||||
+find_library(NVTT_LIBRARIES NAMES nvtt libnvtt PATH_SUFFIXES static)
|
||||
+find_path(NVTT_INCLUDE_DIRS NAMES nvtt.h PATH_SUFFIXES nvtt)
|
||||
|
||||
# Ensure the directory exists
|
||||
if( NOT IS_DIRECTORY ${BIMG_DIR} )
|
||||
@@ -33,12 +34,13 @@ add_library( bimg STATIC ${BIMG_SOURCES} )
|
||||
|
||||
# Add include directory of bimg
|
||||
target_include_directories( bimg
|
||||
- PUBLIC
|
||||
+ PUBLIC
|
||||
$<BUILD_INTERFACE:${BIMG_DIR}/include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
|
||||
+target_include_directories( bimg PRIVATE ${NVTT_INCLUDE_DIRS})
|
||||
# bimg dependencies
|
||||
-target_link_libraries( bimg PUBLIC bx PRIVATE astc-encoder edtaa3 etc1 etc2 iqa squish nvtt pvrtc tinyexr )
|
||||
+target_link_libraries( bimg PUBLIC bx PRIVATE astc-encoder edtaa3 etc1 etc2 iqa unofficial::libsquish::squish ${NVTT_LIBRARIES} pvrtc unofficial::tinyexr::tinyexr )
|
||||
|
||||
# Put in a "bgfx" folder in Visual Studio
|
||||
set_target_properties( bimg PROPERTIES FOLDER "bgfx" )
|
||||
\ No newline at end of file
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/image_decode.cpp b/src/image_decode.cpp
|
||||
index dd391e5..8218ac9 100644
|
||||
--- a/src/image_decode.cpp
|
||||
+++ b/src/image_decode.cpp
|
||||
@@ -19,7 +19,7 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4505) // warning C4505: 'tinyexr::miniz::def_r
|
||||
#define MINIZ_NO_ARCHIVE_APIS
|
||||
#define MINIZ_NO_STDIO
|
||||
#define TINYEXR_IMPLEMENTATION
|
||||
-#include <tinyexr/tinyexr.h>
|
||||
+#include <tinyexr.h>
|
||||
BX_PRAGMA_DIAGNOSTIC_POP()
|
||||
|
||||
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
|
@ -1,7 +1,7 @@
|
|||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/bkaradzic/bgfx.cmake/archive/refs/tags/v1.118.8384-362.tar.gz"
|
||||
FILENAME "v1.118.8384-362.tar.gz"
|
||||
SHA512 56203c40a724cd9e225d1c3142a30f8dd2e2f8cfc869a19cfa512bc69f0f62cd9460d016f1345a21bae9ef81323571d30dc588fde53f0fd0ba8628f7bbbab563
|
||||
URLS "https://github.com/bkaradzic/bgfx.cmake/archive/refs/tags/v1.118.8398-400.tar.gz"
|
||||
FILENAME "bgfx.cmake.tar.gz"
|
||||
SHA512 bfd3a00c1e39fddd549a594bcd0292aebbc8f3c4bae6938b9cb7c2b9ddc880e720cac4d7a42460567679b61901cc127c58e045a4bb7d03f4bb529c99f5375df9
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
|
@ -16,17 +16,16 @@ vcpkg_from_github(
|
|||
OUT_SOURCE_PATH SOURCE_PATH_BIMG
|
||||
REPO "bkaradzic/bimg"
|
||||
HEAD_REF master
|
||||
REF 85109d7cdbe775a0ab72cf38510df525d5e8d3da
|
||||
SHA512 b3e082cd249e802e6d209ed45a552843604713a06597277b2855d1fa1c39b3d5136d5589599a85126eda218ccfee0ce6177f004cb5dccb912fe64ea7e07af2a8
|
||||
PATCHES fix-headerfile.patch
|
||||
REF 1af90543ca262c1cfa10aa477aef9dc1b11419f4
|
||||
SHA512 309b1e1aeb5fc1bdd189e848b642a209d27602ea5f5cdc405cc0ab8f17bc426f5a331fb396424b0ebad49407638c85d0d97fee51faf10750e512a30b49cabd23
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH_BGFX
|
||||
REPO "bkaradzic/bgfx"
|
||||
HEAD_REF master
|
||||
REF 66de825e6f9de21890b336994141ab5dbc214dec
|
||||
SHA512 16ee1d3897dce5fcee7e658f793e078a1f3547b5d3512ebb860819d5105df99f87e4389ee1c66c1d24df04e0e589b6842cf36a52581e21732164017098f36f60
|
||||
REF 5f435ea56b29c3dd3ebdf9fab1a8f408681ff919
|
||||
SHA512 5d072fad3c1bfdf0c805f9cf18f34e10cbeb602e9bb7440c962fed58c400b89e9e6487e9986cfcd16d3ab65916a37ef62ebc6b43560ce132364a4e2466138f63
|
||||
)
|
||||
|
||||
vcpkg_check_features(
|
||||
|
@ -45,9 +44,10 @@ endif ()
|
|||
|
||||
vcpkg_extract_source_archive(SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES fix-dependencies.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-inject-packages.cmake" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS -DBX_DIR=${SOURCE_PATH_BX}
|
||||
|
@ -58,6 +58,7 @@ vcpkg_cmake_configure(
|
|||
-DBGFX_AMALGAMATED=ON
|
||||
-DBGFX_BUILD_EXAMPLES=OFF
|
||||
-DBGFX_OPENGLES_VERSION=30
|
||||
-DBGFX_CMAKE_USER_SCRIPT=vcpkg-inject-packages.cmake
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
|
@ -67,7 +68,7 @@ vcpkg_copy_pdbs()
|
|||
|
||||
if (BGFX_BUILD_TOOLS)
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES shaderc geometryc geometryv texturec texturev AUTO_CLEAN
|
||||
TOOL_NAMES bin2c shaderc geometryc geometryv texturec texturev AUTO_CLEAN
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
find_package(miniz CONFIG REQUIRED)
|
||||
set(MINIZ_LIBRARIES miniz::miniz)
|
||||
|
||||
find_package(unofficial-libsquish CONFIG REQUIRED)
|
||||
set(LIBSQUISH_LIBRARIES unofficial::libsquish::squish)
|
||||
|
||||
find_package(tinyexr CONFIG REQUIRED)
|
||||
set(TINYEXR_LIBRARIES unofficial::tinyexr::tinyexr)
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"name": "bgfx",
|
||||
"version": "1.118.8384-362",
|
||||
"port-version": 1,
|
||||
"version": "1.118.8398-400",
|
||||
"maintainers": "Sandy Carter <bwrsandman@users.noreply.github.com>",
|
||||
"description": "Cross-platform, graphics API agnostic, Bring Your Own Engine/Framework style rendering library.",
|
||||
"homepage": "https://bkaradzic.github.io/bgfx/overview.html",
|
||||
|
@ -9,7 +8,7 @@
|
|||
"license": "BSD-2-Clause",
|
||||
"dependencies": [
|
||||
"libsquish",
|
||||
"nvtt",
|
||||
"miniz",
|
||||
"tinyexr",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "0fe86904c573bab0e9b8c410160de78ecfc4527f",
|
||||
"version": "1.118.8398-400",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "9359637243730a77d0139bd3ecdf317bd16fa38e",
|
||||
"version": "1.118.8384-362",
|
||||
|
|
|
@ -497,8 +497,8 @@
|
|||
"port-version": 0
|
||||
},
|
||||
"bgfx": {
|
||||
"baseline": "1.118.8384-362",
|
||||
"port-version": 1
|
||||
"baseline": "1.118.8398-400",
|
||||
"port-version": 0
|
||||
},
|
||||
"bigint": {
|
||||
"baseline": "2010.04.30",
|
||||
|
|
Загрузка…
Ссылка в новой задаче