early-access version 2853
This commit is contained in:
19
externals/vcpkg/ports/libsquish/export-target.patch
vendored
Executable file
19
externals/vcpkg/ports/libsquish/export-target.patch
vendored
Executable file
@@ -0,0 +1,19 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a3ecdde..94c7b3d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -120,8 +120,14 @@ INCLUDE(GNUInstallDirs)
|
||||
|
||||
INSTALL(
|
||||
TARGETS squish
|
||||
+ EXPORT unofficial-libsquishConfig
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
+
|
||||
+INSTALL(EXPORT unofficial-libsquishConfig
|
||||
+ NAMESPACE unofficial::libsquish::
|
||||
+ DESTINATION share/unofficial-libsquish
|
||||
+)
|
||||
105
externals/vcpkg/ports/libsquish/fix-export-symbols.patch
vendored
Executable file
105
externals/vcpkg/ports/libsquish/fix-export-symbols.patch
vendored
Executable file
@@ -0,0 +1,105 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a36e574..a3ecdde 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -75,6 +75,13 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
ADD_LIBRARY(squish ${SQUISH_SRCS} ${SQUISH_HDRS})
|
||||
|
||||
+INCLUDE(GenerateExportHeader)
|
||||
+GENERATE_EXPORT_HEADER(squish
|
||||
+ EXPORT_FILE_NAME ${CMAKE_CURRENT_SOURCE_DIR}/squish_export.h
|
||||
+ )
|
||||
+
|
||||
+list(APPEND SQUISH_HDRS "squish_export.h")
|
||||
+
|
||||
SET_TARGET_PROPERTIES(
|
||||
squish PROPERTIES
|
||||
PUBLIC_HEADER "${SQUISH_HDRS}"
|
||||
@@ -109,9 +116,12 @@ IF (BUILD_SQUISH_EXTRA)
|
||||
ENDIF (PNG_FOUND)
|
||||
ENDIF (BUILD_SQUISH_EXTRA)
|
||||
|
||||
+INCLUDE(GNUInstallDirs)
|
||||
+
|
||||
INSTALL(
|
||||
TARGETS squish
|
||||
- LIBRARY DESTINATION lib
|
||||
- ARCHIVE DESTINATION lib
|
||||
- PUBLIC_HEADER DESTINATION include
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
diff --git a/squish.h b/squish.h
|
||||
index 14c9bb5..aaffbb2 100644
|
||||
--- a/squish.h
|
||||
+++ b/squish.h
|
||||
@@ -26,6 +26,8 @@
|
||||
#ifndef SQUISH_H
|
||||
#define SQUISH_H
|
||||
|
||||
+#include "squish_export.h"
|
||||
+
|
||||
//! All squish API functions live in this namespace.
|
||||
namespace squish {
|
||||
|
||||
@@ -115,5 +117,5 @@
|
||||
*/
|
||||
-void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 );
|
||||
+SQUISH_EXPORT void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 );
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -176,7 +178,7 @@ inline void Compress( u8 const* rgba, void* block, int flags, float* metric = 0
|
||||
however, DXT1 will be used by default if none is specified. All other flags
|
||||
are ignored.
|
||||
*/
|
||||
-void Decompress( u8* rgba, void const* block, int flags );
|
||||
+SQUISH_EXPORT void Decompress( u8* rgba, void const* block, int flags );
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -194,7 +196,7 @@ void Decompress( u8* rgba, void const* block, int flags );
|
||||
function supports arbitrary size images by allowing the outer blocks to
|
||||
be only partially used.
|
||||
*/
|
||||
-int GetStorageRequirements( int width, int height, int flags );
|
||||
+SQUISH_EXPORT int GetStorageRequirements( int width, int height, int flags );
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -249,8 +251,8 @@ int GetStorageRequirements( int width, int height, int flags );
|
||||
Windows platform but for other platforms like MacOS X a different
|
||||
gamma value may be more suitable.
|
||||
*/
|
||||
-void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric = 0 );
|
||||
-void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 );
|
||||
+SQUISH_EXPORT void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric = 0 );
|
||||
+SQUISH_EXPORT void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 );
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -274,8 +276,8 @@ void CompressImage( u8 const* rgba, int width, int height, void* blocks, int fla
|
||||
|
||||
Internally this function calls squish::Decompress for each block.
|
||||
*/
|
||||
-void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags );
|
||||
-void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags );
|
||||
+SQUISH_EXPORT void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags );
|
||||
+SQUISH_EXPORT void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags );
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -299,8 +301,8 @@ void DecompressImage( u8* rgba, int width, int height, void const* blocks, int f
|
||||
|
||||
Internally this function calls squish::Decompress for each block.
|
||||
*/
|
||||
-void ComputeMSE(u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE);
|
||||
-void ComputeMSE(u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE);
|
||||
+SQUISH_EXPORT void ComputeMSE(u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE);
|
||||
+SQUISH_EXPORT void ComputeMSE(u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE);
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
29
externals/vcpkg/ports/libsquish/portfile.cmake
vendored
Executable file
29
externals/vcpkg/ports/libsquish/portfile.cmake
vendored
Executable file
@@ -0,0 +1,29 @@
|
||||
vcpkg_from_sourceforge(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libsquish
|
||||
FILENAME "libsquish-1.15.tgz"
|
||||
NO_REMOVE_ONE_LEVEL
|
||||
SHA512 5b569b7023874c7a43063107e2e428ea19e6eb00de045a4a13fafe852ed5402093db4b65d540b5971ec2be0d21cb97dfad9161ebfe6cf6e5376174ff6c6c3e7a
|
||||
PATCHES
|
||||
fix-export-symbols.patch
|
||||
export-target.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
sse2 BUILD_SQUISH_WITH_SSE2
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libsquish CONFIG_PATH share/unofficial-libsquish)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
24
externals/vcpkg/ports/libsquish/vcpkg.json
vendored
Executable file
24
externals/vcpkg/ports/libsquish/vcpkg.json
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "libsquish",
|
||||
"version": "1.15",
|
||||
"port-version": 10,
|
||||
"description": "Open source DXT compression library.",
|
||||
"homepage": "https://sourceforge.net/projects/libsquish",
|
||||
"license": "MIT",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"sse2": {
|
||||
"description": "Build with SSE2",
|
||||
"supports": "osx"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user