-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: Adds native dependencies for win-arm64 #2644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| For win-arm64: Use https://github.com/azeno/FFmpeg/tree/win-arm64, it's based on release/3.4 |
Git LFS file not shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 5c302b2..aa06919 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -1,3 +1,5 @@ | ||
| +cmake_minimum_required(VERSION 3.30) | ||
| + | ||
| project(FreeImage) | ||
|
|
||
| set(FreeImage_SOURCES | ||
| @@ -30,9 +32,17 @@ include_directories(Source/LibJXR/common/include) | ||
| include_directories(Source/LibJXR/image/sys) | ||
| include_directories(Source/LibJXR/jxrgluelib) | ||
|
|
||
| -add_definitions(-DOPJ_STATIC -DNO_WINDOWS -DNO_LCMS -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -DLIBRAW_NODLL -DLIBRAW_LIBRARY_BUILD -DFREEIMAGE_LIB -DNO_LCMS) | ||
| -add_library(FreeImage STATIC ${FreeImage_SOURCES}) | ||
| -install_dep(FreeImage include Source/FreeImage.h) | ||
| +add_definitions(-DOPJ_STATIC -DNO_WINDOWS -DNO_LCMS -D__ANSI__ -DDISABLE_PERF_MEASUREMENT -DLIBRAW_NODLL -DLIBRAW_LIBRARY_BUILD -DNO_LCMS) | ||
| +add_library(FreeImage SHARED ${FreeImage_SOURCES}) | ||
| +# install_dep(FreeImage include Source/FreeImage.h) | ||
| + | ||
| +# Set C++ standard | ||
| +if (DEFINED C_STANDARD) | ||
| + set(CMAKE_C_STANDARD ${C_STANDARD}) | ||
| +endif() | ||
| +if (DEFINED CPP_STANDARD) | ||
| + set(CMAKE_CXX_STANDARD ${CPP_STANDARD}) | ||
| +endif() | ||
|
|
||
| if (APPLE) | ||
| set_target_properties(FreeImage PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO") | ||
| @@ -42,6 +52,11 @@ if (APPLE) | ||
| endif() | ||
| endif() | ||
|
|
||
| +# Enable Multi-core compilation in MSVC | ||
| +if (MSVC) | ||
| + target_compile_options(${PROJECT_NAME} PRIVATE /MP) | ||
| +endif() | ||
| + | ||
| set(FreeImage_INCLUDE_DIR "${FreeImage_SOURCE_DIR}/Source" CACHE PATH "" FORCE) | ||
| set(FreeImage_LIBRARY_DBG FreeImage CACHE STRING "" FORCE) | ||
| set(FreeImage_LIBRARY_REL FreeImage CACHE STRING "" FORCE) | ||
| diff --git a/Source/DeprecationManager/DeprecationMgr.h b/Source/DeprecationManager/DeprecationMgr.h | ||
| index 9141f23..c3926cc 100644 | ||
| --- a/Source/DeprecationManager/DeprecationMgr.h | ||
| +++ b/Source/DeprecationManager/DeprecationMgr.h | ||
| @@ -30,7 +30,7 @@ | ||
|
|
||
| // ========================================================== | ||
|
|
||
| -#if !defined(_M_X64) && defined(_MSC_VER) | ||
| +#if !(defined(_M_X64) || defined(_M_ARM64)) && defined(_MSC_VER) | ||
| #define DEPRECATE(a,b) \ | ||
| { \ | ||
| void *fptr; \ | ||
| diff --git a/Source/LibJXR/image/sys/ansi.h b/Source/LibJXR/image/sys/ansi.h | ||
| index 2927b05..334d196 100644 | ||
| --- a/Source/LibJXR/image/sys/ansi.h | ||
| +++ b/Source/LibJXR/image/sys/ansi.h | ||
| @@ -1,14 +1,14 @@ | ||
| //*@@@+++@@@@****************************************************************** | ||
| // | ||
| -// Copyright � Microsoft Corp. | ||
| +// Copyright © Microsoft Corp. | ||
| // All rights reserved. | ||
| // | ||
| // Redistribution and use in source and binary forms, with or without | ||
| // modification, are permitted provided that the following conditions are met: | ||
| // | ||
| -// � Redistributions of source code must retain the above copyright notice, | ||
| +// • Redistributions of source code must retain the above copyright notice, | ||
| // this list of conditions and the following disclaimer. | ||
| -// � Redistributions in binary form must reproduce the above copyright notice, | ||
| +// • Redistributions in binary form must reproduce the above copyright notice, | ||
| // this list of conditions and the following disclaimer in the documentation | ||
| // and/or other materials provided with the distribution. | ||
| // | ||
| @@ -44,7 +44,7 @@ | ||
| //================================ | ||
| #define FORCE_INLINE | ||
| #define CDECL | ||
| -#if __LP64__ | ||
| +#if defined(__LP64__) || defined(_WIN64) | ||
| #define UINTPTR_T unsigned long long | ||
| #define INTPTR_T long long | ||
| #else | ||
| diff --git a/Source/LibJXR/image/sys/strcodec.h b/Source/LibJXR/image/sys/strcodec.h | ||
| index ba3df4e..f727d4e 100644 | ||
| --- a/Source/LibJXR/image/sys/strcodec.h | ||
| +++ b/Source/LibJXR/image/sys/strcodec.h | ||
| @@ -1,14 +1,14 @@ | ||
| //*@@@+++@@@@****************************************************************** | ||
| // | ||
| -// Copyright � Microsoft Corp. | ||
| +// Copyright © Microsoft Corp. | ||
| // All rights reserved. | ||
| // | ||
| // Redistribution and use in source and binary forms, with or without | ||
| // modification, are permitted provided that the following conditions are met: | ||
| // | ||
| -// � Redistributions of source code must retain the above copyright notice, | ||
| +// • Redistributions of source code must retain the above copyright notice, | ||
| // this list of conditions and the following disclaimer. | ||
| -// � Redistributions in binary form must reproduce the above copyright notice, | ||
| +// • Redistributions in binary form must reproduce the above copyright notice, | ||
| // this list of conditions and the following disclaimer in the documentation | ||
| // and/or other materials provided with the distribution. | ||
| // | ||
| diff --git a/Source/LibTIFF4/tif_config.h b/Source/LibTIFF4/tif_config.h | ||
| index 64391b8..3027b83 100644 | ||
| --- a/Source/LibTIFF4/tif_config.h | ||
| +++ b/Source/LibTIFF4/tif_config.h | ||
| @@ -81,7 +81,10 @@ If your big endian system isn't being detected, add an OS specific check | ||
| #endif // BYTE_ORDER | ||
|
|
||
| #ifdef _WIN32 | ||
| +/* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */ | ||
| +#if defined(_MSC_VER) && (_MSC_VER < 1900) | ||
| #define snprintf _snprintf | ||
| +#endif // _MSC_VER | ||
| #define lfind _lfind | ||
| #endif // _WIN32 | ||
|
|
||
| diff --git a/Source/OpenEXR/IlmImf/ImfAttribute.cpp b/Source/OpenEXR/IlmImf/ImfAttribute.cpp | ||
| index feb5f83..3d601fc 100644 | ||
| --- a/Source/OpenEXR/IlmImf/ImfAttribute.cpp | ||
| +++ b/Source/OpenEXR/IlmImf/ImfAttribute.cpp | ||
| @@ -61,12 +61,11 @@ Attribute::~Attribute () {} | ||
|
|
||
| namespace { | ||
|
|
||
| -struct NameCompare: std::binary_function <const char *, const char *, bool> | ||
| +struct NameCompare | ||
| { | ||
| - bool | ||
| - operator () (const char *x, const char *y) const | ||
| + bool operator () (const char *x, const char *y) const | ||
| { | ||
| - return strcmp (x, y) < 0; | ||
| + return strcmp(x, y) < 0; | ||
| } | ||
| }; | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| @echo OFF | ||
| setlocal | ||
| set HOME=%USERPROFILE% | ||
| CALL ..\find_git.cmd | ||
| IF NOT ERRORLEVEL 0 ( | ||
| ECHO "Could not find git.exe" | ||
| EXIT /B %ERRORLEVEL% | ||
| ) | ||
| %GIT_CMD% clone https://github.com/danoli3/FreeImage.git %~dp0..\..\externals\FreeImage | ||
| pushd %~dp0..\..\externals\FreeImage | ||
| %GIT_CMD% checkout 3.16.0 | ||
| %GIT_CMD% apply ..\..\deps\freeimage\build-fix.patch | ||
| popd | ||
| if NOT ERRORLEVEL 0 pause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!