cmake: fix bugged WEECHAT_SHAREDIR definition exposed by DATAROOTDIR rename
configure.ac defines this to /usr/share/weechat, which means scripts can load from this directory as a fallback for $HOME/.weechat/, but cmake defines this instead as /usr/share, which means system-installed fallback scripts would need to be installed to /usr/share/python/foo.py instead, and that's completely insane! Fix this discrepancy by creating a cmake define specifically for WEECHAT_SHAREDIR based on the datarootdir, just like autotools does it.
This commit is contained in:
parent
683464626d
commit
973a4b2e77
@ -70,6 +70,10 @@ if(NOT DEFINED DATAROOTDIR)
|
||||
set(DATAROOTDIR ${CMAKE_INSTALL_PREFIX}/share)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED WEECHAT_SHAREDIR)
|
||||
set(WEECHAT_SHAREDIR ${DATAROOTDIR}/weechat)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED MANDIR)
|
||||
set(MANDIR ${DATAROOTDIR}/man)
|
||||
endif()
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define PACKAGE_NAME "@PROJECT_NAME@"
|
||||
#define PACKAGE_STRING "@PKG_STRING@"
|
||||
#define WEECHAT_LIBDIR "@WEECHAT_LIBDIR@"
|
||||
#define WEECHAT_SHAREDIR "@DATAROOTDIR@"
|
||||
#define WEECHAT_SHAREDIR "@WEECHAT_SHAREDIR@"
|
||||
#define LOCALEDIR "@LOCALEDIR@"
|
||||
#define WEECHAT_HOME "@WEECHAT_HOME@"
|
||||
#define CA_FILE "@CA_FILE@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user