From d435dedb898c7d268dfea3504a38a2cd9998bdb2 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 8 Jan 2011 17:45:26 +0200 Subject: doc updates; CMake works reasonably well now. --- CMakeLists.txt | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 24cb78f39..1ea10268a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,10 +29,32 @@ MESSAGE(STATUS "BUILD_DATE = ${BUILD_DATE}") # This is done here so that relative search paths are more reasnable find_package(Irrlicht) -# This way the CMakeLists.txt file in src/ is processed -add_subdirectory(src) +# +# Installation +# + +if(WIN32) + set(DATADIR "data") + set(BINDIR "bin") + set(DOCDIR "doc") +elseif(APPLE) + set(DATADIR "share/minetest") + set(BINDIR "bin") + set(DOCDIR "share/doc/minetest") +elseif(UNIX) + set(DATADIR "share/minetest") + set(BINDIR "bin") + set(DOCDIR "share/doc/minetest") +endif() + +install(FILES "doc/README.txt" DESTINATION "${DOCDIR}") +install(FILES "minetest.conf.example" DESTINATION "${DOCDIR}") -install(FILES "doc/README.txt" DESTINATION "share/minetest/doc") +# +# Subdirectories +# + +add_subdirectory(src) # CPack -- cgit v1.2.3