From e4772783d05d0af39b8a3e90f585ac775b3fb61c Mon Sep 17 00:00:00 2001 From: kkkunche Date: Tue, 18 Jun 2019 21:48:29 +0530 Subject: [PATCH] Correct the man page installation path in CMake Build CMake build system : corrected the man page creation to PROJECT_BINARY_DIR and avoid creation into PROJECT_SOURCE_DIR. Signed-off-by: kkkunche --- expat/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index a052f189..36a9b46c 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -211,9 +211,10 @@ if(BUILD_tools) target_link_libraries(xmlwf expat) expat_install(TARGETS xmlwf DESTINATION ${CMAKE_INSTALL_BINDIR}) if(BUILD_doc) - add_custom_command(TARGET expat PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_SOURCE_DIR}/doc/xmlwf.1") - expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) - endif() + file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc) + add_custom_command(TARGET expat PRE_BUILD COMMAND "${DOCBOOK_TO_MAN}" "${PROJECT_SOURCE_DIR}/doc/xmlwf.xml" && mv "XMLWF.1" "${PROJECT_BINARY_DIR}/doc/xmlwf.1") + expat_install(FILES "${PROJECT_BINARY_DIR}/doc/xmlwf.1" DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) + endif() endif() if(BUILD_examples)