# Configure EMSchur3D set(EMSCHUR3D_VERSION_MAJOR "0") set(EMSCHUR3D_VERSION_MINOR "0") set(EMSCHUR3D_VERSION_PATCH "1") set(EMSCHUR3D_VERSION "\"${EMSCHUR3D_VERSION_MAJOR}.${EMSCHUR3D_VERSION_MINOR}.${EMSCHUR3D_VERSION_PATCH}\"") set(EMSCHUR3D_VERSION_NOQUOTES "${EMSCHUR3D_VERSION_MAJOR}.${EMSCHUR3D_VERSION_MINOR}.${EMSCHUR3D_VERSION_PATCH}") option ( LEMMA_MODULE_EMSCHUR3D TRUE ) find_package( SuperLU ) if (SUPERLU_FOUND) message( STATUS "SuperLU was found" ) add_compile_options(-DHAVE_SUPERLU) INCLUDE_DIRECTORIES(${SUPERLU_INCLUDES}) endif() find_package( PaSTiX ) if ( PASTIX_FOUND ) message( STATUS "PaSTiX was found" ) add_compile_options(-DHAVE_PASTIX) INCLUDE_DIRECTORIES(${PASTIX_INCLUDES}) endif() find_package( Umfpack ) if ( UMFPACK_FOUND ) message( STATUS "Umfpack was found" ) add_compile_options(-DHAVE_UMFPACK) INCLUDE_DIRECTORIES(${UMFPACK_INCLUDES}) endif() if ( LEMMA_VTK6_SUPPORT OR LEMMA_VTK7_SUPPORT OR LEMMA_VTK8_SUPPORT AND LEMMA_MODULE_EMSCHUR3D ) configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/config/EMSchur3DConfig.h.in" "${PROJECT_BINARY_DIR}/include/EMSchur3DConfig.h" ) install ( FILES ${PROJECT_BINARY_DIR}/include/EMSchur3DConfig.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ ) add_subdirectory("src") add_library( emschur3d ${EMSCHUR3DSOURCE} ) target_include_directories( emschur3d PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ) set_target_properties(emschur3d PROPERTIES VERSION "${EMSCHUR3D_VERSION_NOQUOTES}" SOVERSION "${EMSCHUR3D_VERSION_MAJOR}.${LEMMA_VERSION_MINOR}" PROJECT_LABEL "EMSCHUR3D ${LABEL_SUFFIX}" CXX_STANDARD_14 CXX_STANDARD_REQUIRED_ON ) # Linking target_link_libraries(emschur3d "lemmacore" "fdem1d" ) # Linking target_link_libraries(emschur3d ${VTK_LIBRARIES}) if ( SUPERLU_FOUND ) target_link_libraries(emschur3d ${SUPERLU_LIBRARIES}) endif() if ( PASTIX_FOUND ) target_link_libraries(emschur3d ${PASTIX_LIBRARIES}) target_link_libraries(emschur3d "blas" "metis" "scotch" "scotchmetis" "scotcherr" "scotcherrexit" "hwloc") endif() if ( UMFPACK_FOUND ) target_link_libraries(emschur3d ${UMFPACK_LIBRARIES}) endif() # Testing if (LEMMA_ENABLE_TESTING) add_subdirectory(testing) endif() # Install install ( TARGETS emschur3d DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) install ( FILES include/EMSchur3D DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma ) install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma FILES_MATCHING PATTERN "*.h") #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/ FILES_MATCHING PATTERN "FDEM1D") #install ( DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/Lemma/FDEM1D FILES_MATCHING PATTERN "*.h") # Examples if ( LEMMA_BUILD_EXAMPLES) add_subdirectory(examples) endif() else() if ( LEMMA_MODULE_EMSCHUR3D ) message ( FATAL_ERROR "EMSChur3D requires VTK 6, 7, or 8" ) endif() endif()