Clion+Win10+cmake使用python
clion 配置使用python
引入python模块
cmake 默认提供了一些内置的模块,输入
cmake --help-module-list
可以查看内置支持的模块。
find_package(Python3 3.7 COMPONENTS Interpreter Development)
if (Python3_FOUND)
message("Python include directory: " ${
Python3_INCLUDE_DIRS})
message("Python version is: " ${
Python3_VERSION})
include_directories(${
Python3_INCLUDE_DIRS})
target_link_libraries(main ${
Python3_LIBRARIES}