diff options
author | Sam Lantinga <slouken@libsdl.org> | 2015-06-29 22:24:00 -0700 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2015-06-29 22:24:00 -0700 |
commit | b558f4b75922ed3834973d0659b067acf02186d8 (patch) | |
tree | 78aa43e4a116547b08f2247e95a93a9a4eb4ccc8 /Makefile.in | |
parent | 6bcae0cfc3e0b67a9b732eaf2d9685f7ae6ed613 (diff) | |
download | sdl-b558f4b75922ed3834973d0659b067acf02186d8.tar.gz |
Fixed bug 2464 - Configure a sdl2-config.cmake.in together with sdl2.pc.in
Leonardo
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.
To fix that, SDL and its accompanying libraries could configure a simple sdl2-config.cmake file, much like it does with sdl2.pc.in. We don't need to configure a full sdl2-config.cmake as in this post, http://forums.libsdl.org/viewtopic.php?t=10068&sid=ccf8abbf0d73fb03ae9cded991e60959 (because it depends on it being built with CMake). Using something as simple as http://www.cmake.org/Wiki/CMake/Tutorials/Packaging#Package_Configuration_Files is deemed enough. Here is another: http://quickgit.kde.org/?p=prison.git&a=blob&f=lib%2Fprison%2FPrisonConfig.cmake.in
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index ef633521a..c647d5f4c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -176,6 +176,8 @@ install-data: $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4 $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig $(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig + $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2 + $(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data uninstall-bin: @@ -194,6 +196,7 @@ uninstall-lib: uninstall-data: rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4 rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc + rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake clean: rm -rf $(objects) |