Skip to content

Commit

Permalink
Find all components of Python at the same time.
Browse files Browse the repository at this point in the history
This is explicitly recommended by the FindPython module documentation
and is required to avoid failed builds on some systems. See:
https://cmake.org/cmake/help/latest/module/FindPython.html
  • Loading branch information
whitequark committed Jan 11, 2025
1 parent 3f15989 commit 14ac883
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libtrellis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ else()
endif()
set(Boost_NO_BOOST_CMAKE ON)

find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter)
if (BUILD_PYTHON)
find_package(Python3 3.5 REQUIRED COMPONENTS Development)
find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter Development.Module)
set(PythonInstallTarget "pytrellis")
else()
find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter)
endif()

find_package(Boost REQUIRED COMPONENTS ${boost_libs})
Expand Down

0 comments on commit 14ac883

Please sign in to comment.