Skip to content

Commit

Permalink
CMakeLists.txt: Use Development.Module for python (google#394)
Browse files Browse the repository at this point in the history
The "Development" component of  Python3 needs more files than we care about (e.g. `libpython3.xx.so`). However when compiling a module, we need fewer files, (e.g. the headers). To support this distinction, [cmake added `Development.Modules`](https://cmake.org/cmake/help/latest/module/FindPython3.html) so that this will work in more environments (e.g. docker image `quay.io/pypa/manylinux_2_28_x86_64`)
  • Loading branch information
andyneff authored Nov 30, 2024
1 parent 0fb1b8a commit 5b7598c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.18)

project(s2-geometry
VERSION 0.12.0)
Expand Down Expand Up @@ -67,7 +67,7 @@ if (WITH_PYTHON)
find_package(SWIG 4.0)
# Use Python3_ROOT_DIR to help find python3, if the correct location is not
# being found by default.
find_package(Python3 COMPONENTS Interpreter Development)
find_package(Python3 COMPONENTS Interpreter Development.Module)
endif()

if (MSVC)
Expand Down

0 comments on commit 5b7598c

Please sign in to comment.