用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} )

  

posted @ 2018-10-12 10:33  Run_For_Love  阅读(806)  评论(0编辑  收藏  举报