首页 > 技术文章 > 用camke编译python程序

acm-jing 2018-10-12 10:33 原文

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

  

推荐阅读