Skip to content

Commit

Permalink
Enforce searching for our gsettings schema files first where they wer…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
gjanssens committed Dec 13, 2024
1 parent 750a50d commit 0aa46ff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gnucash/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 0aa46ff

Please sign in to comment.