From 95051b1226bdd08a0fe1a2fe3f5c77c06d3cd65f Mon Sep 17 00:00:00 2001 From: Frank Fu Date: Wed, 31 Jul 2024 12:32:25 +0100 Subject: [PATCH] Add fix for specifying the correct pycolmap CMake python development module name --- pycolmap/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pycolmap/CMakeLists.txt b/pycolmap/CMakeLists.txt index 4e33bf166a..65243a8323 100644 --- a/pycolmap/CMakeLists.txt +++ b/pycolmap/CMakeLists.txt @@ -19,7 +19,12 @@ endif() find_package(colmap REQUIRED) -find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) +if (CMAKE_VERSION VERSION_LESS 3.18) + set(DEV_MODULE Development) +else() + set(DEV_MODULE Development.Module) +endif() +find_package(Python REQUIRED COMPONENTS Interpreter ${DEV_MODULE} REQUIRED) find_package(pybind11 2.12.0 REQUIRED)