File 0007-CMake-Use-Python-Module.patch of Package pybind11_protobuf
From fffb6ae1923aa6c485f9f8dc4194aa3f6c8cb7db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <[email protected]>
Date: Sun, 16 Jun 2024 19:08:51 +0200
Subject: [PATCH 7/7] [CMake] Use Python::Module
---
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 100bbf8..09c74dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ include(CTest)
# ============================================================================
# Find Python
-find_package(Python COMPONENTS Interpreter Development)
+find_package(Python COMPONENTS Interpreter Development.Module)
# ============================================================================
# Build dependencies
@@ -102,7 +102,7 @@ pybind11_add_module(
target_link_libraries(
pybind11_proto_utils PRIVATE absl::strings protobuf::libprotobuf
- ${Python_LIBRARIES})
+ Python::Module)
target_include_directories(
pybind11_proto_utils PRIVATE ${PROJECT_SOURCE_DIR} ${protobuf_INCLUDE_DIRS}
@@ -163,7 +163,7 @@ target_link_libraries(
absl::optional
protobuf::libprotobuf
pybind11::pybind11
- ${Python_LIBRARIES})
+ Python::Module)
target_include_directories(
pybind11_native_proto_caster
@@ -219,7 +219,7 @@ target_link_libraries(
absl::optional
protobuf::libprotobuf
pybind11::pybind11
- ${Python_LIBRARIES})
+ Python::Module)
target_include_directories(
pybind11_wrapped_proto_caster
--
2.45.0