mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
Use CMake's GNUInstallDirs for install directories on Unix (#11636)
This makes the installation process honor system-specific directories (e.g. ${PREFIX}/man instead of ${PREFIX}/share/man on BSD).
This commit is contained in:
parent
bc7d05581b
commit
2dc73d239a
@ -135,15 +135,16 @@ elseif(UNIX) # Linux, BSD etc
|
|||||||
set(ICONDIR "unix/icons")
|
set(ICONDIR "unix/icons")
|
||||||
set(LOCALEDIR "locale")
|
set(LOCALEDIR "locale")
|
||||||
else()
|
else()
|
||||||
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
|
include(GNUInstallDirs)
|
||||||
set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
|
set(SHAREDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}")
|
||||||
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/${PROJECT_NAME}")
|
set(BINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
|
||||||
set(MANDIR "${CMAKE_INSTALL_PREFIX}/share/man")
|
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}")
|
||||||
|
set(MANDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}")
|
||||||
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
set(EXAMPLE_CONF_DIR ${DOCDIR})
|
||||||
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/share/applications")
|
set(XDG_APPS_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/applications")
|
||||||
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
|
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/metainfo")
|
||||||
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
|
set(ICONDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/icons")
|
||||||
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
|
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LOCALEDIR}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user