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.3 Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2014-03-26 03:47:53 +0000, Leonardo wrote:
Despite having a CMakeLists.txt file, SDL2 seems to be mainly built using the autotools system by package-managers. It is nice to have it but it is only useful if you are building SDL2 by yourself.
People that want to use CMake to find their already-installed SDL2 are using a FindSDL2.cmake module based on the old FindSDL.cmake. This is not deprecated but it is discouraged by the CMake devs (see http://www.cmake.org/Bug/view.php?id=14826), as these modules needs maintainers to be included in the official CMake installation.
I could have done this myself and submitted a patch but I don't have any skills with autotools. It seems to me that the variables we need to configure are somewhat the same in sdl2.pc.in, so maybe ./configure can do it?
Thanks in advance.
On 2014-03-26 03:53:13 +0000, Leonardo wrote:
We would also need a sdl2-version.cmake, but I think that would be as easy as sdl2-config.cmake to configure.
The links I provided have more information on them.
On 2014-04-06 19:37:33 +0000, Leonardo wrote:
Created attachment 1607
Configure and install sdl2-config.cmake
On 2014-04-06 19:38:04 +0000, Leonardo wrote:
Created attachment 1608
Input file for generating sdl2-config.cmake
On 2014-04-06 19:39:32 +0000, Leonardo wrote:
Here is a basic sdl2-config.cmake.in and a changeset that configures and installs it.
I've tested with cmake --find-package mode and it is properly working.
There is a way of producing a sdl2-config.cmake that is prefix-independent, but since users are already relying on pkgconfig (which is prefix-bound), I am not sure if its a good idea.
On 2014-07-13 22:30:28 +0000, Jean-Pierre Gygax wrote:
I support this request (thanks, Leonardo, for bringing this up). but I do have a related suggestion/question.
I'm still a beginner with CMake, so it's quite possible that I'm misunderstanding something here. However, in one of my own projects, I have used the following combination to make my library available to other CMake projects without having to use the install() commands:
I made this work through much experimentation. But unless I made some mistake, this is the simplest way to mesh together CMake-based projects.
(I'm using CMake 3.0 btw, having started using CMake very recently.)
On 2014-07-15 20:05:15 +0000, Leonardo wrote:
(In reply to Jean-Pierre Gygax from comment # 5)
I support this request (thanks, Leonardo, for bringing this up). but I do
have a related suggestion/question.
I'm still a beginner with CMake, so it's quite possible that I'm
misunderstanding something here. However, in one of my own projects, I have
used the following combination to make my library available to other CMake
projects without having to use the install() commands:
I made this work through much experimentation. But unless I made some
mistake, this is the simplest way to mesh together CMake-based projects.
(I'm using CMake 3.0 btw, having started using CMake very recently.)
Well, that also works, but both of your projects are using CMake already and built using them as build system. SDL2, most of the time (including major distro builds) is built using autotools, which doesn't create the files created by the export() commands you mentioned.
This patch address that by having a file that can be configured and installed by the autotools system, making it easly available to CMake projects.
I appreciate your support :)
On 2014-07-15 20:12:02 +0000, Jean-Pierre Gygax wrote:
Thanks for the response. What I meant was: why not use this method instead of creating config (and possibly version) files?
On 2015-05-07 13:29:45 +0000, Daniel Gibson wrote:
using SDL2 in programs using cmake is a pain currently (because everyone has to ship a hacked FindSDL2.cmake).
this patch should improve the situation, so I hope it gets merged
On 2015-05-08 20:11:58 +0000, Martin Gerhardy wrote:
+1 from my side, too. it would make my life a lot easier.
On 2015-06-29 14:25:20 +0000, Jan Henke wrote:
This is really needed. CMake is the tool of choice for many consumers of SDL2, while at the same time on of few major projects not providing a out-of-the-box way to configure CMake. Please consider inclusion of this patch.
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.3
Reported for operating system, platform: Linux, x86_64
Comments on the original bug report:
On 2014-03-26 03:47:53 +0000, Leonardo wrote:
On 2014-03-26 03:53:13 +0000, Leonardo wrote:
On 2014-04-06 19:37:33 +0000, Leonardo wrote:
On 2014-04-06 19:38:04 +0000, Leonardo wrote:
On 2014-04-06 19:39:32 +0000, Leonardo wrote:
On 2014-07-13 22:30:28 +0000, Jean-Pierre Gygax wrote:
On 2014-07-15 20:05:15 +0000, Leonardo wrote:
On 2014-07-15 20:12:02 +0000, Jean-Pierre Gygax wrote:
On 2015-05-07 13:29:45 +0000, Daniel Gibson wrote:
On 2015-05-08 20:11:58 +0000, Martin Gerhardy wrote:
On 2015-06-29 14:25:20 +0000, Jan Henke wrote:
On 2015-06-30 05:24:31 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: