Conversation
Implementation is based off SDL2_Image.
madebr
left a comment
There was a problem hiding this comment.
Do you intend to add CMake to the GitHub workflows?
Changes link flags to fix mingw builds. `showinterfaces` is disabled on MSVC workflow as the minimum version of SDL is too old for current MSVCRT and gives linker errors even when linking `legacy_stdio_definitions.lib`
|
Thank you for your review!
I went ahead and added them in 553058d. |
|
Thank you for adding them! |
|
I was testing with SDL2.0.0 as it is the minimum compatible version. The two errors I was getting were undefined references in
Linking to On the other hand, bumping the version to SDL2.0.4 fixes this issue altogether. |
|
That sounds credible. This is what msdn has to say about this:
So yeah, good call to just ignore the problem until we update the minimum required SDL version (which is unlikely to happen anytime soon). |
Is this issue with linkage of showinterfaces test program? AFAIK, it is a console-only |
Only set `Compatible Interface Properties` for shared libraries. Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
madebr
left a comment
There was a problem hiding this comment.
Thanks for investing your time into this!
This removes the need for SDL2main as it is a console-only application. MSVC workflow now builds showinterfaces.
Thank you for the suggestion, it worked like a charm! |
The `mingw32` library is no longer needed as `showinterfaces` is a console app. Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Applied review suggestion to use `target_compile_options`. Replaced `/wd4996` as `_WINSOCK_DEPRECATED_NO_WARNINGS` is enough. Raise the warning level to `/W3` to be consistent with the solution in `VisualC/`.
This is the right solution here. SDL_net shouldn't be held back to SDL 2.0.0. |
- Set a different output name for static libraries on MSVC and WATCOM (cf. libsdl-org/SDL_image#275 and libsdl-org/SDL#5727) - Fix `PKG_PREFIX` on Windows (cf. libsdl-org/SDL_image#274) Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
|
@madebr, feel free to merge this and/or incorporate the changes into your other SDL library work. |
SDL_net does not build any dependency, so we don't need to force position independent code.
|
Thus far, this PR looks very good! What is missing here is generation of cmake config scripts by the autotools toolchain. The SDL_ttf pr has the missing bits I mentioned above that you would need to adapt to SDL_net. Are you willing to look into this, or do you prefer to merge and let me finish it? Thanks! |
|
Thank you for your comment! I'm going to look into it and I'll let you know how it goes. I'm away from my main machine currently, so I can only really test autotools and Apple's Framework integration. I'll try to grab mingw binaries when I get the opportunity to test it out. |
madebr
left a comment
There was a problem hiding this comment.
I've created FtZPetruska#2 with fixes to the build.
Fix option de-duplication issues when linking with SDL2 framework. Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
This is necessary if the framework has a space in its path.
As mentionned in libsdl-org/SDL_net#48 and libsdl-org/SDL_ttf#213: - Options needs to use `SHELL:` to avoid aggressive option de-duplication - Framework path needs to be quoted to support paths with spaces.
As mentionned in libsdl-org/SDL_net#48 and libsdl-org/SDL_ttf#213: - Options needs to use `SHELL:` to avoid aggressive option de-duplication - Framework path needs to be quoted to support paths with spaces.
Fix name mismatch between the bundled CMake config file for mingw and the generated config. Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Fix regex match. Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
|
@madebr, feel free to merge this when ready. |
No longer set PKG_PREFIX on macOS. Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
|
Thanks @FtZPetruska ! |
Description
This PR adds support CMake, based on SDL2_image's CMakeLists.
This is a follow-up to #37 which was lacking many features (incomplete
Configfile, missing FindSDL2 helpers, etc.).Additionally, the
showinterfacesprogram is supported.Existing issues
Addresses #33.