mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
fix: define PROGRAM_DATA_DIR for cmake
* the PROGRAM_DATA_DIR is hardcoded path to /usr/share/goldendict * Without it, resources cannot be loaded
This commit is contained in:
parent
87e2091214
commit
849b1345e1
|
@ -95,6 +95,11 @@ endif ()
|
|||
# Note: used as c++ string thus need surrounding " "
|
||||
add_compile_definitions(PROGRAM_VERSION="${PROJECT_VERSION}")
|
||||
|
||||
if (LINUX)
|
||||
# see: config.cc -> getProgramDataDir
|
||||
add_compile_definitions(PROGRAM_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/goldendict")
|
||||
endif ()
|
||||
|
||||
target_link_libraries(${GOLDENDICT} PRIVATE
|
||||
Qt6::Xml
|
||||
Qt6::Concurrent
|
||||
|
|
|
@ -2276,7 +2276,7 @@ QString getProgramDataDir() noexcept
|
|||
{
|
||||
if ( isPortableVersion() )
|
||||
return QCoreApplication::applicationDirPath();
|
||||
|
||||
// TODO: rewrite this in QStandardPaths::AppDataLocation
|
||||
#ifdef PROGRAM_DATA_DIR
|
||||
return PROGRAM_DATA_DIR;
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue