forked from lijiext/lammps
set default to automatically download scafacos lib if not found
This commit is contained in:
parent
e57c4c60bd
commit
8c4a497af4
|
@ -520,7 +520,15 @@ endif()
|
|||
|
||||
if(PKG_USER-SCAFACOS)
|
||||
find_package(GSL REQUIRED)
|
||||
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" OFF)
|
||||
find_package(PkgConfig QUIET)
|
||||
set(DOWNLOAD_SCAFACOS_DEFAULT ON)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(SCAFACOS QUIET scafacos)
|
||||
if(SCAFACOS_FOUND)
|
||||
set(DOWNLOAD_SCAFACOS_DEFAULT OFF)
|
||||
endif()
|
||||
endif()
|
||||
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT})
|
||||
if(DOWNLOAD_SCAFACOS)
|
||||
message(STATUS "ScaFaCoS download requested - we will build our own")
|
||||
include(ExternalProject)
|
||||
|
@ -560,8 +568,8 @@ if(PKG_USER-SCAFACOS)
|
|||
list(APPEND LAMMPS_LINK_LIBS ${MPI_Fortran_LIBRARIES})
|
||||
list(APPEND LAMMPS_LINK_LIBS ${MPI_C_LIBRARIES})
|
||||
else()
|
||||
FIND_PACKAGE(PkgConfig REQUIRED)
|
||||
PKG_CHECK_MODULES(SCAFACOS scafacos REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(SCAFACOS REQUIRED scafacos)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_LDFLAGS})
|
||||
endif()
|
||||
include_directories(${SCAFACOS_INCLUDE_DIRS})
|
||||
|
|
Loading…
Reference in New Issue