Skip to content
Snippets Groups Projects
Commit 7cbc864e authored by soblin's avatar soblin
Browse files

update CMakeLists.txt

parent faa079da
Branches
No related tags found
No related merge requests found
project(matplotlibcpp17)
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.12)
find_package(PythonLibs 3 REQUIRED)
find_package(PythonInterp 3 REQUIRED)
find_package(Python3 COMPONENTS Interpreter Development)
find_package(pybind11 REQUIRED)
if(NOT DEFINED ADD_DEMO)
......@@ -17,8 +16,8 @@ set(matplotlibcpp17_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include")
function(add_demo name path)
add_executable(${name} ${path})
target_include_directories(${name} PUBLIC ${pybind11_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS} ${matplotlibcpp17_INCLUDE_DIRS})
target_link_libraries(${name} ${PYTHON_LIBRARY} pybind11::embed)
target_include_directories(${name} PUBLIC ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS} ${matplotlibcpp17_INCLUDE_DIRS})
target_link_libraries(${name} ${Python3_LIBRARIES} pybind11::embed)
endfunction()
if(${ADD_DEMO})
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment