Commit e854227d authored by Max Lyon's avatar Max Lyon
Browse files

add GMSH finder

parent 13895f6b
Pipeline #16187 failed with stage
in 5 seconds
set(GMSH_DIR $ENV{GMSH_DIR} CACHE PATH "GMSH directory (containing include/gmsh.h).")
find_path(GMSH_INCLUDE_DIR
NAMES gmsh.h
HINTS ${GMSH_DIR}
${GMSH_DIR}/include
PATHS /usr/local/include
/usr/include
)
find_library(GMSH_LIBRARY
NAMES gmsh
HINTS ${GMSH_DIR}
${GMSH_DIR}/lib
PATHS /usr/local/lib
/usr/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMSH DEFAULT_MSG GMSH_INCLUDE_DIR GMSH_LIBRARY)
if(GMSH_FOUND AND NOT TARGET GMSH::GMSH)
add_library(GMSH::GMSH INTERFACE IMPORTED)
target_include_directories(GMSH::GMSH INTERFACE ${GMSH_INCLUDE_DIR})
target_link_libraries(GMSH::GMSH INTERFACE ${GMSH_LIBRARY})
endif()
mark_as_advanced(GMSH_INCLUDE_DIR)
mark_as_advanced(GMSH_LIBRARY)
Supports Markdown
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