Pārlūkot izejas kodu

Clarify instructions for CMake users

Benno Evers 8 gadi atpakaļ
vecāks
revīzija
598aa8e1a3
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      README.md

+ 9 - 0
README.md

@@ -109,6 +109,15 @@ anywhere.
 Since a python interpreter is opened internally, it is necessary to link against `libpython2.7` in order to use
 Since a python interpreter is opened internally, it is necessary to link against `libpython2.7` in order to use
 matplotlib-cpp.
 matplotlib-cpp.
 
 
+# CMake
+
+If you prefer to use CMake as build system, you will want to add something like this to your
+CMakeLists.txt:
+
+    find_package(PythonLibs 2.7)
+    target_include_directories(myproject ${PYTHON_INCLUDE_DIRS})
+    target_link_libraries(myproject ${PYTHON_LIBRARIES)
+
 # Python 3
 # Python 3
 
 
 This library supports both python2 and python3 (although the python3 support is probably far less tested,
 This library supports both python2 and python3 (although the python3 support is probably far less tested,