CMake: Allow external libE57Format

This commit is contained in:
Chris Hennes
2025-03-31 23:38:11 -05:00
committed by Benjamin Nauck
parent 5412d0a4eb
commit 62b0e6eb4f
4 changed files with 25 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ macro(InitializeFreeCADBuildOptions)
option(FREECAD_USE_EXTERNAL_KDL "Use system installed orocos-kdl instead of the bundled." OFF)
option(FREECAD_USE_EXTERNAL_FMT "Use system installed fmt library if available instead of fetching the source." ON)
option(FREECAD_USE_EXTERNAL_ONDSELSOLVER "Use system installed OndselSolver instead of git submodule." OFF)
option(FREECAD_USE_EXTERNAL_E57FORMAT "Use system installed libE57Format instead of the bundled." OFF)
option(FREECAD_USE_FREETYPE "Builds the features using FreeType libs" ON)
option(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
option(FREECAD_CHECK_PIVY "Check for pivy version using Python at build time" ON)

View File

@@ -27,6 +27,12 @@ endif()
find_package(XercesC REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/cmake NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 XercesC ${XercesC_VERSION}")
if(FREECAD_LIBPACK_VERSION VERSION_GREATER_EQUAL "3.1.1")
set(FREECAD_USE_EXTERNAL_E57FORMAT ON)
find_package(E57Format REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake/e57format NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 e57format ${e57format_VERSION}")
endif()
find_package(yaml-cpp REQUIRED PATHS ${FREECAD_LIBPACK_DIR}/lib/cmake NO_DEFAULT_PATH)
message(STATUS "Found LibPack 3 yaml-cpp ${yaml-cpp_VERSION}")