early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

57
externals/vcpkg/ports/lz4/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,57 @@
cmake_minimum_required(VERSION 3.0)
project(lz4 C)
if(MSVC AND BUILD_SHARED_LIBS)
add_definitions(-DLZ4_DLL_EXPORT)
endif()
add_definitions(-DXXH_NAMESPACE=LZ4_)
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Install prefix")
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed")
set(INSTALL_CMAKE_DIR "share/lz4" CACHE PATH "Path where cmake configs will be installed")
file(GLOB LZ4_HEADERS lib/*.h)
add_library(lz4
${LZ4_HEADERS}
lib/lz4.c
lib/lz4frame.c
lib/lz4hc.c
lib/xxhash.c
)
target_include_directories(lz4 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/lib> $<INSTALL_INTERFACE:include>)
set_target_properties(lz4 PROPERTIES PUBLIC_HEADER ${LZ4_HEADERS})
install(TARGETS lz4
EXPORT lz4Config
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}"
PRIVATE_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}"
COMPONENT dev
)
FILE(GLOB lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/*.h")
list(REMOVE_ITEM lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/xxhash.h")
INSTALL(FILES ${lz4h} DESTINATION "${INSTALL_INCLUDE_DIR}")
install(EXPORT lz4Config
FILE lz4-config.cmake
NAMESPACE lz4::
DESTINATION "${INSTALL_CMAKE_DIR}"
)
# Export the package for use from the build-tree (this registers the build-tree with a global CMake-registry)
export(PACKAGE lz4)
# Create pkgconfig module file
file(STRINGS "lib/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_(MAJOR|MINOR|RELEASE) ")
string(REGEX REPLACE "^.*MAJOR +([0-9]+).*MINOR +([0-9]+).*RELEASE +([0-9]+).*$" "\\1.\\2.\\3" VERSION "${LZ4_H}")
set(INCLUDEDIR [[${prefix}/include]])
set(LIBDIR [[${prefix}/lib]])
configure_file(lib/liblz4.pc.in lib/liblz4.pc)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib/liblz4.pc" DESTINATION "lib/pkgconfig")

40
externals/vcpkg/ports/lz4/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,40 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lz4/lz4
REF v1.9.3
SHA512 c246b0bda881ee9399fa1be490fa39f43b291bb1d9db72dba8a85db1a50aad416a97e9b300eee3d2a4203c2bd88bda2762e81bc229c3aa409ad217eb306a454c
HEAD_REF dev
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(DLL_IMPORT "1 && defined(_MSC_VER)")
else()
set(DLL_IMPORT "0")
endif()
foreach(FILE lz4.h lz4frame.h)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/${FILE}"
"defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)"
"${DLL_IMPORT}"
)
endforeach()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/liblz4.pc" " -llz4" " -llz4d")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/lib/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

17
externals/vcpkg/ports/lz4/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,17 @@
{
"name": "lz4",
"version": "1.9.3",
"port-version": 3,
"description": "Lossless compression algorithm, providing compression speed at 400 MB/s per core.",
"homepage": "https://github.com/lz4/lz4",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}