I have installed an external library named metis which resides at "/usr/local/opt/" in my system and I want to link this library to my existing make project, which seems to be difficult. I have tried a few reference links here on stackoverflow but they don't seem to work.
My CMakeLists.txt looks like this:
project(Multi)
cmake_minimum_required (VERSION 2.6)
find_package(CGAL QUIET COMPONENTS Core )
include( ${CGAL_USE_FILE} )
include_directories (BEFORE "/include")
include_directories (BEFORE "/dt")
find_package(MPI)
include_directories(SYSTEM ${MPI_INCLUDE_PATH})
SET(CMAKE_C_COMPILER mpicc)
SET(CMAKE_CXX_COMPILER mpicxx)
SET(MPIEXEC_MAX_NUMPROCS "4" CACHE STRING "Maximum number of processors available to run MPI applications.")
find_package(METIS)
include_directories("/usr/local/opt/metis/include")
add_subdirectory("/usr/local/opt/metis/include/bin")
add_executable(example example.cpp)
I have tried to add the location of the library by using add_subdirectory and include_directories tags but they don't seem to work.
Any help on this will be appreciated.