speed-dreams-data.cmake.in: Introduce SD_DATADIR_INSTALL_PREFIX

Exceptionally, in-tree builds (i.e., when speed-dreams-data is used as a
submodule) cause SD_DATADIR_ABS to not match SD_DATADIR_INSTALL_PREFIX,
since the game must look up inside the source instead of the
installation prefix.

In order to maintain consistency across configurations,
SD_DATADIR_INSTALL_PREFIX must be also defined for builds where an
installed version of speed-dreams-data is used.
This commit is contained in:
Xavier Del Campo Romero 2025-01-15 06:20:43 +01:00
parent 1d84fdcdf7
commit e2abda11a1
Signed by: xavi
GPG key ID: 84FF3612A9BF43F2

View file

@ -1,4 +1,5 @@
@PACKAGE_INIT@
set_and_check(SD_DATADIR_ABS "@PACKAGE_datadir@")
set(SD_DATADIR_INSTALL_PREFIX "${SD_DATADIR_ABS}")
set(SD_DATADIR "@datadir@")
check_required_components(speed-dreams-data)