1 #-------------------------------------------------------------------------------
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 #-------------------------------------------------------------------------------
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
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 #-------------------------------------------------------------------------------
32 cmake_minimum_required(VERSION 2.8.0 FATAL_ERROR)
36 string(TOLOWER "${PROJECT_NAME}" LOWER_PROJECT_NAME)
39 set(FOAM_VERSION_MAJOR 0)
40 set(FOAM_VERSION_MINOR 1)
41 set(FOAM_VERSION_PATCH 0)
42 set(FOAM_VERSION ${FOAM_VERSION_MAJOR}.${FOAM_VERSION_MINOR})
43 set(FOAM_VERSION_FULL ${FOAM_VERSION}.${FOAM_VERSION_PATCH})
45 # set up custom cmake module path
46 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
49 set(FOAM_CREATE_INCLUDE_WRAPPERS TRUE)
50 set(FOAM_HAS_FLEX_SOURCES TRUE)
51 set(FOAM_ENABLE_DOC_INDEX TRUE)
52 set(FOAM_EXPORT_NAMESPACE FOAM_)
53 include(${CMAKE_SOURCE_DIR}/CMake/FOAMUtilities.cmake)
54 include(${CMAKE_SOURCE_DIR}/CMake/FOAMThirdPartyUtilities.cmake)
55 include(${CMAKE_SOURCE_DIR}/CMake/FOAMInternal.cmake)
57 # determine computer system
58 include(${CMAKE_SOURCE_DIR}/CMake/FOAMDetermineArch.cmake)
61 foam_option(FOAM_DOUBLE_PRECISION "Double precision"
62 "Compile ${PROJECT_NAME} with double precision floating point arithmetics." ON)
63 if(FOAM_DOUBLE_PRECISION)
64 set(FOAM_PRECISION DP)
66 set(FOAM_PRECISION SP)
69 # select whether we want to build framewors on Mac OS X
71 foam_option(FOAM_BUILD_FRAMEWORKS "Build frameworks"
72 "Build frameworks on Mac OS X" OFF)
74 set(FOAM_BUILD_FRAMEWORKS OFF)
77 # find python interpreter
78 find_package(PythonInterp REQUIRED)
80 # make sure we got Python version 2.6 or newer
81 foam_dependent_variables(PYTHON_EXECUTABLE PYTHON_VERSION)
82 if(NOT PYTHON_VERSION)
84 COMMAND ${PYTHON_EXECUTABLE} -c
85 "import sys; sys.stdout.write('%s.%s.%s\\n'%sys.version_info[0:3])"
86 RESULT_VARIABLE _py_version_result
87 OUTPUT_VARIABLE _py_version_output
88 ERROR_VARIABLE _py_version_output
89 OUTPUT_STRIP_TRAILING_WHITESPACE
91 if(NOT _py_version_result)
92 string(REGEX MATCH "([0-9]+\\.)+[0-9]+" PYTHON_VERSION "${_py_version_output}")
93 message(STATUS "Python version ${PYTHON_VERSION} found")
94 if(${PYTHON_VERSION} VERSION_LESS 2.4.0)
95 message(SEND_ERROR "Python version 2.4 or newer required")
98 set(PYTHON_VERSION PYTHON_VERSION-NOTFOUND)
99 message(SEND_ERROR "Failed to determine the python version: ${_py_version_output}")
101 set(PYTHON_VERSION ${PYTHON_VERSION} CACHE INTERNAL "The Python version")
103 string(REGEX REPLACE "\\.[0-9]+$" "" PYTHON_SHORT_VERSION ${PYTHON_VERSION})
105 # ask user whether she wants to build ParaView plugins
106 foam_option(FOAM_BUILD_PARAVIEW_PLUGINS "Build ParaView plugins"
107 "Build the ParaView plugins. Requires a ParaView build tree." OFF)
108 if(FOAM_BUILD_PARAVIEW_PLUGINS)
109 # find ParaView, which also find the VTK which has been used to build ParaView
110 find_package(ParaView)
111 if(NOT ParaView_FOUND)
113 "Failed to find the ParaView build tree. Specify ParaView_DIR or\n"
114 "disable FOAM_BUILD_PARAVIEW_PLUGINS")
116 # find the installed ParaView executable
118 FOAM_PARAVIEW3_APP NAMES paraview paraview.app ParaView.app
119 "ParaView 3.6.0.app" "ParaView 3.7.0.app" "ParaView 3.8.0.app"
120 HINTS ${ParaView_DIR}/bin
121 DOC "Path to the ParaView 3 executable (or application bundle on Mac OS X)"
123 if(NOT FOAM_PARAVIEW3_APP)
125 "Failed to find the ParaView 3 executable or application bundle")
128 mark_as_advanced(FOAM_PARAVIEW3_APP)
130 # we want shared libraries
131 set(BUILD_SHARED_LIBS SHARED)
133 # installation directories
134 foam_installation_path(FOAM_INSTALL_BIN_PATH bin "Executables"
135 "Executables installation path")
136 if(APPLE AND FOAM_BUILD_FRAMEWORKS)
137 foam_installation_path(FOAM_INSTALL_FRAMEWORK_PATH /Library/Frameworks
138 "Frameworks" "Framework installation path")
140 foam_installation_path(FOAM_INSTALL_LIBRARY_PATH
141 lib/${CMAKE_PROJECT_NAME}-${FOAM_VERSION_FULL}
142 "Libraries" "Library installation path")
143 foam_installation_path(FOAM_INSTALL_LIBEXEC_PATH
144 libexec/${CMAKE_PROJECT_NAME}-${FOAM_VERSION_FULL} "Private executables"
145 "Installation path for executables not on PATH.")
146 foam_installation_path(FOAM_INSTALL_HEADER_PATH
147 include/${CMAKE_PROJECT_NAME}-${FOAM_VERSION_FULL}
148 "Headers" "Header installation path (not for frameworks)")
149 foam_installation_path(FOAM_INSTALL_CONFIG_PATH
150 etc/${CMAKE_PROJECT_NAME}/${FOAM_VERSION_FULL} "Config files"
151 "Configuration files installation path")
152 foam_installation_path(FOAM_INSTALL_DATA_PATH
153 share/${CMAKE_PROJECT_NAME}-${FOAM_VERSION_FULL} "Data files"
154 "Data files installation path")
155 foam_installation_path(FOAM_INSTALL_DOC_PATH
156 share/doc/${CMAKE_PROJECT_NAME}-${FOAM_VERSION_FULL} "Documentation"
157 "Documentation files installation path")
158 foam_installation_path(FOAM_INSTALL_MAN_PATH share/man "Man pages"
159 "Man-pages installation path")
160 foam_installation_path(FOAM_INSTALL_TUTORIALS_PATH "${FOAM_INSTALL_DOC_PATH}"
161 "Tutorials" "Tutorials installation path")
162 foam_installation_path(FOAM_INSTALL_CMAKE_PATH "${FOAM_INSTALL_DATA_PATH}/CMake"
163 "CMake files" "CMake configuration files installation path")
164 if(FOAM_BUILD_PARAVIEW_PLUGINS)
165 foam_installation_path(FOAM_INSTALL_PVFOAMREADER_PATH
166 "${FOAM_INSTALL_LIBRARY_PATH}/plugins/PVFoamReader"
167 "ParaView2 plugin" "ParaView2 OpenFOAM-reader plugin installation path")
168 foam_installation_path(FOAM_INSTALL_PV3FOAMREADER_PATH
169 "${FOAM_INSTALL_LIBRARY_PATH}/plugins/PV3FoamReader"
170 "ParaView3 plubin" "ParaView3 OpenFOAM-reader plugin installation path")
172 foam_installation_path(FOAM_INSTALL_USERDFOAM_PATH
173 "${FOAM_INSTALL_LIBRARY_PATH}/plugins/ensightReader"
174 "Ensight plugin" "Ensight OpenFOAM-reader plugin installation path")
175 foam_installation_path(FOAM_INSTALL_PYTHON_PATH
176 "lib/python${PYTHON_SHORT_VERSION}/site-packages"
177 "Python modules" "Python modules installation base path")
179 set(FOAM_INSTALL_RUNTIME_PATH "${FOAM_INSTALL_LIBEXEC_PATH}")
181 # determine the INSTALL_NAME_DIR of potential frameworks
182 if(APPLE AND FOAM_BUILD_FRAMEWORKS)
183 set(FOAM_FRAMEWORK_INSTALL_NAME_DIR "${FOAM_INSTALL_FRAMEWORK_PATH}")
185 set(FOAM_FRAMEWORK_INSTALL_NAME_DIR "${FOAM_INSTALL_LIBRARY_PATH}")
188 # select html documentation browser (try a few well known ones for default)
189 # have to loop, because find_program(HTML_DOC_BROWSER NAMES ...) garbles things up
190 foreach(browser open gnome-open kde-open x-www-browser www-browser
191 firefox epiphany konqueror w3m lynx launch open)
192 find_program(HTML_DOC_BROWSER ${browser}
193 DOC "Program to open an HTML file")
198 if(NOT HTML_DOC_BROWSER)
200 "Failed to find a program to open HTML pages with (a.k.a a browser).\n"
201 "Point HTML_DOC_BROWSER to a suitable program.")
202 set(HTML_DOC_BROWSER "ECHO" CACHE STRING
203 "Command to open an HTML file (ECHO will print it to STDOUT)" FORCE)
205 set(FOAM_HTML_DOC_BROWSER_COMMAND
206 "\${HTML_DOC_BROWSER} %f" CACHE STRING "Command to open an HTML file")
207 string(CONFIGURE "${FOAM_HTML_DOC_BROWSER_COMMAND}"
208 FOAM_HTML_DOC_BROWSER_COMMAND ESCAPE_QUOTES)
209 mark_as_advanced(HTML_DOC_BROWSER FOAM_HTML_DOC_BROWSER_COMMAND)
212 string(TOLOWER "${PROJECT_NAME}-" _FOAM_DEFAULT_EXE_PREFIX)
213 set(FOAM_EXE_PREFIX "${_FOAM_DEFAULT_EXE_PREFIX}"
214 CACHE STRING "Prefix for application output-names")
215 mark_as_advanced(FOAM_EXE_PREFIX)
216 string(TOUPPER "${FOAM_EXE_PREFIX}" FOAM_UPPER_EXE_PREFIX)
218 # ask user whether she wants to build Doxygen docs
219 foam_option(FOAM_ENABLE_DOXYGEN_DOCS "Doxygen API documentation"
220 "Build the Doxygen API documentation" OFF)
221 # if user wants doxygen docs, find Doxygen and set up some options
222 if(FOAM_ENABLE_DOXYGEN_DOCS)
223 find_package(Doxygen REQUIRED)
224 foam_option(FOAM_DOXYDOCS_FOR_SF "Doxygen for SourceForge"
225 "Build the Doxygen docs for deployment on SourceForge" OFF)
226 # ask user whether she prefers local or www docs
227 foam_option(FOAM_USE_LOCAL_DOXYGEN_DOCS "Use local API docs"
228 "Use the local Doxygen documentation instead of the one on http://freefoam.sf.net/doc/Doxygen/html" OFF)
231 # ask user whether she wants to build the man pages
232 foam_option(FOAM_ENABLE_MANPAGE_HELP "Build manpage help"
233 "Build the manpages (requires asciidoc)" OFF)
234 # ask user whether she wants to build the xhtml man pages
235 foam_option(FOAM_ENABLE_XHTML_HELP "Build xhtml help"
236 "Build the xhtml help pages (requires asciidoc)" OFF)
238 # assemble the list of enabled manpage formats
239 set(FOAM_MANPAGE_FORMATS)
240 if(FOAM_ENABLE_MANPAGE_HELP)
241 list(APPEND FOAM_MANPAGE_FORMATS manpage)
243 if(FOAM_ENABLE_XHTML_HELP)
244 list(APPEND FOAM_MANPAGE_FORMATS xhtml)
247 # set up the RPATH for installation
248 set(CMAKE_INSTALL_RPATH ${FOAM_INSTALL_LIBRARY_PATH})
249 set(CMAKE_INSTALL_NAME_DIR ${FOAM_FRAMEWORK_INSTALL_NAME_DIR})
251 # we want executables and libraries in uniform places
252 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
253 "${CMAKE_BINARY_DIR}/libexec/${PROJECT_NAME}/${FOAM_VERSION_FULL}")
254 set(FOAM_LIBRARY_OUTPUT_DIRECTORY
255 "${CMAKE_BINARY_DIR}/lib/${PROJECT_NAME}-${FOAM_VERSION_FULL}")
256 set(FOAM_FRAMEWORK_OUTPUT_DIRECTORY
257 "${CMAKE_BINARY_DIR}/Library/Frameworks")
258 if(FOAM_BUILD_FRAMEWORKS)
259 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${FOAM_FRAMEWORK_OUTPUT_DIRECTORY}")
261 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${FOAM_LIBRARY_OUTPUT_DIRECTORY}")
263 set(FOAM_ARCHIVE_OUTPUT_DIRECTORY "${FOAM_LIBRARY_OUTPUT_DIRECTORY}")
265 # find parallel libraries
267 "FOAM_ENABLE_@PKG@ is true, but @PKG@ cannot be found.\n"
268 "If you have @PKG@ installed on your system, edit the variables\n"
269 "@PKG@_INCLUDE_DIR and @PKG@_LIBRARY in the cache, else disable the\n"
270 "setting FOAM_USE_@PKG@."
274 set(_FOAM_USE_MPI ON)
276 set(_FOAM_USE_MPI OFF)
278 foam_option(FOAM_USE_MPI "Use MPI"
279 "Build ${CMAKE_PROJECT} against MPI parallel libraries" ${_FOAM_USE_MPI})
280 if(FOAM_USE_MPI AND NOT MPI_FOUND)
281 string(REPLACE "@PKG@" "MPI" _FOAM_MPI_ERROR "${_FOAM_PAR_ERROR}")
282 message(SEND_ERROR "${_FOAM_MPI_ERROR}")
284 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
287 set(_FOAM_USE_GAMMA ON)
289 set(_FOAM_USE_GAMMA OFF)
291 foam_option(FOAM_USE_GAMMA "Use GAMMA"
292 "Build ${CMAKE_PROJECT} against GAMMA parallel libraries"
294 if(FOAM_USE_GAMMA AND NOT GAMMA_FOUND)
295 string(REPLACE "@PKG@" "GAMMA" _FOAM_GAMMA_ERROR "${_FOAM_PAR_ERROR}")
296 message(SEND_ERROR "${_FOAM_GAMMA_ERROR}")
299 if(MPI_FOUND OR GAMMA_FOUND)
300 set(FOAM_USE_PARALLEL TRUE)
304 find_package(Readline)
306 # substitution for build-tree and install-tree as used by
307 # foam_configure_files.
308 set(FOAM_CONFIGURE_FILES_VARIABLES
310 "${CMAKE_BINARY_DIR}/data"
311 "${FOAM_INSTALL_DATA_PATH}"
313 "${CMAKE_BINARY_DIR}/doc"
314 "${FOAM_INSTALL_DOC_PATH}"
316 "${CMAKE_BINARY_DIR}/bin"
317 "${FOAM_INSTALL_BIN_PATH}"
319 "${CMAKE_BINARY_DIR}/lib/FreeFOAM-${FOAM_VERSION_FULL}"
320 "${FOAM_INSTALL_LIBRARY_PATH}"
322 "${CMAKE_BINARY_DIR}/libexec/FreeFOAM/${FOAM_VERSION_FULL}"
323 "${FOAM_INSTALL_LIBEXEC_PATH}"
325 "${CMAKE_BINARY_DIR}/Library/Frameworks"
326 "${FOAM_INSTALL_FRAMEWORK_PATH}"
327 FOAM_PV3FOAMREADER_DIR
328 "${FOAM_LIB_DIR}/plugins/PV3FoamReader"
329 "${FOAM_INSTALL_PV3FOAMREADER_PATH}"
331 "${CMAKE_BINARY_DIR}/include"
332 "${FOAM_INSTALL_HEADER_PATH}"
334 "${CMAKE_BINARY_DIR}/etc"
335 "${FOAM_INSTALL_CONFIG_PATH}"
337 "${CMAKE_BINARY_DIR}/CMake"
338 "${FOAM_INSTALL_CMAKE_PATH}"
343 "${CMAKE_BINARY_DIR}/data/utilities/doxyFixIncludes $1 |"
346 "| ${CMAKE_BINARY_DIR}/data/utilities/doxyFixHeaderName $1"
349 if(FOAM_USE_LOCAL_DOXYGEN_DOCS)
350 list(APPEND FOAM_CONFIGURE_FILES_VARIABLES
351 FOAM_DOC_DIR "${CMAKE_BINARY_DIR}/doc" "${FOAM_INSTALL_DOC_PATH}")
353 set(_sf_doc "http://freefoam.sf.net/doc/${FOAM_VERSION_FULL}")
354 list(APPEND FOAM_CONFIGURE_FILES_VARIABLES
355 FOAM_DOC_DIR "${_sf_doc}" "${_sf_doc}")
358 # thirdparty libraries
359 foam_thirdparty_option(Metis
360 "Required by the metis decomposition method"
362 if(FOAM_ENABLE_METIS)
363 if(FOAM_ENABLE_METIS AND METIS_REQUIRES_MPI AND NOT FOAM_USE_MPI)
365 "Your metis implementation requires FOAM_USE_MPI to be enabled."
366 "If you don't have/want MPI, enable FOAM_BUILD_PRIVATE_METIS instead.")
369 foam_thirdparty_option(ParMetis
370 "Required by the parmetis decomposition method"
371 ParMetis TRUE ${FOAM_USE_MPI}
372 PARMETIS_metis_LIBRARY PARMETIS_parmetis_LIBRARY)
373 if(FOAM_ENABLE_PARMETIS AND NOT FOAM_USE_MPI)
375 "ParMetis requires FOAM_USE_MPI to be enabled.")
377 if(FOAM_ENABLE_PARMETIS AND NOT FOAM_ENABLE_METIS)
379 "ParMetis requires FOAM_ENABLE_METIS to be enabled.")
381 set(SCOTCH_USE_ERREXIT TRUE)
382 foam_thirdparty_option(SCOTCH "" SCOTCH FALSE ON SCOTCH_scotch_LIBRARY
383 SCOTCH_scotcherr_LIBRARY SCOTCH_scotcherrexit_LIBRARY)
384 # do not enable mgridgen by default (licensing issues)
385 if(NOT FOAM_DOUBLE_PRECISION)
386 set(MGRIDGEN_USE_REAL ON)
388 foam_thirdparty_option(MGRIDGEN
389 "Required by the MGridGen GAMG agglomerator. LICENSE UNCLEAR"
391 # do not enable libccmio by default (licensing issues)
392 foam_thirdparty_option(ccmio
393 "Required by ccm26ToFoam. REQUIRES PERMISSION BY CDADAPCO!"
395 foam_thirdparty_option(zlib "" ZLIB FALSE ON)
397 if(FOAM_BUILD_PRIVATE_METIS OR FOAM_BUILD_PRIVATE_MGRIDGEN)
398 find_package(Threads REQUIRED)
400 if(FOAM_BUILD_PRIVATE_SCOTCH)
401 find_package(BISON REQUIRED)
402 find_package(FLEX REQUIRED)
403 find_package(Threads)
406 # figure out default Pstream library
408 set(_FOAM_DEFAULT_PSTREAM mpi)
409 elseif(FOAM_USE_GAMMA)
410 set(_FOAM_DEFAULT_PSTREAM gamma)
412 set(_FOAM_DEFAULT_PSTREAM dummy)
414 set(FOAM_DEFAULT_PSTREAM ${_FOAM_DEFAULT_PSTREAM} CACHE STRING
415 "Default Pstream library implementation [dummy|mpi|gamma]")
416 mark_as_advanced(FOAM_DEFAULT_PSTREAM)
418 # find m4 macro processor
419 find_program(M4_EXECUTABLE m4 DOC "Path to the m4 macro processor")
420 mark_as_advanced(M4_EXECUTABLE)
421 if(NOT M4_EXECUTABLE)
422 message("WARNING: Failed to find M4 macro processor.\n"
423 "Some of the tutorials will fail if it can't be found.")
424 set(M4_EXECUTABLE m4)
427 # find gnuplot executable
428 find_program(GNUPLOT_EXECUTABLE gnuplot DOC "Path to the gnuplot program")
429 mark_as_advanced(GNUPLOT_EXECUTABLE)
430 if(NOT GNUPLOT_EXECUTABLE)
431 message("WARNING: Failed ot find gnuplot.\n"
432 "Some tutorials will not create quantitative comparison plots.")
435 # on APPLE use cp -R -P -p, otherwise use cp -a
437 set(FOAM_CP_A_FLAGS "-R -P -p")
439 set(FOAM_CP_A_FLAGS "-a")
442 # execinfo.h and cxxabi.h only work using GNU gcc and Debug config
443 # assume that if we have execinfo.h, cxxabi.h is also present.
444 if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE STREQUAL Debug)
445 find_package(Execinfo)
448 # create the FOAMConfig.h file
449 configure_file(${CMAKE_SOURCE_DIR}/FOAMConfig.h.in
450 ${CMAKE_BINARY_DIR}/include/FOAMConfig.h @ONLY)
452 # on Solaris/SunOS fix up the shebangs
453 if(CMAKE_SYSTEM_NAME STREQUAL SunOS AND NOT EXISTS ${CMAKE_BINARY_DIR}/replaceAllShellSun.run)
454 message(STATUS "Fixing shell-interpreter for SunOS and Solaris")
456 COMMAND ${CMAKE_SOURCE_DIR}/data/utilities/replaceAllShellSun bin
457 COMMAND ${CMAKE_SOURCE_DIR}/data/utilities/replaceAllShellSun data
458 COMMAND ${CMAKE_SOURCE_DIR}/data/utilities/replaceAllShellSun tutorials
459 COMMAND ${CMAKE_SOURCE_DIR}/data/utilities/replaceAllShellSun doc
460 COMMAND ${CMAKE_COMMAND} -E touch${CMAKE_BINARY_DIR}/replaceAllShellSun.run
461 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
466 set(FOAM_COMPILE_DEFINITIONS
472 list(APPEND FOAM_COMPILE_DEFINITIONS -Ddarwin)
474 add_definitions(${FOAM_COMPILE_DEFINITIONS})
476 # set up include-directories for own headers
477 include_directories(${CMAKE_BINARY_DIR}/include)
479 # descend into the sources...
480 add_subdirectory(bin)
481 add_subdirectory(etc)
482 add_subdirectory(data)
483 add_subdirectory(src)
484 add_subdirectory(applications)
485 add_subdirectory(tutorials)
486 add_subdirectory(doc)
488 # export the library dependencies to the build tree
489 foam_export_targets_to_build_tree(${PROJECT_NAME}LibraryDepends)
490 export(PACKAGE ${PROJECT_NAME})
492 # write the doc index file and install it
493 foam_write_doc_index()
495 ${CMAKE_BINARY_DIR}/InstallFiles/data/DoxyDocIndex
496 DESTINATION ${FOAM_INSTALL_DATA_PATH}
500 # create ${PROJECT_NAME}Config.cmake ${PROJECT_NAME}Use.cmake,
501 # ${PROJECT_NAME}Utilities.cmake and ${PROJECT_NAME}WmakeCompatibility.cmake
502 # for the build and install tree
503 foam_configure_files(ConfigInstallFiles
504 "CMake/FOAMConfig.cmake.in==CMake/${PROJECT_NAME}Config.cmake"
505 "CMake/FOAMUse.cmake.in==CMake/${PROJECT_NAME}Use.cmake"
506 "CMake/FOAMWmakeCompatibility.cmake.in==CMake/${PROJECT_NAME}WmakeCompatibility.cmake"
508 "CMake/FOAMUtilities.cmake==CMake/${PROJECT_NAME}Utilities.cmake"
511 # install the CMake config files
513 ${ConfigInstallFiles}
514 DESTINATION ${FOAM_INSTALL_CMAKE_PATH}
518 # install the ${PROJECT_NAME}LibraryDepends.cmake file
519 install(EXPORT ${PROJECT_NAME}LibraryDepends
520 DESTINATION ${FOAM_INSTALL_CMAKE_PATH}
526 include(${CMAKE_SOURCE_DIR}/CMake/FOAMCPack.cmake)
530 "${CMAKE_SOURCE_DIR}/CMake/Modules/cmake_uninstall.cmake.in"
531 "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
535 add_custom_target(uninstall
536 "${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
539 # print cool feature summary
540 foam_print_feature_summary()
542 # ------------------------- vim: set sw=2 sts=2 et: --------------- end-of-file