14
0
Files
pybind11-abseil/use-system-packages-if-possible.patch
Matej Cepl 64842edcbe This fixes a number of problems in the current package, e.g. python extension modules installed in %{_libdir} (status.so), missing CMake files, etc. This now allows building for google-or-tools.
- Add pybind11_abseil.patch, ported from google-or-tools. Change
  target type from plain library to python extension. 
- Drop find-and-link-python-libs.patch -- python extension should
  not link to the python libraries explcitly
- Replace install-headers.patch with
  0001-Install-headers-and-CMake-development-files.patch -- for
  downstream users, also the CMake files are required

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/pybind11-abseil?expand=0&rev=3
2024-06-26 20:21:08 +00:00

26 lines
1.0 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7045304..d18b02f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,15 +20,16 @@ FetchContent_Declare(
abseil-cpp
URL https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz
URL_HASH
- SHA256=59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5)
+ SHA256=59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5
+ FIND_PACKAGE_ARGS NAMES absl)
FetchContent_Declare(
pybind11
- URL https://github.com/pybind/pybind11/archive/refs/heads/master.tar.gz)
+ URL https://github.com/pybind/pybind11/archive/refs/heads/master.tar.gz
+ FIND_PACKAGE_ARGS)
+#find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
FetchContent_MakeAvailable(abseil-cpp pybind11)
-find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
-add_subdirectory(cmake/dependencies dependencies)
set(TOP_LEVEL_DIR ${CMAKE_CURRENT_LIST_DIR})
include_directories(${TOP_LEVEL_DIR} ${pybind11_INCLUDE_DIRS})