-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
27 lines (24 loc) · 1.18 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.15...3.26)
project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX)
set(PYBIND11_FINDPYTHON ON)
find_package(pybind11 CONFIG REQUIRED)
include(FetchContent)
FetchContent_Declare(
eigen
URL https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
URL_HASH
SHA256=b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626
SOURCE_SUBDIR ignore_cmakelists)
FetchContent_MakeAvailable(eigen)
pybind11_add_module(_core MODULE src/main.cpp)
pybind11_add_module(_eigenvalues MODULE src/selfAdjointEigenSolver.cpp)
pybind11_add_module(real_matrices MODULE src/real_matrices.cpp)
pybind11_add_module(_eigenLLT MODULE src/LLT.cpp)
target_include_directories(_core PRIVATE "${eigen_SOURCE_DIR}")
target_include_directories(_eigenvalues PRIVATE "${eigen_SOURCE_DIR}")
target_include_directories(_eigenLLT PRIVATE "${eigen_SOURCE_DIR}")
target_include_directories(real_matrices PRIVATE "${eigen_SOURCE_DIR}")
install(TARGETS _core DESTINATION ${SKBUILD_PROJECT_NAME})
install(TARGETS real_matrices DESTINATION ${SKBUILD_PROJECT_NAME})
install(TARGETS _eigenLLT DESTINATION ${SKBUILD_PROJECT_NAME})
install(TARGETS _eigenvalues DESTINATION ${SKBUILD_PROJECT_NAME})