# FindGOUPIL # -------- # # Find the Goupil includes (header) # # IMPORTED Targets # ^^^^^^^^^^^^^^^^ # # This module defines :prop_tgt:`IMPORTED` target ``GOUPIL::GOUPIL``, if # GOUPIL has been found. # # Result Variables # ^^^^^^^^^^^^^^^^ # # This module defines the following variables: # # :: # # GOUPIL_INCLUDE_DIRS - # GOUPIL_LIBRARIES # GOUPIL_FOUND - True if goupil found. # # :: # # GOUPIL_VERSION_STRING - The version of goupil found (x.y.z) # GOUPIL_VERSION_WORLD - The world version of goupil # GOUPIL_VERSION_MAJOR - The major version of goupil # GOUPIL_VERSION_MINOR - The minor version of goupil # # Hints # ^^^^^ # # A user may set ``GOUPIL_ROOT`` to a goupil installation root to tell this # module where to look. #============================================================================= # This file is heavily inspired by the offical CMake module FindZLIB.cmake #============================================================================= # # # manager COMET Software Group # author m.dubouchet18@imperial.ac.uk find_path(GOUPIL_INCLUDE_DIR NAMES goupil.h HINTS ${GOUPIL_ROOT} PATH_SUFFIXES include) find_library(GOUPIL_LIBRARY NAMES goupil HINTS ${GOUPIL_ROOT} PATH_SUFFIXES lib) # handle the QUIETLY and REQUIRED arguments and set GOUPIL_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOUPIL REQUIRED_VARS GOUPIL_INCLUDE_DIR GOUPIL_LIBRARY VERSION_VAR GOUPIL_VERSION_STRING) if(GOUPIL_FOUND AND NOT TARGET GOUPIL::GOUPIL) set(GOUPIL_INCLUDE_DIRS ${GOUPIL_INCLUDE_DIR}) set(GOUPIL_LIBRARIES "${GOUPIL_LIBRARY}") add_library(GOUPIL::GOUPIL STATIC IMPORTED) set_target_properties(GOUPIL::GOUPIL PROPERTIES IMPORTED_LOCATION "${GOUPIL_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${GOUPIL_INCLUDE_DIRS}") endif()