Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
matplotlibcpp17
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HKHLR
matplotlibcpp17
Commits
ff0248f5
Commit
ff0248f5
authored
3 years ago
by
soblin
Browse files
Options
Downloads
Patches
Plain Diff
(1) disable flags OFF (2) set matplotlibcpp17::matplotlibcpp17 target for add_subdirectory()
Signed-off-by:
soblin
<
hilo.sobli@gmail.com
>
parent
235674f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+9
-6
9 additions, 6 deletions
CMakeLists.txt
with
9 additions
and
6 deletions
CMakeLists.txt
+
9
−
6
View file @
ff0248f5
...
...
@@ -34,12 +34,12 @@ endif()
# gallery
if
(
NOT DEFINED USE_GUI
)
set
(
USE_GUI
1
)
message
(
STATUS
"set USE_GUI = O
N
"
)
set
(
USE_GUI
0
)
message
(
STATUS
"set USE_GUI = O
FF
"
)
endif
()
if
(
NOT DEFINED ADD_DEMO
)
set
(
ADD_DEMO
1
)
message
(
STATUS
"set ADD_DEMO = O
N
"
)
set
(
ADD_DEMO
0
)
message
(
STATUS
"set ADD_DEMO = O
FF
"
)
endif
()
if
(
USE_GUI
)
message
(
STATUS
"USE_GUI = ON"
)
...
...
@@ -52,8 +52,6 @@ else()
message
(
STATUS
"ADD_DEMO = OFF"
)
endif
()
set
(
matplotlibcpp17_INCLUDE_DIRS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include"
)
function
(
add_demo name path
)
add_executable
(
${
name
}
${
path
}
)
target_include_directories
(
${
name
}
PUBLIC
${
Python3_INCLUDE_DIRS
}
...
...
@@ -82,6 +80,11 @@ if(${ADD_DEMO})
add_subdirectory
(
gallery/scales
)
endif
()
# for add_subdirectory
add_library
(
matplotlibcpp17::matplotlibcpp17 INTERFACE IMPORTED GLOBAL
)
set_property
(
TARGET matplotlibcpp17::matplotlibcpp17 PROPERTY INTERFACE_INCLUDE_DIRECTORIES
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
${
Python3_INCLUDE_DIRS
}
)
set_property
(
TARGET matplotlibcpp17::matplotlibcpp17 PROPERTY INTERFACE_LINK_LIBRARIES
${
Python3_LIBRARIES
}
pybind11::embed
)
# install https://dominikberner.ch/cmake-interface-lib/
include
(
GNUInstallDirs
)
add_library
(
${
PROJECT_NAME
}
INTERFACE
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment