cmake: tweak manpage install location
authorWouter van Kesteren <woutershep@gmail.com>
Mon, 9 Nov 2015 20:57:41 +0000 (21:57 +0100)
committerWouter van Kesteren <woutershep@gmail.com>
Mon, 9 Nov 2015 20:57:41 +0000 (21:57 +0100)
This patch is needed when wanting to install binaries/libraries to other
locations than data. The linux distro Exherbo installs binaries and
libraries to /usr/<chost>/bin, /usr/<chost>/lib respectively but
manpages should still go in /usr/share/man/ because they are
architecture independent, without this patch they go in
/usr/<chost>/share/man unconditionally.

cmake documentation states:
DATAROOTDIR - read-only architecture-independent data root (share)

So this patch makes it use that so that its configurable.

client/X11/CMakeLists.txt

index 621ee9a..3c0b1c6 100644 (file)
@@ -111,7 +111,7 @@ if(WITH_MANPAGES)
                if(OPENBSD)
                install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xfreerdp.1 DESTINATION man/man1)
                else()
-               install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xfreerdp.1 DESTINATION share/man/man1)
+               install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xfreerdp.1 DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man/man1)
                endif()
        else()
                message(WARNING "WITH_MANPAGES was set, but xsltproc was not found. man-pages will not be installed")