CMakeLists.txt: Always set data_version

Otherwise, cpack/debian.cmake would be unable to propagate the required
version for speed-dreams-data to CPACK_DEBIAN_PACKAGE_DEPENDS [1] when
SD_ASSUME_DATADIR is defined.

[1]: https://cmake.org/cmake/help/latest/cpack_gen/deb.html#variable:CPACK_DEBIAN_PACKAGE_DEPENDS
This commit is contained in:
Xavier Del Campo Romero 2025-01-17 06:25:33 +01:00
parent ae4f837d5a
commit 1e660bc583
Signed by: xavi
GPG key ID: 84FF3612A9BF43F2

View file

@ -34,6 +34,7 @@ IF(APPLE)
ENDIF(APPLE)
option(SD_ASSUME_DATADIR "Assume default directory for speed-dreams-data")
set(data_version 2.3.0)
include(GNUInstallDirs)
if(SD_ASSUME_DATADIR)
@ -48,7 +49,6 @@ elseif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/speed-dreams-data/CMakeLists.txt)
set(SD_DATADIR_ABS ${CMAKE_CURRENT_SOURCE_DIR}/speed-dreams-data/data)
message(STATUS "Data directory: ${SD_DATADIR_ABS} (in-tree)")
else()
set(data_version 2.3.0)
find_package(speed-dreams-data ${data_version} QUIET)
if(NOT SD_DATADIR)