aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/CMakeLists.txt
blob: 931cc6e20afcde3cdcfa5b4b0dbc232abb206388 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
set(Eigen_HEADERS Core LU Cholesky QR Geometry Sparse Array SVD LeastSquares QtAlignedMalloc StdVector Householder Jacobi Eigenvalues)

if(EIGEN_BUILD_LIB)
    set(Eigen_SRCS
      src/Core/CoreInstantiations.cpp
      src/Cholesky/CholeskyInstantiations.cpp
      src/QR/QrInstantiations.cpp
    )

    add_library(Eigen2 SHARED ${Eigen_SRCS})

    install(TARGETS Eigen2
            RUNTIME DESTINATION bin
            LIBRARY DESTINATION lib
            ARCHIVE DESTINATION lib)
endif(EIGEN_BUILD_LIB)

if(CMAKE_COMPILER_IS_GNUCXX)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g1 -O2")
    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g1 -O2")
endif(CMAKE_COMPILER_IS_GNUCXX)

install(FILES
  ${Eigen_HEADERS}
  DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
  )

add_subdirectory(src)