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) diff --git a/configure b/configure index 50c4551bb..5d6f922f1 100755 --- a/configure +++ b/configure @@ -23764,7 +23764,7 @@ $SDLMAIN_DEPENDS $SDLTEST_DEPENDS __EOF__ -ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config SDL2.spec sdl2.pc" +ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc" ac_config_commands="$ac_config_commands sdl2_config" @@ -24883,6 +24883,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in:Makefile.rules" ;; "sdl2-config") CONFIG_FILES="$CONFIG_FILES sdl2-config" ;; + "sdl2-config.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config.cmake" ;; "SDL2.spec") CONFIG_FILES="$CONFIG_FILES SDL2.spec" ;; "sdl2.pc") CONFIG_FILES="$CONFIG_FILES sdl2.pc" ;; "sdl2_config") CONFIG_COMMANDS="$CONFIG_COMMANDS sdl2_config" ;; diff --git a/configure.in b/configure.in index 1339ea829..4e9cb96ea 100644 --- a/configure.in +++ b/configure.in @@ -3533,7 +3533,7 @@ $SDLTEST_DEPENDS __EOF__ AC_CONFIG_FILES([ - Makefile:Makefile.in:Makefile.rules sdl2-config SDL2.spec sdl2.pc + Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc ]) AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config]) diff --git a/sdl2-config.cmake.in b/sdl2-config.cmake.in new file mode 100644 index 000000000..c054767fd --- /dev/null +++ b/sdl2-config.cmake.in @@ -0,0 +1,10 @@ +# sdl2 cmake project-config input for ./configure scripts + +set(prefix "@prefix@") +set(exec_prefix "@exec_prefix@") +set(libdir "@libdir") +set(SDL2_PREFIX "@prefix@") +set(SDL2_EXEC_PREFIX "@prefix@") +set(SDL2_LIBDIR "@libdir@") +set(SDL2_INCLUDE_DIRS "@includedir@/SDL2") +set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")