Commit 7c715c4c authored by Timo Koch's avatar Timo Koch

[cmake] Find gmsh and the executable

parent 6e8a5bef
......@@ -8,6 +8,7 @@ find_package(GLPK)
find_package(Gnuplot)
set(HAVE_GNUPLOT ${GNUPLOT_FOUND})
find_package(Gstat)
find_package(Gmsh)
find_package(NLOPT)
find_package(PTScotch)
find_package(PVPython)
......
# .. cmake_module::
#
# Find the Gmsh meshing tool
#
# You may set the following variables to modify the
# behaviour of this module:
#
# :ref:`GMSH_ROOT`
# Path list to search for gmsh.
#
# Sets the following variables:
#
# :code:`gmsh_FOUND`
# True if the gmsh library was found.
#
# :code:`GMSH_EXECUTABLE`
# Path to gmsh executable
#
# .. cmake_variable:: GMSH_ROOT
#
# You may set this variable to have :ref:`FindGmsh` look
# for the gmsh library in the given path before inspecting
# system paths.
#
# look for header files, only at positions given by the user
find_program(GMSH_EXECUTABLE
NAMES gmsh
PATHS "${GMSH_ROOT}"
"${CMAKE_SOURCE_DIR}/../"
"/usr/bin/"
PATH_SUFFIXES "src" "external/gmsh/src" "gmsh/src" "gmsh"
NO_DEFAULT_PATH
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
"gmsh"
DEFAULT_MSG
GMSH_EXECUTABLE
)
# set macros for config.h
set(HAVE_GMSH ${gmsh_FOUND})
set(GMSH_EXECUTABLE ${GMSH_EXECUTABLE})
# text for feature summary
set_package_properties("Gmsh" PROPERTIES
DESCRIPTION "Meshing tool"
PURPOSE "Generate structured and unstructured grids")
......@@ -58,6 +58,12 @@
/* Define path to gstat executable */
#cmakedefine GSTAT_EXECUTABLE "@GSTAT_EXECUTABLE@"
/* Define to 1 if gmsh was found */
#cmakedefine HAVE_GMSH 1
/* Define path to gmsh executable */
#cmakedefine GMSH_EXECUTABLE "@GMSH_EXECUTABLE@"
/* Defines whether pvpython has been found */
#cmakedefine HAVE_PVPYTHON 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment