用camke编译python程序

project(test)
cmake_minimum_required(VERSION 3.0)

find_package(OpenCV REQUIRED)
find_package (Python3 COMPONENTS Interpreter Development REQUIRED)

include_directories( ${Python3_INCLUDE_DIRS})
link_directories(${Python3_LIBRARY_DIRS})

add_executable( test test.cpp )
target_link_libraries( test ${OpenCV_LIBS} ${Python3_LIBRARIES} )

  

转载于:https://www.cnblogs.com/acm-jing/p/9776720.html

你可能感兴趣的:(python,人工智能)