From 6670870aa3a426df0e46a5110f10cb6388ff77ff Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Sat, 18 May 2024 10:27:54 +0200 Subject: [PATCH] Cmake build: Set LYX_DATA_SUBDIR in cache unconditionaly The value is wrong if CMakeCache.txt already exists and the version is changed inside configure.ac in AC_INIT() --- CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a843029f2..228ef34a2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -580,12 +580,10 @@ endif() -if(NOT LYX_DATA_SUBDIR) - if (WIN32) - set(LYX_DATA_SUBDIR "Resources/" CACHE STRING "Subdirectory for all lyx-system-data" FORCE) - else() - set(LYX_DATA_SUBDIR "share/${_lyx}/" CACHE STRING "Subdirectory for all lyx-system-data" FORCE) - endif() +if (WIN32) + set(LYX_DATA_SUBDIR "Resources/" CACHE STRING "Subdirectory for all lyx-system-data" FORCE) +else() + set(LYX_DATA_SUBDIR "share/${_lyx}/" CACHE STRING "Subdirectory for all lyx-system-data" FORCE) endif() set(LYX_ABS_INSTALLED_DATADIR "${CMAKE_INSTALL_PREFIX}/${LYX_DATA_SUBDIR}")