From 1a2d82f3d720e324a3929d2f8b002908c87aca5a Mon Sep 17 00:00:00 2001 From: strey1998 Date: Wed, 24 Feb 2021 19:07:24 -0800 Subject: [PATCH 1/3] Create CMakeLists.txt added CMakeLists.txt --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9c6a704 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required (VERSION 3.15) + +add_library(matplotlib-cpp matplotlibcpp.h) +set_target_properties(matplotlib-cpp PROPERTIES LINKER_LANGUAGE CXX) +target_include_directories(matplotlib-cpp PUBLIC .) From 5aa4571d41d824a472788c0f2d30742e071d994b Mon Sep 17 00:00:00 2001 From: Trey Stoner Date: Wed, 24 Feb 2021 20:18:28 -0800 Subject: [PATCH 2/3] hopefullly fixed CMakeLists --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c6a704..fc73edd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required (VERSION 3.15) -add_library(matplotlib-cpp matplotlibcpp.h) +find_package(Python3 COMPONENTS Development) + +add_library(matplotlib-cpp INTERFACE) set_target_properties(matplotlib-cpp PROPERTIES LINKER_LANGUAGE CXX) +target_link_libraries(matplotlib-cpp PUBLIC Python3::Python) target_include_directories(matplotlib-cpp PUBLIC .) From 73f68bf96e58cc4844129b2d6a6e5b75465f0f2c Mon Sep 17 00:00:00 2001 From: Trey Stoner Date: Thu, 25 Feb 2021 14:41:15 -0800 Subject: [PATCH 3/3] no numpy --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc73edd..498d7c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,9 @@ cmake_minimum_required (VERSION 3.15) find_package(Python3 COMPONENTS Development) +add_compile_definitions(WITHOUT_NUMPY) + add_library(matplotlib-cpp INTERFACE) set_target_properties(matplotlib-cpp PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(matplotlib-cpp PUBLIC Python3::Python) -target_include_directories(matplotlib-cpp PUBLIC .) +target_link_libraries(matplotlib-cpp INTERFACE Python3::Python) +target_include_directories(matplotlib-cpp INTERFACE .)