[Pkg-owncloud-commits] [owncloud-client] 409/498: cmake: rather use SHAREDIR than DATADIR define.

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 6992631c4c649d7068378d19569fe6191c2d5862
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Jul 30 16:37:22 2015 +0200

    cmake: rather use SHAREDIR than DATADIR define.
    
    DATADIR is a reserved structure name in win32, using it like us here
    leads to very nifty compile problems. SHAREDIR is clean.
---
 CMakeLists.txt          | 4 ++++
 config.h.in             | 2 +-
 src/gui/application.cpp | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eed4fd5..5226ef7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,10 @@ message(STATUS "GIT_SHA1 ${GIT_SHA1}")
 
 set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
 set(DATADIR ${DATA_INSTALL_DIR})
+if(WIN32)
+set(DATADIR "share")
+endif(WIN32)
+set(SHAREDIR ${DATADIR})
 
 #####
 ## handle BUILD_OWNCLOUD_OSX_BUNDLE
diff --git a/config.h.in b/config.h.in
index a3e04ed..4633c16 100644
--- a/config.h.in
+++ b/config.h.in
@@ -21,7 +21,7 @@
 #cmakedefine ZLIB_FOUND @ZLIB_FOUND@
 
 #cmakedefine SYSCONFDIR "@SYSCONFDIR@"
-#cmakedefine DATADIR "@DATADIR@"
+#cmakedefine SHAREDIR "@SHAREDIR@"
 
 #ifndef NEON_WITH_LFS
 #cmakedefine NEON_WITH_LFS "@NEON_WITH_LFS@"
diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index ae3b1fd..34eb533 100644
--- a/src/gui/application.cpp
+++ b/src/gui/application.cpp
@@ -76,7 +76,7 @@ QString applicationTrPath()
 #elif defined(Q_OS_MAC)
     return QApplication::applicationDirPath()+QLatin1String("/../Resources/Translations"); // path defaults to app dir.
 #elif defined(Q_OS_UNIX)
-    return QString::fromLatin1(DATADIR "/" APPLICATION_EXECUTABLE "/i18n/");
+    return QString::fromLatin1(SHAREDIR "/" APPLICATION_EXECUTABLE "/i18n/");
 #endif
 }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list