forked from pool/pybind11-abseil
Pybind11 bindings for the Abseil C++ Common Libraries (fixed devel package name from superseded sr). Note: Needed for google-or-tools update [https://build.opensuse.org/request/show/1169757] OBS-URL: https://build.opensuse.org/request/show/1170479 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/pybind11-abseil?expand=0&rev=1
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
---
|
|
CMakeLists.txt | 3 +++
|
|
pybind11_abseil/CMakeLists.txt | 1 +
|
|
2 files changed, 4 insertions(+)
|
|
|
|
Index: pybind11_abseil-202402.0/CMakeLists.txt
|
|
===================================================================
|
|
--- pybind11_abseil-202402.0.orig/CMakeLists.txt
|
|
+++ pybind11_abseil-202402.0/CMakeLists.txt
|
|
@@ -16,6 +16,9 @@ if(CMAKE_VERSION VERSION_GREATER_EQUAL 3
|
|
cmake_policy(SET CMP0135 NEW)
|
|
endif()
|
|
|
|
+# Needs to be called *before* looking for pybind11 to ensure pybind11 uses the same python
|
|
+find_package(Python COMPONENTS Interpreter Development)
|
|
+
|
|
FetchContent_Declare(
|
|
absl
|
|
URL https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz
|
|
Index: pybind11_abseil-202402.0/pybind11_abseil/CMakeLists.txt
|
|
===================================================================
|
|
--- pybind11_abseil-202402.0.orig/pybind11_abseil/CMakeLists.txt
|
|
+++ pybind11_abseil-202402.0/pybind11_abseil/CMakeLists.txt
|
|
@@ -1,5 +1,6 @@
|
|
add_subdirectory(compat)
|
|
add_subdirectory(cpp_capsule_tools)
|
|
+link_libraries(${Python_LIBRARIES})
|
|
|
|
# absl_casters ============================================================
|
|
add_library(absl_casters INTERFACE)
|