cmake_minimum_required(VERSION 2.8) project(METIS) # added for SuiteSparse: message ( FATAL "This copy of METIS (inside SuiteSparse) cannot be built as a stand-alone library. Use the CHOLMOD/CMakeLists.txt to compile CHOLMOD with METIS." ) set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib") set(SHARED FALSE CACHE BOOL "build a shared library") if(MSVC) set(METIS_INSTALL FALSE) else() set(METIS_INSTALL TRUE) endif() # Configure libmetis library. if(SHARED) set(METIS_LIBRARY_TYPE SHARED) else() set(METIS_LIBRARY_TYPE STATIC) endif(SHARED) include(${GKLIB_PATH}/GKlibSystem.cmake) # Add include directories. include_directories(${GKLIB_PATH}) include_directories(include) # Recursively look for CMakeLists.txt in subdirs. add_subdirectory("include") add_subdirectory("libmetis") add_subdirectory("programs")