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

21
externals/vcpkg/ports/sfml/arm64.patch vendored Executable file
View File

@@ -0,0 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 67b61712ec..73711753ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -253,10 +253,12 @@ if(SFML_OS_MACOSX)
endif()
endif()
- # only the default architecture (i.e. 64-bit) is supported
- if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
- message(FATAL_ERROR "Only 64-bit architecture is supported")
- endif()
+ # only the default x86_64 or arm64 are supported
+ foreach (arch IN LISTS CMAKE_OSX_ARCHITECTURES)
+ if (NOT (arch STREQUAL "x86_64" OR arch STREQUAL "arm64"))
+ message(FATAL_ERROR "Invalid arch ${arch}")
+ endif()
+ endforeach()
# configure Xcode templates
set(XCODE_TEMPLATES_ARCH "\$(NATIVE_ARCH_ACTUAL)")

60
externals/vcpkg/ports/sfml/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,60 @@
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO SFML/SFML
REF 2.5.1
HEAD_REF master
SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59
PATCHES
use-system-freetype.patch
stb_include.patch
arm64.patch
)
file(REMOVE_RECURSE "${SOURCE_PATH}/extlibs")
# Without this, we get error: list sub-command REMOVE_DUPLICATES requires list to be present.
file(MAKE_DIRECTORY "${SOURCE_PATH}/extlibs/libs")
file(WRITE "${SOURCE_PATH}/extlibs/libs/x" "")
# The embedded FindFreetype doesn't properly handle debug libraries
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/Modules/FindFreetype.cmake")
if(VCPKG_TARGET_IS_LINUX)
message(STATUS "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev libgl1-mesa-dev")
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSFML_BUILD_FRAMEWORKS=OFF
-DSFML_USE_SYSTEM_DEPS=ON
-DSFML_MISC_INSTALL_PREFIX=share/sfml
-DSFML_GENERATE_PDB=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SFML)
vcpkg_copy_pdbs()
FILE(READ "${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake" SFML_CONFIG)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
FILE(WRITE "${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake" "set(SFML_STATIC_LIBRARIES true)\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Freetype)\n${SFML_CONFIG}")
else()
FILE(WRITE "${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake" "set(SFML_STATIC_LIBRARIES false)\n${SFML_CONFIG}")
endif()
# move sfml-main to manual link dir
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib")
file(COPY "${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib/manual-link")
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib")
file(COPY "${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/manual-link")
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib")
file(GLOB FILES "${CURRENT_PACKAGES_DIR}/share/sfml/SFML*Targets-*.cmake")
foreach(FILE ${FILES})
vcpkg_replace_string("${FILE}" "/lib/sfml-main" "/lib/manual-link/sfml-main")
endforeach()
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
vcpkg_fixup_pkgconfig()
configure_file("${CMAKE_CURRENT_LIST_DIR}/usage" "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" COPYONLY)
configure_file("${SOURCE_PATH}/license.md" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)

12
externals/vcpkg/ports/sfml/stb_include.patch vendored Executable file
View File

@@ -0,0 +1,12 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,6 +188,9 @@ if(SFML_USE_SYSTEM_DEPS)
endforeach()
list(REMOVE_DUPLICATES CMAKE_IGNORE_PATH)
+
+ find_path(STB_INCLUDE_DIR stb_image.h)
+ include_directories("${STB_INCLUDE_DIR}")
endif()
# Visual C++: remove warnings regarding SL security and algorithms on pointers

7
externals/vcpkg/ports/sfml/usage vendored Executable file
View File

@@ -0,0 +1,7 @@
The package sfml provides CMake targets:
find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED)
target_link_libraries(main PRIVATE sfml-system sfml-network sfml-graphics sfml-window)
# If you want SFML to provide an implementation of main():
target_link_libraries(main PRIVATE sfml-main)

View File

@@ -0,0 +1,11 @@
--- a/src/SFML/Graphics/CMakeLists.txt
+++ b/src/SFML/Graphics/CMakeLists.txt
@@ -135,7 +135,7 @@ if(SFML_OS_ANDROID)
endif()
sfml_find_package(Freetype INCLUDE "FREETYPE_INCLUDE_DIRS" LINK "FREETYPE_LIBRARY")
-target_link_libraries(sfml-graphics PRIVATE Freetype)
+target_link_libraries(sfml-graphics PRIVATE Freetype::Freetype)
# add preprocessor symbols
target_compile_definitions(sfml-graphics PRIVATE "STBI_FAILURE_USERMSG")

24
externals/vcpkg/ports/sfml/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,24 @@
{
"name": "sfml",
"version": "2.5.1",
"port-version": 13,
"description": "Simple and fast multimedia library",
"homepage": "https://github.com/sfml/sfml",
"license": "Zlib",
"dependencies": [
"freetype",
"libflac",
"libogg",
"libvorbis",
"openal-soft",
"stb",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}