diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d2530de61..1eb5c2f13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,29 +49,38 @@ find_package(Irrlicht) # if(WIN32) - set(DATADIR "data") + set(SHAREDIR "share") set(BINDIR "bin") set(DOCDIR "doc") - set(EXAMPLE_CONF_DIR ".") + set(EXAMPLE_CONF_DIR "user") elseif(APPLE) # random placeholders - set(DATADIR "share/${PROJECT_NAME}") + set(SHAREDIR "share/${PROJECT_NAME}") set(BINDIR "bin") set(DOCDIR "share/doc/${PROJECT_NAME}") - set(EXAMPLE_CONF_DIR ".") + set(EXAMPLE_CONF_DIR ${DOCDIR}) elseif(UNIX) # Linux, BSD etc - set(DATADIR "share/${PROJECT_NAME}") - set(BINDIR "bin") - set(DOCDIR "share/doc/${PROJECT_NAME}") - set(MANDIR "share/man") - set(EXAMPLE_CONF_DIR "share/doc/${PROJECT_NAME}") - set(XDG_APPS_DIR "share/applications") - set(ICONDIR "share/icons") + if(RUN_IN_PLACE) + set(SHAREDIR "share") + set(BINDIR "bin") + set(DOCDIR "doc") + set(MANDIR "share/unix/man") + set(EXAMPLE_CONF_DIR ${DOCDIR}) + set(XDG_APPS_DIR "share/unix/applications") + set(ICONDIR "share/unix/icons") + else() + set(SHAREDIR "share/${PROJECT_NAME}") + set(BINDIR "bin") + set(DOCDIR "share/doc/${PROJECT_NAME}") + set(MANDIR "share/man") + set(EXAMPLE_CONF_DIR ${DOCDIR}) + set(XDG_APPS_DIR "share/applications") + set(ICONDIR "share/icons") + endif() endif() install(FILES "README.txt" DESTINATION "${DOCDIR}") -install(FILES "doc/changelog.txt" DESTINATION "${DOCDIR}") -install(FILES "minetest.conf.example" DESTINATION "${DOCDIR}") +install(FILES "minetest.conf.example" DESTINATION "${EXAMPLE_CONF_DIR}") if(UNIX) install(FILES "doc/minetest.6" "doc/minetestserver.6" DESTINATION "${MANDIR}/man6") |