Skip to content

Commit

Permalink
fix installation issue fatropy with cmake version < 3.18 (issue #20 )
Browse files Browse the repository at this point in the history
  • Loading branch information
lvanroye committed Sep 13, 2024
1 parent 4ec0e9a commit bcf259d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ endif()
set(WITH_PYTHON OFF CACHE BOOL "Build python bindings (fatropy)")

if(WITH_PYTHON)
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
if(CMAKE_VERSION VERSION_LESS "3.18")
find_package(Python REQUIRED COMPONENTS Interpreter Development)
else()
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
endif()
find_package(pybind11 CONFIG)
if(NOT pybind11_FOUND)
add_subdirectory(external/pybind11)
Expand Down

0 comments on commit bcf259d

Please sign in to comment.