diff --git a/cmake/modules/AddPTScotchFlags.cmake b/cmake/modules/AddPTScotchFlags.cmake index 6d9a8655ec2ff3bfb8c765ec82ce5fdd312ed5d1..f1ae6fabeca8165a555f986156eacd383a9232ec 100644 --- a/cmake/modules/AddPTScotchFlags.cmake +++ b/cmake/modules/AddPTScotchFlags.cmake @@ -9,7 +9,7 @@ function(add_dune_ptscotch_flags _targets) if(PTSCOTCH_FOUND) foreach(_target ${_targets}) - target_link_libraries(${_target} ${PTSCOTCH_LIBRARY} ${PTSCOTCHERR_LIBRARY}) + target_link_libraries(${_target} ${PTSCOTCH_LIBRARY} ${SCOTCH_LIBRARY} ${PTSCOTCHERR_LIBRARY}) GET_TARGET_PROPERTY(_props ${_target} INCLUDE_DIRECTORIES) string(REPLACE "_props-NOTFOUND" "" _props "${_props}") SET_TARGET_PROPERTIES(${_target} PROPERTIES INCLUDE_DIRECTORIES diff --git a/cmake/modules/FindPTScotch.cmake b/cmake/modules/FindPTScotch.cmake index 9b2cfb4484473d477f0c413bec650c589de4e420..a99b6580e609e6a7d096dbba44f8ef5727d3a6e4 100644 --- a/cmake/modules/FindPTScotch.cmake +++ b/cmake/modules/FindPTScotch.cmake @@ -47,6 +47,7 @@ find_path(PTSCOTCH_INCLUDE_DIR ptscotch.h PATH_SUFFIXES ${PATH_SUFFIXES}) _search_pt_lib(PTSCOTCH_LIBRARY ptscotch "The main PT-Scotch library.") +_search_pt_lib(SCOTCH_LIBRARY scotch "The Scotch library.") _search_pt_lib(PTSCOTCHERR_LIBRARY ptscotcherr "The PT-Scotch error library.") # behave like a CMake module is supposed to behave @@ -56,6 +57,7 @@ find_package_handle_standard_args( DEFAULT_MSG PTSCOTCH_INCLUDE_DIR PTSCOTCH_LIBRARY + SCOTCH_LIBRARY PTSCOTCHERR_LIBRARY ) #restore old values @@ -63,7 +65,7 @@ cmake_pop_check_state() if(PTSCOTCH_FOUND) set(PTSCOTCH_INCLUDE_DIRS ${PTSCOTCH_INCLUDE_DIR}) - set(PTSCOTCH_LIBRARIES ${PTSCOTCH_LIBRARY} ${PTSCOTCHERR_LIBRARY} ${MPI_DUNE_LIBRARIES} + set(PTSCOTCH_LIBRARIES ${PTSCOTCH_LIBRARY} ${SCOTCH_LIBRARY} ${PTSCOTCHERR_LIBRARY} ${MPI_DUNE_LIBRARIES} CACHE FILEPATH "All libraries needed to link programs using PT-Scotch") set(PTSCOCH_LINK_FLAGS "${DUNE_MPI_LINK_FLAGS}" CACHE STRING "PT-Scotch link flags")