cmake_minimum_required (VERSION 2.8)
message ("-- Configuring man pages")
set (man_FILES task-color.5 task-faq.5 task-sync.5 task-tutorial.5 task.1 taskrc.5)
foreach (man_FILE ${man_FILES})
  configure_file (
    ${CMAKE_CURRENT_SOURCE_DIR}/man/${man_FILE}.in
    ${CMAKE_CURRENT_SOURCE_DIR}/man/${man_FILE})
endforeach (man_FILE)

install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/   DESTINATION ${TASK_MAN1DIR}
                                                      FILES_MATCHING PATTERN "*.1")
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/   DESTINATION ${TASK_MAN5DIR}
                                                      FILES_MATCHING PATTERN "*.5")
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/rc     DESTINATION ${TASK_DOCDIR})

install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/ref/task-ref.pdf DESTINATION ${TASK_DOCDIR})

cmake_minimum_required (VERSION 2.8)
message ("-- Configuring man pages")
set (man_FILES task-color.5 task-faq.5 task-sync.5 task-tutorial.5 task.1 taskrc.5)
foreach (man_FILE ${man_FILES})
  configure_file (
    man/${man_FILE}.in
    man/${man_FILE})
endforeach (man_FILE)

install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/   DESTINATION ${TASK_MAN1DIR}
                                                      FILES_MATCHING PATTERN "*.1")
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man/   DESTINATION ${TASK_MAN5DIR}
                                                      FILES_MATCHING PATTERN "*.5")
install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/rc     DESTINATION ${TASK_DOCDIR})

install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/ref/task-ref.pdf DESTINATION ${TASK_DOCDIR})

Revert "Fix: manpages were not installed when running an out-of-source build"
Revert "Fix: manpages were not installed when running an out-of-source build"

This reverts commit 9395a4d112722c063868b481664134b7ac18c9b4.
