From 90e3b58950f41f16f37c27ba87aabbc35d478589 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 28 Aug 2014 10:41:59 +0200 Subject: [PATCH] + set pcl components for LibPacks --- cMake/UseLibPack10x.cmake | 92 +++++++++++-------- cMake/UseLibPack9x.cmake | 74 +++++++++------ src/Mod/Points/App/AppPointsPy.cpp | 20 ++-- src/Mod/ReverseEngineering/App/CMakeLists.txt | 3 +- 4 files changed, 113 insertions(+), 76 deletions(-) diff --git a/cMake/UseLibPack10x.cmake b/cMake/UseLibPack10x.cmake index fb4adb0fb..e77186da5 100644 --- a/cMake/UseLibPack10x.cmake +++ b/cMake/UseLibPack10x.cmake @@ -353,43 +353,63 @@ set(NGLIB_DEBUG_LIBRARIES # Pointscloud library set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.7) -set(PCL_LIBRARIES - debug pcl_common_debug.lib - optimized pcl_common_release.lib - debug pcl_features_debug.lib - optimized pcl_features_release.lib - debug pcl_filters_debug.lib - optimized pcl_filters_release.lib - debug pcl_io_debug.lib - debug pcl_io_ply_debug.lib - optimized pcl_io_ply_release.lib - optimized pcl_io_release.lib - debug pcl_kdtree_debug.lib - optimized pcl_kdtree_release.lib - debug pcl_keypoints_debug.lib - optimized pcl_keypoints_release.lib - debug pcl_ml_debug.lib - optimized pcl_ml_release.lib - debug pcl_octree_debug.lib - optimized pcl_octree_release.lib - debug pcl_recognition_debug.lib - optimized pcl_recognition_release.lib - debug pcl_registration_debug.lib - optimized pcl_registration_release.lib - debug pcl_sample_consensus_debug.lib - optimized pcl_sample_consensus_release.lib - debug pcl_search_debug.lib - optimized pcl_search_release.lib - debug pcl_segmentation_debug.lib - optimized pcl_segmentation_release.lib - debug pcl_stereo_debug.lib - optimized pcl_stereo_release.lib - debug pcl_surface_debug.lib - optimized pcl_surface_release.lib - debug pcl_tracking_debug.lib - optimized pcl_tracking_release.lib +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_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) set(FLANN_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/flann-1.8) diff --git a/cMake/UseLibPack9x.cmake b/cMake/UseLibPack9x.cmake index 392b85bb1..5aab7f1b0 100644 --- a/cMake/UseLibPack9x.cmake +++ b/cMake/UseLibPack9x.cmake @@ -474,36 +474,54 @@ SET(PYSIDE_TYPESYSTEMS ${FREECAD_LIBPACK_DIR}/pyside/share/PySide/typesystems) # Pointscloud library set(PCL_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/pcl-1.6) +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_OCTREE_LIBRARIES optimized pcl_octree_release debug pcl_octree_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_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 - debug pcl_common_debug.lib - optimized pcl_common_release.lib - debug pcl_features_debug.lib - optimized pcl_features_release.lib - debug pcl_filters_debug.lib - optimized pcl_filters_release.lib - debug pcl_io_debug.lib - debug pcl_io_ply_debug.lib - optimized pcl_io_ply_release.lib - optimized pcl_io_release.lib - debug pcl_kdtree_debug.lib - optimized pcl_kdtree_release.lib - debug pcl_keypoints_debug.lib - optimized pcl_keypoints_release.lib - debug pcl_octree_debug.lib - optimized pcl_octree_release.lib - debug pcl_registration_debug.lib - optimized pcl_registration_release.lib - debug pcl_sample_consensus_debug.lib - optimized pcl_sample_consensus_release.lib - debug pcl_search_debug.lib - optimized pcl_search_release.lib - debug pcl_segmentation_debug.lib - optimized pcl_segmentation_release.lib - debug pcl_surface_debug.lib - optimized pcl_surface_release.lib - debug pcl_tracking_debug.lib - optimized pcl_tracking_release.lib + ${PCL_COMMON_LIBRARIES} + ${PCL_FEATURES_LIBRARIES} + ${PCL_FILTERS_LIBRARIES} + ${PCL_IO_LIBRARIES} + ${PCL_IO_PLY_LIBRARIES} + ${PCL_KDTREE_LIBRARIES} + ${PCL_KEYPOINTS_LIBRARIES} + ${PCL_OCTREE_LIBRARIES} + ${PCL_REGISTRATION_LIBRARIES} + ${PCL_SAMPLE_CONSENSUS_LIBRARIES} + ${PCL_SEARCH_LIBRARIES} + ${PCL_SEGMENTATION_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_OCTREE_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_SURFACE_FOUND TRUE) +set(PCL_TRACKING_FOUND TRUE) +set(FLANN_LIBRARIES optimized flann debug flann) set(FLANN_INCLUDE_DIRS ${FREECAD_LIBPACK_DIR}/include/flann-1.7.1) diff --git a/src/Mod/Points/App/AppPointsPy.cpp b/src/Mod/Points/App/AppPointsPy.cpp index 59d53e71d..190849636 100644 --- a/src/Mod/Points/App/AppPointsPy.cpp +++ b/src/Mod/Points/App/AppPointsPy.cpp @@ -80,11 +80,11 @@ open(PyObject *self, PyObject *args) Points::Feature *pcFeature = (Points::Feature *)pcDoc->addObject("Points::Feature", file.fileNamePure().c_str()); Points::PointKernel pkTemp; - // pcl test - pcl::PointCloud cloud_in; - pcl::io::loadPLYFile(Name,cloud_in); + // pcl test + pcl::PointCloud cloud_in; + pcl::io::loadPLYFile(Name,cloud_in); - for (pcl::PointCloud::const_iterator it = cloud_in.begin();it!=cloud_in.end();++it) + for (pcl::PointCloud::const_iterator it = cloud_in.begin();it!=cloud_in.end();++it) pkTemp.push_back(Base::Vector3d(it->x,it->y,it->z)); pcFeature->Points.setValue( pkTemp ); } @@ -135,11 +135,11 @@ insert(PyObject *self, PyObject *args) Points::Feature *pcFeature = (Points::Feature *)pcDoc->addObject("Points::Feature", file.fileNamePure().c_str()); Points::PointKernel pkTemp; - // pcl test - pcl::PointCloud cloud_in; - pcl::io::loadPLYFile(Name,cloud_in); + // pcl test + pcl::PointCloud cloud_in; + pcl::io::loadPLYFile(Name,cloud_in); - for (pcl::PointCloud::const_iterator it = cloud_in.begin();it!=cloud_in.end();++it) + for (pcl::PointCloud::const_iterator it = cloud_in.begin();it!=cloud_in.end();++it) pkTemp.push_back(Base::Vector3d(it->x,it->y,it->z)); pcFeature->Points.setValue( pkTemp ); } @@ -176,10 +176,8 @@ show(PyObject *self, PyObject *args) // registration table struct PyMethodDef Points_Import_methods[] = { - {"open", open, 1}, /* method name, C func ptr, always-tuple */ + {"open", open, 1}, /* method name, C func ptr, always-tuple */ {"insert",insert, 1}, {"show",show, 1}, - {NULL, NULL} /* end of table marker */ }; - diff --git a/src/Mod/ReverseEngineering/App/CMakeLists.txt b/src/Mod/ReverseEngineering/App/CMakeLists.txt index e7338f6c2..ced3835d8 100644 --- a/src/Mod/ReverseEngineering/App/CMakeLists.txt +++ b/src/Mod/ReverseEngineering/App/CMakeLists.txt @@ -4,7 +4,7 @@ else(MSVC) add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H) endif(MSVC) -if (PCL_SURFACE_FOUND AND PCL_FEATURES_FOUND AND PCL_KDTREE_FOUND) +if (PCL_SURFACE_FOUND AND PCL_FEATURES_FOUND) add_definitions(-DHAVE_PCL_SURFACE) endif () @@ -30,6 +30,7 @@ set(Reen_LIBS ${PCL_COMMON_LIBRARIES} ${PCL_KDTREE_LIBRARIES} ${PCL_FEATURES_LIBRARIES} + ${PCL_SEARCH_LIBRARIES} ${PCL_SURFACE_LIBRARIES} )