Skip to content

Commit

Permalink
cmake: rather use SHAREDIR than DATADIR define.
Browse files Browse the repository at this point in the history
DATADIR is a reserved structure name in win32, using it like us here
leads to very nifty compile problems. SHAREDIR is clean.
  • Loading branch information
Klaas Freitag committed Jul 30, 2015
1 parent 7fc7925 commit 6992631
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@"
Expand Down
2 changes: 1 addition & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 6992631

Please sign in to comment.