Merge pull request #18244 from wwmayer/space_mouse_runtime

Gui: Add runtime check to choose between modern and legacy space mous…
This commit is contained in:
Chris Hennes
2024-12-09 11:36:17 -05:00
committed by GitHub
7 changed files with 141 additions and 68 deletions

View File

@@ -144,16 +144,10 @@ macro(InitializeFreeCADBuildOptions)
if(MSVC)
set(FREECAD_3DCONNEXION_SUPPORT "NavLib" CACHE STRING "Select version of the 3Dconnexion device integration")
set_property(CACHE FREECAD_3DCONNEXION_SUPPORT PROPERTY STRINGS "NavLib" "Raw input")
else(MSVC)
set(FREECAD_3DCONNEXION_SUPPORT "Raw input")
endif(MSVC)
if(MSVC)
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
set_property(CACHE FREECAD_3DCONNEXION_SUPPORT PROPERTY STRINGS "NavLib" "Raw input" "Both")
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
elseif(APPLE)
set(FREECAD_USE_3DCONNEXION_RAWINPUT ON)
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)
if(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
@@ -161,18 +155,27 @@ macro(InitializeFreeCADBuildOptions)
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." OFF)
endif(IS_DIRECTORY ${3DCONNEXIONCLIENT_FRAMEWORK})
else(MSVC)
set(FREECAD_USE_3DCONNEXION_RAWINPUT ON)
set(FREECAD_USE_3DCONNEXION OFF )
endif(MSVC)
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "NavLib" AND FREECAD_USE_3DCONNEXION)
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
set(FREECAD_USE_3DCONNEXION OFF)
elseif(FREECAD_3DCONNEXION_SUPPORT STREQUAL "Both" AND FREECAD_USE_3DCONNEXION)
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
set(FREECAD_USE_3DCONNEXION_RAWINPUT ON)
endif()
if(MSVC)
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" ON)
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF) # 3/5/2021 current LibPack uses non-C++17 FLANN
endif(MSVC)
if(NOT MSVC)
option(BUILD_FEM_NETGEN "Build the FreeCAD FEM module with the NETGEN mesher" OFF)
option(FREECAD_USE_PCL "Build the features that use PCL libs" OFF)
endif(NOT MSVC)
if(FREECAD_3DCONNEXION_SUPPORT STREQUAL "NavLib" AND FREECAD_USE_3DCONNEXION)
set(FREECAD_USE_3DCONNEXION_NAVLIB ON)
set(FREECAD_USE_3DCONNEXION OFF)
endif()
# if this is set override some options
if (FREECAD_BUILD_DEBIAN)
set(FREECAD_USE_EXTERNAL_ZIPIOS ON )

View File

@@ -193,13 +193,19 @@ macro(PrintFinalReport)
simple(Coin3D "${COIN3D_VERSION} [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
simple(pivy ${PIVY_VERSION})
if (WIN32)
if (FREECAD_USE_3DCONNEXION)
simple(3Dconnexion "Building 3Dconnexion support with original code")
if (FREECAD_USE_3DCONNEXION_RAWINPUT AND FREECAD_USE_3DCONNEXION_NAVLIB)
simple(3Dconnexion "Building 3Dconnexion support with raw input and NavLib")
elseif (FREECAD_USE_3DCONNEXION)
simple(3Dconnexion "Building 3Dconnexion support with raw input")
elseif(FREECAD_USE_3DCONNEXION_NAVLIB)
simple(3Dconnexion "Building 3Dconnexion support with NavLib")
else()
simple(3Dconnexion "Not building 3Dconnexion device support")
endif()
elseif(APPLE)
if (FREECAD_USE_3DCONNEXION)
simple(3Dconnexion "Building 3Dconnexion support with raw input")
endif()
else()
conditional(SPNAV SPNAV_FOUND "not found" "[${SPNAV_LIBRARY}] [${SPNAV_INCLUDE_DIR}]")
endif()