Skip to content

Commit 3883742

Browse files
committed
Find all components of Python at the same time.
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
1 parent 3a7eee8 commit 3883742

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libtrellis/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ else()
5454
endif()
5555
set(Boost_NO_BOOST_CMAKE ON)
5656

57-
find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter)
5857
if (BUILD_PYTHON)
59-
find_package(Python3 3.5 REQUIRED COMPONENTS Development)
58+
find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter Development.Module)
6059
set(PythonInstallTarget "pytrellis")
60+
else()
61+
find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter)
6162
endif()
6263

6364
find_package(Boost REQUIRED COMPONENTS ${boost_libs})

0 commit comments

Comments
 (0)