# - Find GSL
# Find the native GSL includes and library
#
# GSL_INCLUDES - where to find gsl/gsl_*.h, etc.
# GSL_LIBRARIES - List of libraries when using GSL.
# GSL_FOUND - True if GSL found.
if (GSL_INCLUDES)
# Already in cache, be silent
set (GSL_FIND_QUIETLY TRUE)
endif (GSL_INCLUDES)
find_path (GSL_INCLUDES gsl/gsl_math.h HINTS ENV GSL_DIR)
find_library (GSL_LIB NAMES gsl HINTS ENV GSL_DIR)
find_library (GSL_CBLAS_LIB NAMES openblas gslcblas HINTS ENV GSL_DIR)
set (GSL_LIBRARIES "${GSL_LIB}" "${GSL_CBLAS_LIB}")
# handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (GSL DEFAULT_MSG GSL_LIBRARIES GSL_INCLUDES)
mark_as_advanced (GSL_LIB GSL_CBLAS_LIB GSL_INCLUDES)
