From 229c2f8f5fea9e567fe6e6916a9bf9a73f247394 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 14 Feb 2020 13:37:32 -0500 Subject: [PATCH] cmake: Add PACKAGE_VERSION and SDL2_VERSION to sdl2-config.cmake.in Fixes Bugzilla #4970. --- configure | 14 +++++++++++++- sdl2-config.cmake.in | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 9ef0404fd..b3ddeaa0e 100755 --- a/configure +++ b/configure @@ -769,6 +769,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -979,6 +980,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1231,6 +1233,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1368,7 +1379,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1521,6 +1532,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] diff --git a/sdl2-config.cmake.in b/sdl2-config.cmake.in index 03efbe174..c3a7ad8d1 100644 --- a/sdl2-config.cmake.in +++ b/sdl2-config.cmake.in @@ -3,6 +3,8 @@ set(prefix "@prefix@") set(exec_prefix "@exec_prefix@") set(libdir "@libdir@") +set(PACKAGE_VERSION "@SDL_VERSION@") +set(SDL2_VERSION "@SDL_VERSION@") set(SDL2_PREFIX "@prefix@") set(SDL2_EXEC_PREFIX "@prefix@") set(SDL2_LIBDIR "@libdir@")