-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 2139dc0..1942ad0 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -27,7 +27,7 @@ include(CTest) | ||
# ============================================================================ | ||
# Find Python | ||
|
||
-find_package(Python COMPONENTS Interpreter Development) | ||
+find_package(Python3 COMPONENTS Interpreter Development.Module) | ||
|
||
# ============================================================================ | ||
# Build dependencies | ||
@@ -87,8 +87,10 @@ pybind11_add_module( | ||
pybind11_protobuf/proto_utils.h) | ||
|
||
target_link_libraries( | ||
- pybind11_proto_utils PRIVATE absl::strings protobuf::libprotobuf | ||
- ${Python_LIBRARIES}) | ||
+ pybind11_proto_utils PRIVATE | ||
+ absl::strings | ||
+ protobuf::libprotobuf | ||
+ Python3::Module) | ||
|
||
target_include_directories( | ||
pybind11_proto_utils PRIVATE ${PROJECT_SOURCE_DIR} ${protobuf_INCLUDE_DIRS} | ||
@@ -116,10 +118,11 @@ target_link_libraries( | ||
absl::optional | ||
protobuf::libprotobuf | ||
pybind11::pybind11 | ||
- ${Python_LIBRARIES}) | ||
+ Python3::Module) | ||
|
||
target_include_directories( | ||
pybind11_native_proto_caster | ||
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
PRIVATE ${PROJECT_SOURCE_DIR} ${protobuf_INCLUDE_DIRS} ${protobuf_SOURCE_DIR} | ||
${pybind11_INCLUDE_DIRS}) | ||
|
||
@@ -143,7 +146,7 @@ target_link_libraries( | ||
absl::optional | ||
protobuf::libprotobuf | ||
pybind11::pybind11 | ||
- ${Python_LIBRARIES}) | ||
+ Python3::Module) | ||
|
||
target_include_directories( | ||
pybind11_wrapped_proto_caster |