ports/devel/pybind11_abseil/files/patch-CMakeLists.txt
Po-Chuan Hsieh 6b60264421
devel/pybind11_abseil: Add pybind11_abseil 202402.0
pybind11_abseil provides the pybind11 bindings for the Abseil C++ common
libraries. These adapters make Abseil types work with Pybind11 bindings.
2024-08-16 00:00:06 +08:00

33 lines
1,020 B
Text

--- CMakeLists.txt.orig 2024-02-16 17:39:49 UTC
+++ CMakeLists.txt
@@ -1,7 +1,6 @@ project(pybind11_abseil LANGUAGES CXX)
cmake_minimum_required(VERSION 3.11)
project(pybind11_abseil LANGUAGES CXX)
-include(FetchContent)
include(CTest)
if(NOT DEFINED CMAKE_CXX_STANDARD)
@@ -16,19 +15,10 @@ endif()
cmake_policy(SET CMP0135 NEW)
endif()
-FetchContent_Declare(
- abseil-cpp
- URL https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz
- URL_HASH
- SHA256=59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5)
+find_package(absl REQUIRED)
+find_package(pybind11 REQUIRED)
-FetchContent_Declare(
- pybind11
- URL https://github.com/pybind/pybind11/archive/refs/heads/master.tar.gz)
-
-FetchContent_MakeAvailable(abseil-cpp pybind11)
-
set(TOP_LEVEL_DIR ${CMAKE_CURRENT_LIST_DIR})
-include_directories(${TOP_LEVEL_DIR} ${pybind11_INCLUDE_DIRS})
+include_directories(${TOP_LEVEL_DIR} ${abseil_INCLUDE_DIRS} ${pybind11_INCLUDE_DIRS})
add_subdirectory(pybind11_abseil)