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

250
externals/vcpkg/ports/irrlicht/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,250 @@
#
# Irrlicht 3D engine
#
cmake_minimum_required(VERSION 3.16)
project(Irrlicht LANGUAGES C CXX)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Irrlicht directories
# -------------------------------------------------------------------------------------------------
set(IRR_SRC_DIR "source/Irrlicht")
set(IRR_INC_DIR "include")
set(IRR_TOOL_DIR "tools")
# Options
# -------------------------------------------------------------------------------------------------
set(DXSDK "")
if(DEFINED ENV{DXSDK_DIR})
set(DXSDK "$ENV{DXSDK_DIR}")
endif()
set(IRR_UNICODE_PATH 0 CACHE BOOL "Whether to enable unicode path support on windows")
set(IRR_FAST_MATH 0 CACHE BOOL "Whether to enable fast maths (at the expense of precision)")
set(IRR_SHARED_LIB 1 CACHE BOOL "Whether to generate shared libraries instead of static libraries")
set(IRR_DIRECTX_SDK ${DXSDK} CACHE PATH "Path to the DirectX SDK (for DirectX 9, this folder should contain /Include, /Lib)")
set(IRR_BUILD_TOOLS 0 CACHE BOOL "Whether to generate the tools")
# Some helper functions
# -------------------------------------------------------------------------------------------------
function(glob_c_cpp_sources result folder)
file(GLOB res
"${folder}/*.c"
"${folder}/*.cpp"
"${folder}/*.h"
"${folder}/*.hpp"
"${folder}/*.rc")
set(${result} ${res} PARENT_SCOPE)
endfunction()
# Source files
# -------------------------------------------------------------------------------------------------
glob_c_cpp_sources(IRR_SRC_FILES ${IRR_SRC_DIR})
glob_c_cpp_sources(IRR_SRC_FILES_INTERFACE ${IRR_INC_DIR})
glob_c_cpp_sources(IRR_SRC_FILES_AESGLADMAN ${IRR_SRC_DIR}/aesGladman)
glob_c_cpp_sources(IRR_SRC_FILES_LZMA ${IRR_SRC_DIR}/lzma)
glob_c_cpp_sources(IRR_TOOL_FILES_FILE_TO_HEADER ${IRR_TOOL_DIR}/FileToHeader/)
glob_c_cpp_sources(IRR_TOOL_FILES_GUI_EDITOR ${IRR_TOOL_DIR}/GUIEditor/)
glob_c_cpp_sources(IRR_TOOL_FILES_FONT_TOOL ${IRR_TOOL_DIR}/IrrFontTool/newFontTool/)
glob_c_cpp_sources(IRR_TOOL_FILES_MESH_CONVERTER ${IRR_TOOL_DIR}/MeshConverter/)
if(APPLE)
file(GLOB IRR_SRC_FILES_OSX
"${IRR_SRC_DIR}/MacOSX/*.mm"
"${IRR_SRC_DIR}/MacOSX/*.h")
set(IRR_SRC_FILES ${IRR_SRC_FILES} ${IRR_SRC_FILES_OSX})
endif()
# Group files
# -------------------------------------------------------------------------------------------------
source_group(Irrlicht\\engine FILES ${IRR_SRC_FILES})
source_group(Irrlicht\\interface FILES ${IRR_SRC_FILES_INTERFACE})
source_group(Irrlicht\\libs\\aesGladman FILES ${IRR_SRC_FILES_AESGLADMAN})
source_group(Irrlicht\\libs\\lzma FILES ${IRR_SRC_FILES_LZMA})
# Library files
# -------------------------------------------------------------------------------------------------
find_package(ZLIB REQUIRED)
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
find_package(BZip2 REQUIRED)
#find_package(LIBLZMA REQUIRED) # LIBLZMA does not export _LzmaDecode
# Irrlicht target
# -------------------------------------------------------------------------------------------------
set(IRR_ALL_SRC_FILES
${IRR_SRC_FILES}
${IRR_SRC_FILES_INTERFACE}
${IRR_SRC_FILES_AESGLADMAN}
${IRR_SRC_FILES_LZMA}
)
if(${IRR_SHARED_LIB})
add_library(Irrlicht SHARED ${IRR_ALL_SRC_FILES})
else()
add_library(Irrlicht STATIC ${IRR_ALL_SRC_FILES})
endif()
if(APPLE)
target_include_directories(Irrlicht PRIVATE ${IRR_SRC_DIR}/MacOSX)
target_compile_definitions(Irrlicht PRIVATE SYSTEM=MacOSX)
target_link_libraries(Irrlicht ${OSX_LIBRARIES})
target_compile_options(Irrlicht PRIVATE "-ObjC++")
set(ADDITIONAL_LIRARIES
"-framework OpenGL"
"-framework IOKit"
"-framework Carbon"
"-framework AppKit"
"-framework Cocoa")
endif()
target_link_libraries(Irrlicht PRIVATE
${PNG_LIBRARY}
${JPEG_LIBRARY}
${ZLIB_LIBRARY}
${BZIP2_LIBRARY}
${ADDITIONAL_LIRARIES}
)
if(IRR_BUILD_TOOLS)
add_executable(FileToHeader ${IRR_TOOL_FILES_FILE_TO_HEADER})
add_executable(GUIEditor ${IRR_TOOL_FILES_GUI_EDITOR})
target_link_libraries(GUIEditor Irrlicht)
add_executable(FontTool ${IRR_TOOL_FILES_FONT_TOOL})
target_link_libraries(FontTool Irrlicht)
add_executable(MeshConverter ${IRR_TOOL_FILES_MESH_CONVERTER})
target_link_libraries(MeshConverter Irrlicht)
endif()
# Target properties (for compilation & export)
# -------------------------------------------------------------------------------------------------
target_include_directories(Irrlicht
PRIVATE ${IRR_SRC_DIR}
PRIVATE ${IRR_SRC_DIR}/aesGladman
PRIVATE ${BZIP2_INCLUDE_DIR}
PRIVATE ${JPEG_INCLUDE_DIR}
PRIVATE ${LIBPNG_INCLUDE_DIR}
PRIVATE ${IRR_SRC_DIR}/lzma
PRIVATE ${ZLIB_INCLUDE_DIR}
)
# I dont realy understand why this is necesary or what it is doing,
# but it is necesarry to build and export a package.
# See: https://cmake.org/cmake/help/v3.8/command/target_include_directories.html
target_include_directories(Irrlicht PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/irrlicht> # <prefix>/include/irrlicht
)
if(NOT ${IRR_DIRECTX_SDK} STREQUAL "")
target_include_directories(Irrlicht PRIVATE ${IRR_DIRECTX_SDK}/Include)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
set(DX_LIBS ${IRR_DIRECTX_SDK}/Lib/x86)
else()
set(DX_LIBS ${IRR_DIRECTX_SDK}/Lib/x64)
endif()
target_link_libraries(Irrlicht
PRIVATE ${DX_LIBS}/d3dx9.lib
PRIVATE ${DX_LIBS}/dinput8.lib
PRIVATE ${DX_LIBS}/dxguid.lib)
else()
target_compile_definitions(Irrlicht PRIVATE NO_IRR_COMPILE_WITH_DIRECT3D_9_)
endif()
if(NOT ${IRR_SHARED_LIB})
target_compile_definitions(Irrlicht PUBLIC _IRR_STATIC_LIB_)
endif()
# Disable Irrlicht building already provided dependencies
target_compile_definitions(Irrlicht
PRIVATE NO_IRR_USE_NON_SYSTEM_ZLIB_
PRIVATE NO_IRR_USE_NON_SYSTEM_LIB_PNG_
PRIVATE NO_IRR_USE_NON_SYSTEM_BZLIB_
PRIVATE NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
)
# Per platform config
# -------------------------------------------------------------------------------------------------
# Export symbols
target_compile_definitions(Irrlicht PRIVATE IRRLICHT_EXPORTS)
if(WIN32)
# Import the symbols of bzip2
target_compile_definitions(Irrlicht PRIVATE BZ_IMPORT)
# Disable the ton of warnings from standard library
target_compile_definitions(Irrlicht PRIVATE _CRT_SECURE_NO_WARNINGS)
# Multi processor compilation
target_compile_options(Irrlicht PRIVATE /MP)
# Unicode
if(${IRR_UNICODE_PATH})
target_compile_definitions(Irrlicht PRIVATE UNICODE _UNICODE)
target_compile_definitions(Irrlicht PUBLIC _IRR_WCHAR_FILESYSTEM)
endif()
# Fast math options
if(${IRR_FAST_MATH})
target_compile_options(Irrlicht PRIVATE /fp:fast)
message("Fast Math Enabled")
# SSE2 is automatically activated on x64
if(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
target_compile_options(Irrlicht PRIVATE /arch:SSE2)
endif()
endif()
elseif(UNIX)
# Standard mode
target_compile_options(Irrlicht
PRIVATE -Wall
PRIVATE -pipe
PRIVATE -fno-exceptions
PRIVATE -fno-strict-aliasing)
# Disable RTTI on C++ files only (no sense for C files)
set_source_files_properties(${IRR_SRC_FILES} ${IRR_SRC_FILES_AESGLADMAN}
PROPERTIES COMPILE_FLAGS -fno-rtti)
# Debug macro
target_compile_options(Irrlicht PRIVATE $<$<CONFIG:Debug>:-D_DEBUG>)
# X11 and OpenGL
if(NOT APPLE)
target_link_libraries(Irrlicht
PRIVATE X11
PRIVATE GL
PRIVATE Xxf86vm)
endif()
endif()
# Installation
# -------------------------------------------------------------------------------------------------
install(
TARGETS Irrlicht
EXPORT Irrlicht
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(FILES ${IRR_SRC_FILES_INTERFACE} DESTINATION "include/irrlicht" CONFIGURATIONS Release)
if(IRR_BUILD_TOOLS)
install(
TARGETS FileToHeader GUIEditor FontTool MeshConverter
RUNTIME DESTINATION tools/irrlicht/
CONFIGURATIONS Release
)
endif()
install(EXPORT Irrlicht FILE irrlicht-targets.cmake DESTINATION share/irrlicht)

20
externals/vcpkg/ports/irrlicht/LICENSE.txt vendored Executable file
View File

@@ -0,0 +1,20 @@
The Irrlicht Engine License
===========================
Copyright (C) 2002-2015 Nikolaus Gebhardt
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgement in the product documentation would be
appreciated but is not required.
2. Altered source versions must be clearly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

View File

@@ -0,0 +1,13 @@
diff --git a/include/Keycodes.h b/include/Keycodes.h
index e56eca1..57ab312 100644
--- a/include/Keycodes.h
+++ b/include/Keycodes.h
@@ -89,7 +89,7 @@ namespace irr
KEY_KEY_X = 0x58, // X key
KEY_KEY_Y = 0x59, // Y key
KEY_KEY_Z = 0x5A, // Z key
- KEY_LWIN = 0x5B, // Left Windows key (Microsoft<66> Natural<61> keyboard)
+ KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard)
KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard)
KEY_APPS = 0x5D, // Applications key (Natural keyboard)
KEY_SLEEP = 0x5F, // Computer Sleep key

View File

@@ -0,0 +1,28 @@
diff --git a/source/Irrlicht/CImageLoaderJPG.cpp b/source/Irrlicht/CImageLoaderJPG.cpp
index 66144326c..4ea224c24 100644
--- a/source/Irrlicht/CImageLoaderJPG.cpp
+++ b/source/Irrlicht/CImageLoaderJPG.cpp
@@ -68,7 +68,7 @@ void CImageLoaderJPG::init_source (j_decompress_ptr cinfo)
boolean CImageLoaderJPG::fill_input_buffer (j_decompress_ptr cinfo)
{
// DO NOTHING
- return 1;
+ return TRUE;
}
diff --git a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
index 53029eb45..e75b707e1 100644
--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
+++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
@@ -495,8 +495,8 @@ long GetDictionaryLong(CFDictionaryRef theDict, const void* key)
if(!CreationParams.WindowId) //load menus if standalone application
{
[[NSAutoreleasePool alloc] init];
- [NSApplication sharedApplication];
- [NSApp setDelegate:(id<NSFileManagerDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
+ [[NSApplication sharedApplication] activateIgnoringOtherApps];
+ [NSApp setDelegate:(id<NSApplicationDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
[NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]];
[NSApp finishLaunching];
}

View File

@@ -0,0 +1,12 @@
--- a/source/Irrlicht/COSOperator.cpp
+++ b/source/Irrlicht/COSOperator.cpp
@@ -11,8 +11,8 @@
#else
#include <string.h>
#include <unistd.h>
-#ifndef _IRR_SOLARIS_PLATFORM_
#include <sys/types.h>
+#ifdef _IRR_OSX_PLATFORM_
#include <sys/sysctl.h>
#endif
#endif

57
externals/vcpkg/ports/irrlicht/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,57 @@
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO irrlicht/Irrlicht%20SDK
REF 1.8/1.8.4
FILENAME "irrlicht-1.8.4.zip"
SHA512 de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1
PATCHES
fix-encoding.patch
fix-sysctl.patch
fix-osx-compilation.patch
)
if(VCPKG_TARGET_IS_LINUX)
message(
"Irrlicht currently requires the following libraries from the system package manager:
libgl1-mesa
xf86vmode
These can be installed on Ubuntu systems via sudo apt-get install libgl1-mesa-dev libxxf86vm-dev")
endif()
configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${SOURCE_PATH}/CMakeLists.txt" COPYONLY)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
unicode IRR_UNICODE_PATH
fast-fpu IRR_FAST_MATH
tools IRR_BUILD_TOOLS
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DIRR_SHARED_LIB=${SHARED_LIB}
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
if("tools" IN_LIST FEATURES)
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/irrlicht/")
endif()
file(WRITE "${CURRENT_PACKAGES_DIR}/share/irrlicht/irrlicht-config.cmake" "include(\${CMAKE_CURRENT_LIST_DIR}/irrlicht-targets.cmake)")
vcpkg_copy_pdbs()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/irrlicht")
endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@@ -0,0 +1,11 @@
_find_package(${ARGS})
find_package(ZLIB REQUIRED)
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
find_package(BZip2 REQUIRED)
if(TARGET Irrlicht::Irrlicht)
set_property(TARGET Irrlicht::Irrlicht APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB PNG::PNG JPEG::JPEG BZip2::BZip2)
endif()
if(IRRLICHT_LIBRARIES)
list(APPEND IRRLICHT_LIBRARIES ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${BZIP2_LIBRARIES})
endif()

27
externals/vcpkg/ports/irrlicht/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,27 @@
{
"name": "irrlicht",
"version-string": "1.8.4",
"port-version": 13,
"description": "The Irrlicht Engine is an open source realtime 3D engine written in C++. It is cross-platform, using D3D, OpenGL and its own software renderers.",
"homepage": "http://irrlicht.sourceforge.net",
"supports": "!(arm | uwp)",
"dependencies": [
"bzip2",
"libjpeg-turbo",
"libpng",
"vcpkg-cmake",
"vcpkg-cmake-config",
"zlib"
],
"features": {
"fast-fpu": {
"description": "Enable fast maths (at the expense of precision)"
},
"tools": {
"description": "Build the Tools FileToHeader, FontTool, GUIEditor and MeshConverter"
},
"unicode": {
"description": "Support unicode path on windows"
}
}
}