forked from lava/matplotlib-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (23 loc) · 1.1 KB
/
CMakeLists.txt
File metadata and controls
34 lines (23 loc) · 1.1 KB
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
cmake_minimum_required(VERSION 3.0)
find_package(PythonLibs REQUIRED)
add_library(matplotlibcpp INTERFACE)
target_include_directories(matplotlibcpp INTERFACE include)
target_include_directories(matplotlibcpp INTERFACE ${PYTHON_INCLUDE_DIRS})
target_link_libraries(matplotlibcpp INTERFACE ${PYTHON_LIBRARIES})
option(MATPLOTLIBCPP_EXAMPLES "Build matplotlib examples" OFF)
if(MATPLOTLIBCPP_EXAMPLES)
set (CMAKE_CXX_STANDARD 11)
add_executable(minimal "examples/minimal.cpp")
target_link_libraries(minimal matplotlibcpp)
target_compile_definitions(minimal PRIVATE "-DWITHOUT_NUMPY")
add_executable(basic "examples/basic.cpp")
target_link_libraries(basic matplotlibcpp)
add_executable(modern "examples/modern.cpp")
target_link_libraries(modern matplotlibcpp)
add_executable(animation "examples/animation.cpp")
target_link_libraries(animation matplotlibcpp)
add_executable(nonblock "examples/nonblock.cpp")
target_link_libraries(nonblock matplotlibcpp)
add_executable(xkcd "examples/xkcd.cpp")
target_link_libraries(xkcd matplotlibcpp)
endif(MATPLOTLIBCPP_EXAMPLES)