###
#
# PastixLib: define the pastix main library (libpastix)
#
###

#### add directories to pastix headers
set (modules blend common fax kass order perf sopalin symbol matrix_drivers)
foreach (mod ${modules})
  include_directories( ${CMAKE_BINARY_DIR}/${mod}/src)
  include_directories( ${mod}/src)
endforeach()
include_directories( ${CMAKE_BINARY_DIR}/murge/include)
include_directories( murge/include)

### Lib Pastix
if (NOT PASTIX_WITH_STARPU_CUDA)
  add_library(pastix ${PASTIX_LIB_SRC})
else()
  cuda_add_library(pastix ${PASTIX_LIB_SRC})
endif()
add_library(pastix_murge ${MURGE_LIB_SRC})
add_dependencies(pastix_murge murge_headers)
link_directories(${CMAKE_CURRENT_BINARY_DIR})

install(TARGETS pastix pastix_murge
  RUNTIME DESTINATION bin
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib
  PUBLIC_HEADER DESTINATION include)
