This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/cmake/FindScotch.cmake
2018-05-29 22:56:52 +02:00

31 lines
834 B
CMake

include(LibFindMacros)
# Use pkg-config to get hints about paths
libfind_pkg_check_modules(SCOTCH_PKGCONF scotch)
# Include dir
find_path(SCOTCH_INCLUDE_DIR
NAMES scotch.h
HINTS
ThirdParty/packages/scotch-6.0.4/platforms/linux64GccDPOpt/include
${SCOTCH_PKGCONF_INCLUDE_DIRS}
)
# Finally the library itself
find_library(SCOTCH_LIBRARY
NAMES scotch
HINTS
ThirdParty/packages/scotch-6.0.4/platforms/linux64GccDPOpt/lib
${SCOTCH_PKGCONF_LIBRARY_DIRS}
)
# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
message(STATUS ${SCOTCH_INCLUDE_DIR})
message(STATUS ${SCOTCH_LIBRARY})
set(SCOTCH_PROCESS_INCLUDE SCOTCH_INCLUDE_DIR)
set(SCOTCH_PROCESS_LIB SCOTCH_LIBRARY)
libfind_process(SCOTCH)