FIX: Require and use Python-2 to run AsciiDoc
[freefoam.git] / src / OpenFOAM / CMakeLists.txt
blobe7cc1f683619f18c75f1767f163812042ea8604f
1 #-------------------------------------------------------------------------------
2 #               ______                _     ____          __  __
3 #              |  ____|             _| |_  / __ \   /\   |  \/  |
4 #              | |__ _ __ ___  ___ /     \| |  | | /  \  | \  / |
5 #              |  __| '__/ _ \/ _ ( (| |) ) |  | |/ /\ \ | |\/| |
6 #              | |  | | |  __/  __/\_   _/| |__| / ____ \| |  | |
7 #              |_|  |_|  \___|\___|  |_|   \____/_/    \_\_|  |_|
9 #                   FreeFOAM: The Cross-Platform CFD Toolkit
11 # Copyright (C) 2008-2012 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 3 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, see <http://www.gnu.org/licenses/>.
29 #-------------------------------------------------------------------------------
31 if(FOAM_HAVE_GIT)
32   if(FOAM_VERSION_CHECK_WARN_ONLY)
33     set(_CHECK_VERSION_INFO_ARGS --warn)
34   else()
35     set(_CHECK_VERSION_INFO_ARGS)
36   endif()
37   add_custom_target(configure_global_C
38     COMMAND "${CMAKE_COMMAND}"
39       -P "${CMAKE_BINARY_DIR}/CMake/ConfigureGlobalC.cmake"
40       DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/global/global.C.in"
41     COMMENT "Generating src/OpenFOAM/global/global.C"
42     VERBATIM)
43   set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/global/global.C"
44     PROPERTIES GENERATED TRUE)
45   add_dependencies(version_check configure_global_C)
46 else()
47   configure_file(global/global.C.in
48     "${CMAKE_CURRENT_BINARY_DIR}/global/global.C" @ONLY)
49 endif()
51 include_directories(${ZLIB_INCLUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}")
53 foam_add_library(OpenFOAM)
55 foam_target_link_libraries(OpenFOAM
56   OSspecific
57   ${ZLIB_LIBRARIES}
58   ${CMAKE_DL_LIBS}
59   )
61 foam_install_targets(OpenFOAM)
63 # ------------------------- vim: set sw=2 sts=2 et: --------------- end-of-file