forked from AviSynth/AviSynthPlus
-
Notifications
You must be signed in to change notification settings - Fork 24
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
An assortment of GCC and CMake fixes and enhancements #27
Merged
Conversation
This file contains 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
qyot27
commented
Mar 16, 2019
- The patch from pull request DirectShowSource: Sensible defaults for CMake baseclasses lib, removed dx include path #9 has been updated to work with the current HEAD
- The convolution and histogram fixes are included.
- A good chunk are mostly intended to make it easier for MinGW-w64 cross-compiling, from case sensitivity to tidying up parts of the relevant CMakeLists.txt to facilitating better use of Ninja.
- Some warnings are now silenced.
- capi.h protected against the MSVC/GCC problem; defaults to MSVC-style mainstream use (resulting in 32-bit GCC builds not working with external programs like FFmpeg), but provides AVSC_WIN32_GCC32 define so projects like FFmpeg can switch to the alternate behavior.
- PluginDir+GCC registry entry added, so that GCC builds can be if-deffed to ignore plugins for MSVC builds, as well as have their own plugin directories. This way, GCC and MSVC builds can co-exist without hassling each other.
…d dx include path
'Imagehlp.h' exists in MinGW, as 'imagehlp.h'. Windows is case insensitive, so it doesn't care about the case of the filename, but 'Imagehlp.h' will cause a failure when crosscompiling from a case sensitive system like Linux or OSX.
If a program that talks to the C-interface uses the GCC compliant header, it becomes unable to use MSVC builds of AviSynth+. But to build with GCC, those changes are necessary. Guard against this by wrapping the change in a BUILDING_AVSCORE ifdef block so that client programs will use the old calling conventions. Unfortunately, this comes with the caveat that 32-bit GCC builds of AviSynth+ will not work with the client program. 64-bit GCC builds are unaffected.
Fixes building when using Ninja as the generator. Since Ninja relies on the regular install rules, the copy operations for regular VS usage remain MSVC_IDE.
This is a quick-and-dirty way of working around this issue. A better solution would be a header/source combination that defines our own secure functions if Windows doesn't provide them. The problem with MinGW-w64, though, is that the presence of the Secure API causes other compatibility issues to be pervasive.
Still defaults to SSE2, but can now be set higher or lower when configuring, instead of hand-editing CMakeLists.txt.
The better way to accomplish this would be to detect it at runtime and simply not autoload those plugins if the compiler for AviSynth itself doesn't match it, but this is the next best option. This commit simply tells GCC builds of AviSynth to use the value of the PluginDir+GCC registry entry to find plugins, and ignore PluginDir and PluginDir+. Vice-versa for MSVC builds. C plugins are an exception to this, since those can be loaded with either MSVC- or GCC-built AviSynth+. I'd suggest either having duplicate copies, or using symbolic links for those.
Fixes a build error due to the use of uint16_t
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.