camke 添加 python 依赖

创建日期: 2024-06-05 11:46 | 作者: 风波 | 浏览次数: 20 | 分类: CMake

来源:https://stackoverflow.com/questions/11041299/python-h-no-such-file-or-directory

find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIRS})
target_link_libraries(<your exe or lib> ${PYTHON_LIBRARIES})

For details of the commands, run:

cmake --help-module FindPythonLibs
cmake --help-command find_package
cmake --help-command include_directories
cmake --help-command target_link_libraries
20 浏览
17 爬虫
0 评论