blob: f43c3a7b6d580281833ef806927e374b930e2c23 (
plain) (
tree)
|
|
cmake_minimum_required(VERSION 3.5) # for Boost::* imported targets
project(example_python)
find_package(Python REQUIRED COMPONENTS Development)
set(boost_python "python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}")
find_package(Boost REQUIRED COMPONENTS "${boost_python}")
add_library(hello SHARED hello.cpp)
target_link_libraries(hello PRIVATE Python::Module)
target_link_libraries(hello PRIVATE Boost::disable_autolinking "Boost::${boost_python}")
|