Build option: do not force PCL to be always enabled on Win32, add option to allow to disable it

This commit is contained in:
wmayer
2019-11-29 16:15:16 +01:00
parent 47dfe708d9
commit 3bbd415523
2 changed files with 1 additions and 62 deletions

View File

@@ -158,6 +158,7 @@ macro(InitializeFreeCADBuildOptions)
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" ON)
option(FREECAD_USE_3DCONNEXION "Use the 3D connexion SDK to support 3d mouse." ON)
elseif(APPLE)
find_library(3DCONNEXIONCLIENT_FRAMEWORK 3DconnexionClient)

View File

@@ -67,65 +67,3 @@ if(FREECAD_USE_FREETYPE)
endif(FREECAD_USE_FREETYPE)
link_directories(${FREECAD_LIBPACK_DIR}/lib)
find_package(PCL QUIET)
if(NOT EXISTS ${PCL_INCLUDE_DIRS})
set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.7)
set(PCL_LIBRARY_DIRS ${FREECAD_LIBPACK_DIR}/lib)
set(PCL_COMMON_LIBRARIES optimized pcl_common_release debug pcl_common_debug)
set(PCL_FEATURES_LIBRARIES optimized pcl_features_release debug pcl_features_debug)
set(PCL_FILTERS_LIBRARIES optimized pcl_filters_release debug pcl_filters_debug)
set(PCL_IO_LIBRARIES optimized pcl_io_release debug pcl_io_debug)
set(PCL_IO_PLY_LIBRARIES optimized pcl_io_ply_release debug pcl_io_ply_debug)
set(PCL_KDTREE_LIBRARIES optimized pcl_kdtree_release debug pcl_kdtree_debug)
set(PCL_KEYPOINTS_LIBRARIES optimized pcl_keypoints_release debug pcl_keypoints_debug)
set(PCL_ML_LIBRARIES optimized pcl_ml_release debug pcl_ml_debug)
set(PCL_OCTREE_LIBRARIES optimized pcl_octree_release debug pcl_octree_debug)
set(PCL_RECOGNITION_LIBRARIES optimized pcl_recognition_release debug pcl_recognition_debug)
set(PCL_REGISTRATION_LIBRARIES optimized pcl_registration_release debug pcl_registration_debug)
set(PCL_SAMPLE_CONSENSUS_LIBRARIES optimized pcl_sample_consensus_release debug pcl_sample_consensus_debug)
set(PCL_SEARCH_LIBRARIES optimized pcl_search_release debug pcl_search_debug)
set(PCL_SEGMENTATION_LIBRARIES optimized pcl_segmentation_release debug pcl_segmentation_debug)
set(PCL_STEREO_LIBRARIES optimized pcl_stereo_release debug pcl_stereo_debug)
set(PCL_SURFACE_LIBRARIES optimized pcl_surface_release debug pcl_surface_debug)
set(PCL_TRACKING_LIBRARIES optimized pcl_tracking_release debug pcl_tracking_debug)
set(PCL_LIBRARIES
${PCL_COMMON_LIBRARIES}
${PCL_FEATURES_LIBRARIES}
${PCL_FILTERS_LIBRARIES}
${PCL_IO_LIBRARIES}
${PCL_IO_PLY_LIBRARIES}
${PCL_KDTREE_LIBRARIES}
${PCL_KEYPOINTS_LIBRARIES}
${PCL_ML_LIBRARIES}
${PCL_OCTREE_LIBRARIES}
${PCL_RECOGNITION_LIBRARIES}
${PCL_REGISTRATION_LIBRARIES}
${PCL_SAMPLE_CONSENSUS_LIBRARIES}
${PCL_SEARCH_LIBRARIES}
${PCL_SEGMENTATION_LIBRARIES}
${PCL_STEREO_LIBRARIES}
${PCL_SURFACE_LIBRARIES}
${PCL_TRACKING_LIBRARIES}
)
set(PCL_FOUND TRUE)
set(PCL_COMMON_FOUND TRUE)
set(PCL_FEATURES_FOUND TRUE)
set(PCL_FILTERS_FOUND TRUE)
set(PCL_IO_FOUND TRUE)
set(PCL_IO_PLY_FOUND TRUE)
set(PCL_KDTREE_FOUND TRUE)
set(PCL_KEYPOINTS_FOUND TRUE)
set(PCL_ML_FOUND TRUE)
set(PCL_OCTREE_FOUND TRUE)
set(PCL_RECOGNITION_FOUND TRUE)
set(PCL_REGISTRATION_FOUND TRUE)
set(PCL_SAMPLE_CONSENSUS_FOUND TRUE)
set(PCL_SEARCH_FOUND TRUE)
set(PCL_SEGMENTATION_FOUND TRUE)
set(PCL_STEREO_FOUND TRUE)
set(PCL_SURFACE_FOUND TRUE)
set(PCL_TRACKING_FOUND TRUE)
endif()