From 6e269b0f81aa49f2da30cecb1fb5d91b962c9213 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Tue, 4 Mar 2025 19:26:18 -0600 Subject: [PATCH] CMake: If using Libpack, require at least v3.1 Previous versions did not include pybind11, but the error message from that failure is not terribly informative. This way the exact means of fixing the problem is provided in the message. --- cMake/UseLibPack3.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cMake/UseLibPack3.cmake b/cMake/UseLibPack3.cmake index bce443a9ed..e1da9548dc 100644 --- a/cMake/UseLibPack3.cmake +++ b/cMake/UseLibPack3.cmake @@ -19,6 +19,9 @@ if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.0") find_package(pybind11 REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/share/cmake/pybind11 NO_DEFAULT_PATH) message(STATUS "Found LibPack 3 pybind11 ${pybind11_VERSION}") set(FREECAD_USE_PYBIND11 ON) +else() + # We have completely removed support for boost-python and require pybind11, which requires LibPack 3.1 or later + message(FATAL_ERROR "FreeCAD now requires LibPack 3.1.0 or newer (you are using ${FREECAD_LIBPACK_VERSION}): please upgrade your LibPack") endif() find_package(XercesC REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/cmake NO_DEFAULT_PATH) @@ -28,6 +31,7 @@ find_package(yaml-cpp REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT message(STATUS "Found LibPack 3 yaml-cpp ${yaml-cpp_VERSION}") find_package(Coin REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH) + message(STATUS "Found LibPack 3 Coin ${Coin_VERSION}") # For compatibility with the rest of the cMake scripts: set (COIN3D_FOUND TRUE)