Enforce searching for our gsettings schema files first where they were installed

This was not done when the installation prefix
was /usr or /usr/local which could potentially
cause gnucash to find other schema files first.
This commit is contained in:
Geert Janssens 2024-12-13 20:26:31 +01:00
parent 750a50dd18
commit 0aa46ff131

View File

@ -209,10 +209,9 @@ set(XDG_TEXT "
# and gsettings schema are found.\n"
)
if (NOT(${CMAKE_INSTALL_FULL_DATADIR} STREQUAL "/usr/share") AND NOT(${CMAKE_INSTALL_FULL_DATADIR} STREQUAL "/usr/local/share"))
file(APPEND ${ENV_FILE_OUT} ${XDG_TEXT})
file(APPEND ${ENV_FILE_OUT} "XDG_DATA_DIRS={GNC_HOME}/share;{XDG_DATA_DIRS};" "${GNC_SYSTEM_XDG_DATA_DIRS}\n")
endif()
file(APPEND ${ENV_FILE_OUT} ${XDG_TEXT})
file(APPEND ${ENV_FILE_OUT} "XDG_DATA_DIRS={GNC_HOME}/share;{XDG_DATA_DIRS};" "${GNC_SYSTEM_XDG_DATA_DIRS}\n")
file(APPEND ${BUILD_ENV_FILE_OUT} ${XDG_TEXT})
file(APPEND ${BUILD_ENV_FILE_OUT} "XDG_DATA_DIRS=${DATADIR_BUILD};{XDG_DATA_DIRS};" "${GNC_SYSTEM_XDG_DATA_DIRS}\n")