Fix DEB/RPM cpack generation
authorRoland Schulz <roland@utk.edu>
Sun, 21 Oct 2012 22:03:40 +0000 (18:03 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 1 Nov 2012 14:49:38 +0000 (15:49 +0100)
Change-Id: I4df6bf81d91f2027ee2b1849edafbaac717f3704

CMakeLists.txt
CPackInit.cmake

index 3991799b36f13de1d4677259945c9886f02658ff..604960c470b2208127b4e5862e875f01c77d10ae 100644 (file)
@@ -81,6 +81,7 @@ 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}/man;man")
+set(CPACK_PACKAGE_CONTACT "gmx-users@gromacs.org")
 
 #must come after all cpack settings!
 include(CPack)
index 20d2c2369510a415d03d9a2bf2327d70c5fcc946..eba4c45d7a8bc32c1c72d265f8cc94073fc3a76b 100644 (file)
@@ -1,8 +1,10 @@
 #TODO: add check that source doesn't contain any untracked files
-get_filename_component(CMAKE_BINARY_DIR ${CPACK_OUTPUT_CONFIG_FILE} PATH)
-if(CPACK_SOURCE_PACKAGE_FILE_NAME AND NOT EXISTS "${CMAKE_BINARY_DIR}/man/man1/ngmx.1")
-    message(FATAL_ERROR 
-        "To generate correct source package all man pages need to be generated. "
-        "The man pages are automatically build together with the binaries. "
-        "Make sure to build all binaries (e.g. GMX_X11=on).")
+if(CPACK_SOURCE_PACKAGE_FILE_NAME) #building source package
+    get_filename_component(CMAKE_BINARY_DIR ${CPACK_OUTPUT_CONFIG_FILE} PATH)
+    if(NOT EXISTS "${CMAKE_BINARY_DIR}/man/man1/ngmx.1")
+        message(FATAL_ERROR 
+            "To create a complete source package all man pages need to be generated."
+            "The man pages are automatically built together with the binaries. "
+            "Make sure to build all binaries (e.g. GMX_X11=on).")
+    endif()
 endif()