You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.9 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2019-04-13 18:50:21 +0000, Leonardo wrote:
Created attachment 3749
Makes sdl2-config.cmake find the library instead of using paths produced by autotools
This is a followup to bug 2464 which added a bare sdl2-config.cmake to be used when the package is built with autotools (which is the case in most Linux distributions).
The generated sdl2-config.cmake is quite outdated in regards to what is the "modern" standard to using CMake, which is to use target_link_libraries to resolve both include and linking dependencies. It also misses linking to "mwindows" on MinGW and the .dmg version for Macintosh targets.
I took the FindSDL2.cmake flying around the internets as a starting point (specifically 1) since it always worked well enough in th past and then made it declare proper IMPORTED cmake targets.
The result is the proposed patch, which I believe fixes bug 4116 and bug 4225.
On 2019-04-13 18:53:04 +0000, Leonardo wrote:
Created attachment 3750
The sdl2-config.cmake replacement
On 2020-02-07 15:20:18 +0000, wrote:
This is not a good solution. What you wrote is a Find-Module not a config. A config should be configured to contain the correct paths as per the installation so using paths produced by autotools is fine. You can and should use variables set by configure to set the correct values in the config file.
But you are right: The config should also create an imported target SDL2::SDL2 which has everything set. The values should come from configure (see above)
The text was updated successfully, but these errors were encountered:
The sdl2-config.cmake file, generated and installed by the autotools build scripts are currently 100% functionally equivalent with the ones installed by CMakeLists.txt (and vice versa).
Also, the installedsdl2-config.cmake script + sdl2-config bash script are fully relocatable.
Which means you can move the installed sdl2 folder to whatever location you want and it keeps working.
That's one thing less buildroot has to patch.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.9
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2019-04-13 18:50:21 +0000, Leonardo wrote:
On 2019-04-13 18:53:04 +0000, Leonardo wrote:
On 2020-02-07 15:20:18 +0000, wrote:
The text was updated successfully, but these errors were encountered: