From 8d4edc5702fb6448ce7ad967b3eca1fc3fedf75b Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 4 Apr 2011 09:58:36 +0000 Subject: [PATCH] --- CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a9e78bae7..6e65d10173 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -636,6 +636,16 @@ if(ENABLE_PETSC) find_library(PETSC_LIBS petsc PATHS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/lib) endif(NOT PETSC_LIBS) list(APPEND EXTERNAL_LIBRARIES ${PETSC_LIBS}) + # find slepc + if(ENABLE_SLEPC) + set(ENV_SLEPC_DIR $ENV{SLEPC_DIR}) + find_library(SLEPC_LIB slepc PATHS ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib) + if(SLEPC_LIB) + set_config_option(HAVE_SLEPC "SLEPc") + list(APPEND EXTERNAL_LIBRARIES ${SLEPC_LIB}) + list(APPEND EXTERNAL_INCLUDES ${ENV_SLEPC_DIR}/include) + endif(SLEPC_LIB) + endif(ENABLE_SLEPC) # find additional libraries to link with string(REGEX MATCH "PACKAGES_LIBS = [^\n\r]*" PLIBS ${PETSC_VARIABLES}) string(REPLACE "PACKAGES_LIBS = " "" PLIBS ${PLIBS}) @@ -648,16 +658,6 @@ if(ENABLE_PETSC) endif(EXISTS ${ENV_PETSC_DIR}/${ENV_PETSC_ARCH}/conf/petscvariables) endif(ENABLE_PETSC) -if(HAVE_PETSC AND ENABLE_SLEPC) - set(ENV_SLEPC_DIR $ENV{SLEPC_DIR}) - find_library(SLEPC_LIB slepc PATHS ${ENV_SLEPC_DIR}/${ENV_PETSC_ARCH}/lib) - if(SLEPC_LIB) - set_config_option(HAVE_SLEPC "SLEPc") - list(APPEND EXTERNAL_LIBRARIES ${SLEPC_LIB}) - list(APPEND EXTERNAL_INCLUDES ${ENV_SLEPC_DIR}/include) - endif(SLEPC_LIB) -endif(HAVE_PETSC AND ENABLE_SLEPC) - if(ENABLE_OCC) if(WIN32) set(OCC_SYS_NAME win32) -- GitLab