How to use with CPM (cmake package manager) #4759
paulocoutinhox
started this conversation in
General
Replies: 1 comment
-
Here's an example: CPMAddPackage(
NAME pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
VERSION 2.13.6
DOWNLOAD_ONLY YES
)
if(pybind11_ADDED)
find_package(PythonLibs REQUIRED)
target_include_directories(<project_name> PRIVATE ${PYTHON_INCLUDE_DIRS})
target_include_directories(<project_name> PRIVATE ${pybind11_SOURCE_DIR}/include)
target_link_libraries(<project_name> ${PYTHON_LIBRARIES})
endif() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I want use this library into my project and i need use CPM because my cmake projecta already use it for other libraries.
Anyone already do it and can help me?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions