8000 Clarify instructions for CMake users · konanrobot/matplotlib-cpp@598aa8e · GitHub
[go: up one dir, main page]

Skip to content

Commit 598aa8e

Browse files
committed
Clarify instructions for CMake users
1 parent 2ce9760 commit 598aa8e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ anywhere.
109109
Since a python interpreter is opened internally, it is necessary to link against `libpython2.7` in order to use
110110
matplotlib-cpp.
111111

112+
# CMake
113+
114+
If you prefer to use CMake as build system, you will want to add something like this to your
115+
CMakeLists.txt:
116+
117+
find_package(PythonLibs 2.7)
118+
target_include_directories(myproject ${PYTHON_INCLUDE_DIRS})
119+
target_link_libraries(myproject ${PYTHON_LIBRARIES)
120+
112121
# Python 3
113122

114123
This library supports both python2 and python3 (although the python3 support is probably far less tested,

0 commit comments

Comments
 (0)
0