mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 13:28:01 +08:00
[vcpkg baseline] [bgfx] Fix dependencies (#28377)
* [vcpkg baseline] [bgfx] Fix dependencies * format vcpkg.json * x-add-version
This commit is contained in:
parent
f0a5a4515b
commit
b6b5c0b9a4
49
ports/bgfx/fix-dependencies.patch
Normal file
49
ports/bgfx/fix-dependencies.patch
Normal file
@ -0,0 +1,49 @@
|
||||
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
|
13
ports/bgfx/fix-headerfile.patch
Normal file
13
ports/bgfx/fix-headerfile.patch
Normal file
@ -0,0 +1,13 @@
|
||||
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();
|
@ -18,6 +18,7 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
REF 85109d7cdbe775a0ab72cf38510df525d5e8d3da
|
||||
SHA512 b3e082cd249e802e6d209ed45a552843604713a06597277b2855d1fa1c39b3d5136d5589599a85126eda218ccfee0ce6177f004cb5dccb912fe64ea7e07af2a8
|
||||
PATCHES fix-headerfile.patch
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
@ -44,6 +45,7 @@ endif ()
|
||||
|
||||
vcpkg_extract_source_archive(SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES fix-dependencies.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
@ -1,12 +1,16 @@
|
||||
{
|
||||
"name": "bgfx",
|
||||
"version": "1.118.8384-362",
|
||||
"port-version": 1,
|
||||
"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",
|
||||
"documentation": "https://bkaradzic.github.io/bgfx",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": [
|
||||
"libsquish",
|
||||
"nvtt",
|
||||
"tinyexr",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "9359637243730a77d0139bd3ecdf317bd16fa38e",
|
||||
"version": "1.118.8384-362",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "6554186755cae40eef0b34bf0c447861d6e6dd7a",
|
||||
"version": "1.118.8384-362",
|
||||
|
@ -490,7 +490,7 @@
|
||||
},
|
||||
"bgfx": {
|
||||
"baseline": "1.118.8384-362",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"bigint": {
|
||||
"baseline": "2010.04.30",
|
||||
|
Loading…
x
Reference in New Issue
Block a user