ENH: slightly improve foam_compile_asy function
[freefoam.git] / CMake / FOAMCPack.cmake
blobdebfa5d5c97a0006c074c0262825f301ae602b63
1 #-------------------------------------------------------------------------------
2 #               ______                _     ____          __  __
3 #              |  ____|             _| |_  / __ \   /\   |  \/  |
4 #              | |__ _ __ ___  ___ /     \| |  | | /  \  | \  / |
5 #              |  __| '__/ _ \/ _ ( (| |) ) |  | |/ /\ \ | |\/| |
6 #              | |  | | |  __/  __/\_   _/| |__| / ____ \| |  | |
7 #              |_|  |_|  \___|\___|  |_|   \____/_/    \_\_|  |_|
9 #                   FreeFOAM: The Cross-Platform CFD Toolkit
11 # Copyright (C) 2008-2010 Michael Wild <themiwi@users.sf.net>
12 #                         Gerber van der Graaf <gerber_graaf@users.sf.net>
13 #-------------------------------------------------------------------------------
14 # License
15 #   This file is part of FreeFOAM.
17 #   FreeFOAM is free software; you can redistribute it and/or modify it
18 #   under the terms of the GNU General Public License as published by the
19 #   Free Software Foundation; either version 2 of the License, or (at your
20 #   option) any later version.
22 #   FreeFOAM is distributed in the hope that it will be useful, but WITHOUT
23 #   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
24 #   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
25 #   for more details.
27 #   You should have received a copy of the GNU General Public License
28 #   along with FreeFOAM; if not, write to the Free Software Foundation,
29 #   Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 #-------------------------------------------------------------------------------
33 set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
34 set(CPACK_PACKAGE_VENDOR "Michael Wild and Gerber van der Graaf")
35 set(CPACK_PACKAGE_VERSION_MAJOR ${FOAM_VERSION_MAJOR})
36 set(CPACK_PACKAGE_VERSION_MINOR ${FOAM_VERSION_MINOR})
37 set(CPACK_PACKAGE_VERSION_PATCH ${FOAM_VERSION_PATCH})
38 set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/ReleaseNotes-1.7.1-OpenFOAM)
39 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} - Open source CFD toolbox")
40 set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${FOAM_VERSION_FULL}-${FOAM_OS}-${CMAKE_SYSTEM_PROCESSOR}")
41 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${FOAM_VERSION_FULL}")
42 set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${FOAM_VERSION_FULL}")
43 configure_file(${CMAKE_SOURCE_DIR}/COPYING ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/COPYING.txt COPYONLY)
44 set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/COPYING.txt)
45 set(CPACK_RESOURCE_FILE_README ${CMAKE_BINARY_DIR}/README.html)
46 set(CPACK_STRIP_FILES TRUE)
47 set(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*;/\\\\.git*")
48 set(CPACK_SET_DESTDIR TRUE)
50 # create the README.html
51 execute_process(
52   COMMAND ${ASCIIDOC_EXECUTABLE}
53     -f ${CMAKE_BINARY_DIR}/data/asciidoc/html.conf
54     -a toc -o ${CMAKE_BINARY_DIR}/README.html
55     ${CMAKE_SOURCE_DIR}/README
56   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
57   )
59 include(CPack)
61 cpack_add_component(shlibs
62   DISPLAY_NAME "Libraries"
63   DESCRIPTION "The ${PROJECT_NAME} libraries"
64   REQUIRED
65   )
67 cpack_add_component(bin
68   DISPLAY_NAME "Executables"
69   DESCRIPTION "The ${PROJECT_NAME} solvers and utilities"
70   DEPENDS shlibs data
71   )
73 cpack_add_component(dev
74   DISPLAY_NAME "Development files"
75   DESCRIPTION "The ${PROJECT_NAME} headers and development files"
76   DEPENDS shlibs
77   )
79 cpack_add_component(plugins
80   DISPLAY_NAME "OpenFOAM-reader plugins"
81   DESCRIPTION "OpenFOAM-reader plugin for the Ensight visualization tool"
82   DEPENDS shlibs
83   )
85 # ------------------------- vim: set sw=2 sts=2 et: --------------- end-of-file