Campbell Barton cead1b
Campbell Barton cead1b
if(WITH_SYSTEM_SUPERLU)
Campbell Barton cead1b
    # depend on CMake's defaults
Campbell Barton cead1b
    set(_header_hints)
Campbell Barton cead1b
    set(_header_suffixes
Campbell Barton cead1b
        superlu
Alexander von Gluck IV 17925f
        SuperLU
Campbell Barton cead1b
    )
Campbell Barton cead1b
    set(_lib_suffixes)
Campbell Barton cead1b
else()
Campbell Barton cead1b
    # preferred homebrew's directories.
Campbell Barton cead1b
    set(_header_hints
Campbell Barton cead1b
        ${THIRDPARTY_LIBS_HINTS}
Campbell Barton cead1b
    )
Campbell Barton cead1b
    set(_header_suffixes
Campbell Barton cead1b
        superlu43/4.3_1/include/superlu
Campbell Barton cead1b
        superlu/SuperLU_4.1/include
Campbell Barton cead1b
    )
Campbell Barton cead1b
    set(_lib_hints
Campbell Barton cead1b
        ${THIRDPARTY_LIBS_HINTS}
Campbell Barton cead1b
    )
Campbell Barton cead1b
    set(_lib_suffixes
Campbell Barton 6560c8
        superlu
Campbell Barton cead1b
    )
Campbell Barton cead1b
endif()
Campbell Barton cead1b
Campbell Barton 7aaaec
find_path(
Campbell Barton 7aaaec
    SUPERLU_INCLUDE_DIR
Campbell Barton 7aaaec
    NAMES
Campbell Barton 7aaaec
        slu_Cnames.h
Campbell Barton 7aaaec
    HINTS
Campbell Barton cead1b
        ${_header_hints}
Campbell Barton 7aaaec
    PATH_SUFFIXES
Campbell Barton cead1b
        ${_header_suffixes}
Campbell Barton 7aaaec
)
Campbell Barton 7aaaec
Campbell Barton 7aaaec
find_library(
Campbell Barton 7aaaec
    SUPERLU_LIBRARY
Campbell Barton 7aaaec
    NAMES
Campbell Barton 78b2e3
        libsuperlu.so
Campbell Barton 7aaaec
        libsuperlu.a
Campbell Barton 7aaaec
        libsuperlu_4.1.a
Campbell Barton 7aaaec
    HINTS
Campbell Barton cead1b
        ${_lib_hints}
Campbell Barton 7aaaec
    PATH_SUFFIXES
Campbell Barton cead1b
        ${_lib_suffixes}
Campbell Barton 7aaaec
)
roentgen 3969d9
roentgen 3969d9
message("***** SuperLU Header path:" ${SUPERLU_INCLUDE_DIR})
Campbell Barton bf80fb
message("***** SuperLU Library path:" ${SUPERLU_LIBRARY})
roentgen 3969d9
roentgen 3969d9
set(SUPERLU_NAMES ${SUPERLU_NAMES} SuperLU)
roentgen 3969d9
roentgen 3969d9
include(FindPackageHandleStandardArgs)
Campbell Barton 7aaaec
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SuperLU
Campbell Barton 7aaaec
    DEFAULT_MSG SUPERLU_LIBRARY SUPERLU_INCLUDE_DIR)
roentgen 3969d9
roentgen 3969d9
if(SUPERLU_FOUND)
roentgen 3969d9
    set(SUPERLU_LIBRARIES ${SUPERLU_LIBRARY})
roentgen 3969d9
endif()
roentgen 3969d9
Campbell Barton 7aaaec
mark_as_advanced(
Campbell Barton 7aaaec
    SUPERLU_LIBRARY
Campbell Barton 7aaaec
    SUPERLU_INCLUDE_DIR
Campbell Barton 7aaaec
)
Campbell Barton cead1b
Campbell Barton cead1b
unset(_header_hints)
Campbell Barton cead1b
unset(_header_suffixes)
Campbell Barton cead1b
unset(_lib_hints)
Campbell Barton cead1b
unset(_lib_suffixes)