Fix installation of HTML manual
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 6 Jan 2014 12:48:28 +0000 (14:48 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 13 Jan 2014 15:47:32 +0000 (16:47 +0100)
Simplify things by making the source distribution and the git repository
have the same layout (it wasn't working earlier at all, and just adds
complexity if I were to try to fix it).  This allows using the same
installation rules for both (just replacing the binary directory with
the source directory).  Install the output directory under the proper
name (html/ instead of final/).

Change-Id: Ica88a0825999f201e9856e11e1784bd4acc20c91

CMakeLists.txt
share/html/CMakeLists.txt

index 7d1bbadd8e0d677d3ccefbff657cdffbb151d6dc..87bab31b58c93721d0c96105844f31b653df1495 100644 (file)
@@ -115,7 +115,7 @@ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/admin/InstallInfo.txt")
 set(CPACK_SOURCE_IGNORE_FILES "\\\\.isreposource$;\\\\.git/;\\\\.gitignore$")
 set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/CPackInit.cmake")
-set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${CMAKE_SOURCE_DIR};/;${CMAKE_BINARY_DIR}/share/man/man1;share/man/man1;${CMAKE_BINARY_DIR}/share/man/man7;share/man/man7;${CMAKE_BINARY_DIR}/share/html/final;share/html")
+set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${CMAKE_SOURCE_DIR};/;${CMAKE_BINARY_DIR}/share/man/man1;share/man/man1;${CMAKE_BINARY_DIR}/share/man/man7;share/man/man7;${CMAKE_BINARY_DIR}/share/html/final;share/html/final")
 set(CPACK_PACKAGE_CONTACT "gmx-users@gromacs.org")
 
 #must come after all cpack settings!
index 1bb847317fcb16fb40220a35f621d7ed09fe4f66..861151879c922bfdb290c138c33c6dbe3f7cfbbf 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
 # the research papers on the package. Check out http://www.gromacs.org.
 
 set(OUTPUT_DIR final)
+set(HTML_PAGE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${OUTPUT_DIR})
 
 if(SOURCE_IS_SOURCE_DISTRIBUTION)
     # Make sure source package contains HTML pages.
-    if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/online.html")
+    if(NOT EXISTS "${HTML_PAGE_DIR}/online.html")
         message(FATAL_ERROR "Online HTML pages are missing from source package.")
     endif()
 endif()
@@ -56,16 +57,15 @@ add_custom_target(html
     COMMENT "Generating HTML help"
     VERBATIM)
 
-set(HTML_PAGE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 if (GMX_BUILD_HELP)
     set_target_properties(html PROPERTIES EXCLUDE_FROM_ALL OFF)
     set_directory_properties(PROPERTIES
-        ADDITIONAL_MAKE_CLEAN_FILES "${OUTPUT_DIR};header.processed.html")
+        ADDITIONAL_MAKE_CLEAN_FILES "${OUTPUT_DIR};header.html")
     set(HTML_PAGE_DIR ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_DIR})
 endif()
 
 if (SOURCE_IS_SOURCE_DISTRIBUTION OR GMX_BUILD_HELP)
-    install(DIRECTORY ${HTML_PAGE_DIR}
-        DESTINATION ${DATA_INSTALL_DIR}
+    install(DIRECTORY ${HTML_PAGE_DIR}/
+        DESTINATION ${DATA_INSTALL_DIR}/html
         COMPONENT html)
 endif()