diff options
author | Josh Morman <jmorman@gnuradio.org> | 2022-01-04 16:59:32 -0500 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2022-01-06 06:22:47 -0500 |
commit | b8d853a1a04b16cf9261e216b5330a4e7523b6ad (patch) | |
tree | 210384bf2191ba0b1ed5a2fff2d88bbe70b03340 /gnuradio-runtime/lib | |
parent | ad843023c65dc35aed73b7a4e4a78afbc7347f5d (diff) |
cmake: build python deps conditionally
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
Diffstat (limited to 'gnuradio-runtime/lib')
-rw-r--r-- | gnuradio-runtime/lib/CMakeLists.txt | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt index 2d8a81ab10..6cd9c0c54f 100644 --- a/gnuradio-runtime/lib/CMakeLists.txt +++ b/gnuradio-runtime/lib/CMakeLists.txt @@ -52,7 +52,6 @@ add_library(gnuradio-runtime block.cc block_detail.cc block_executor.cc - block_gateway_impl.cc block_registry.cc buffer.cc buffer_double_mapped.cc @@ -99,6 +98,12 @@ add_library(gnuradio-runtime vmcircbuf_sysv_shm.cc ) +if (ENABLE_PYTHON) + target_sources(gnuradio-runtime PRIVATE + block_gateway_impl.cc + ) +endif() + # Messages target_sources(gnuradio-runtime PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/messages/msg_accepter.cc @@ -135,14 +140,20 @@ target_link_libraries(gnuradio-runtime PUBLIC # INTERFACE/PRIVATE split so users of the library can choose how to link to Python # (importantly, extension modules can avoid linking against Python and resolve # their own Python symbols at runtime through the Python interpreter's linking) - INTERFACE - Python::Module PRIVATE - Python::Python - libunwind::libunwind - pybind11::pybind11 + libunwind::libunwind ) +if (ENABLE_PYTHON) +target_link_libraries(gnuradio-runtime + INTERFACE + Python::Module + PRIVATE + Python::Python + pybind11::pybind11 +) +endif() + # Address linker issues with std::filesystem on Centos 8 and Debian target_link_libraries(gnuradio-runtime PUBLIC $<$<AND:$<CXX_COMPILER_ID:GNU>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>) |