diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-07 21:01:23 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-01-08 09:10:26 +0100 |
commit | 1c121b8a9a5f4916990adcd16070a0124b0e8fbe (patch) | |
tree | 7f8a9ab16017cf7ef90872cbc2fe91b5fffce474 /examples/python/CMakeLists.txt | |
parent | workflows/test: upgrade actions (diff) | |
download | build-boost-1c121b8a9a5f4916990adcd16070a0124b0e8fbe.tar.gz build-boost-1c121b8a9a5f4916990adcd16070a0124b0e8fbe.zip |
workflows/test: test building Boost.Pythontest
Diffstat (limited to 'examples/python/CMakeLists.txt')
-rw-r--r-- | examples/python/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/python/CMakeLists.txt b/examples/python/CMakeLists.txt new file mode 100644 index 0000000..f43c3a7 --- /dev/null +++ b/examples/python/CMakeLists.txt @@ -0,0 +1,11 @@ +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}") |