forked from Evil-Spirit/Adjacent
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
40 lines (30 loc) · 914 Bytes
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required(VERSION 3.1)
project(adjacent)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
option(BUILD_PYTHON_BINDINGS "Build Python bindings" ON)
set(PYTHON_EXECUTABLE $ENV{CONDA_PREFIX}/bin/python)
set(PYTHON_LIBRARIES $ENV{CONDA_PREFIX}/lib/)
find_package(xtl REQUIRED)
find_package(xtensor REQUIRED)
find_package(pybind11 REQUIRED)
include_directories(include)
include_directories(${xtl_INCLUDE_DIRS})
include_directories(${xtensor_INCLUDE_DIRS})
add_library(adjacent_lib
src/expression.cpp
src/expression_vector.cpp
src/gaussian_method.cpp
src/equation_system.cpp
src/expr_basis.cpp
)
target_link_libraries(adjacent_lib)
add_executable(adjacent_test
src/test.cpp
)
target_link_libraries(adjacent_test adjacent_lib)
if (BUILD_PYTHON_BINDINGS)
pybind11_add_module(adjacent_api
src/py_interface.cpp
)
target_link_libraries(adjacent_api PUBLIC pybind11::pybind11 adjacent_lib)
endif()