CloudCompare编译


需要有:

  1. CMake: 3.0 or newer

  2. QT:CloudCompare 2.7 requires Qt version 5.5 or newer

  3. Make sure you have a C++11 compliant compiler (gcc 4.7+ / clang / Visual 2013 and newer)

编译过程:

  • 打开cmake,选择build和源码地址,点击configuration;
  • QT5_ROOT_PATH 注意设置, e.g. Qt\5.6\msvc2013_64
  • Option中选择OPTION_MP_BUILD,其他不用勾选
  • Install中的插件都可以不用勾选
  • 最后CMAKE_INSTALL_PREFIX 选择你需要install的目录
  • 最后点击Generate
打开sln工程,debug和release模式下,都All_Build, 然后Install

注意:文件夹,地址这些尽量不要有中文,否则会生成不成功


以下是一些optional的设置和相关介绍,我都没选择,暂时没有关注

Additional optional CMake setup steps

[Optional] Setup for the qPoissonRecon plugin

  1. The version of the Poisson Surface Reconstruction library (M. Kazhdan et al.) used by the is https://github.com/cloudcompare/PoissonRecon. It is declared as a submodule of CC's repository. You have to explicitly synchronize it (see https://git-scm.com/docs/git-submodule).
  2. Then simply check the INSTALL_QPOISSON_RECON_PLUGIN option in CMake

[Optional] Setup for LibLAS support

If you want to compile CloudCompare (and ccViewer) with LAS/LAZ files support, you'll need:

  1. LibLAS (last tested version: 1.8 on Windows)
  2. and optionally laszip for LAZ files support (last tested version: 2.2.0 on Windows) --> prefer the static version (BUILD_STATIC in LASzip CMake configuration) and mind the WITH_STATIC_LASZIP option in libLAS CMake configuration! (only appears in 'Advanced' mode)
  3. Boost multi-thread static libraries
  • make the BOOST_ROOT environment variable point to your Boost installation before launching CMake in order for the automatic find_package script to work properly
  • otherwise refer to LibLAS documentation for more directions

Then, the CloudCompare CMake project will request that you set the 3 following variables:

  1. LIBLAS_INCLUDE_DIR: LibLAS include directory (pretty straightforward ;))
  2. LIBLAS_RELEASE_LIBRARY_FILE: main LibLAS release library (the .lib or .a file itself!)
  3. [Windows] LIBLAS_SHARED_LIBRARY_FILE: full path to the liblas.dll file

For the moment, only the release version of CloudCompare supports LibLAS files

[Optional] Setup for LibE57 support

If you want to compile CloudCompare (and ccViewer) with LibE57 files support, you'll need:

  1. Boost multi-thread static libraries (same as libLAS)

  2. Xerces-C++ multi-thread static libraries

    • On Visual C++ (Windows):
      1. select the Static Debug or Static Release configurations
      2. you'll have to manually modify the XercesLib project options so that the C/C++ > Code Generation > Runtime Library are of DLL type in both release and debug modes (i.e. /MD in release or /MDd in debug)
      3. for 64 bits version be sure to select the right platform (x64 instead of Win32). If you use Visual Studio Express 2010, be sure also that the toolset (in the project properties) is set to something like Windows7.1SDK
    • only the XercesLib project neet to be compiled
    • eventually, CMake will look for the resulting files in /include (instead of /src) and /lib (without the Release or Debug subfolders). By default the visual project will put them in /Build/WinXX/VCXX/StaticXXX. Therefore you should create a custom folder with the right organization and copy the files there.
  3. LibE57 (last tested version: 1.1.312 on Windows)

    • WARNING: with Visual Studio (at least), you'll need the libraries compiled with /MD (=DLL Multithreaded) in release mode and /MDd in debug mode. You may have to replace all /MT by /MD in the main libE57 root CMake file (or in cmake/c_flag_overrides.cmake and cmake/cxx_flag_overrides.cmake if there's no /MT in it)
    • If you found set(Boost_USE_STATIC_RUNTIME ON) in the CMake file, comment it
    • the version 1.1.312 of libE57 has a small glitch that must be manually patched:
      1. open E57FoundationImpl.cpp and browse to the CheckedFile::operator<<(float f) method (line 4670)
      2. set the output precision to 8 instead of 7! (otherwise the interal checks for precision loss may fail and libE57 will throw an exception)

The CloudCompare CMake project will only require that you set the path where libE57 has been installed (LIBE57_INSTALL_DIR)

[Optional] Setup for PCL (required by qPCL)

If you want to compile qPCL you'll need PCL (last tested version: 1.8 on Windows and 1.6 on Linux)

Follow the online instructions/tutorials. Basically, you'll need Boost, Qt, Flann and Eigen.

Once properly installed, the CloudCompare CMake script should automatically find PCL definitions. However, you'll have to set again the parameters related to Flann and Eigen.

[Optional] Setup for FBX SDK support

If you want to compile CloudCompare (and ccViewer) with FBX files support, you'll need: The official Autodesk's FBX SDK (last tested version: 2015.1 on Windows)

Then, the CloudCompare CMake project will request that you set the 3 following variables:

  1. FBX_SDK_INCLUDE_DIR: FBX SDK include directory (pretty straightforward ;)
  2. FBX_SDK_LIBRARY_FILE: main FBX SDK library (e.g. libfbxsdk-md.lib)
  3. FBX_SDK_LIBRARY_FILE_DEBUG: main FBX SDK library for debug mode (if any)

[Optional] Setup for GDAL support

If you want to compile CloudCompare (and ccViewer) with GDAL (raster) files support, you'll need a compiled version of the GDAL library (last tested version: 1.10 on Windows, 2.0.2 on Mac OS X)

Then, the CloudCompare CMake project will request that you set the 2 following variables:

  1. GDAL_INCLUDE_DIR: GDAL include directory (pretty straightforward ;)
  2. GDAL_LIBRARY: the static library (e.g. gdal_i.lib)

[Optional] Setup for Cork + MPIR support (for qCork)

If you want to compile the qCork plugin (on Windows only for now), you'll need:

  1. MPIR 2.6.0
  2. the forked version of the Cork library for CC: https://github.com/cloudcompare/cork
    • on Windows see the Visual project shipped with this fork and corresponding to your version (if any ;)
    • for VS2013 just edit the mpir property sheet (in the Properties manager) and update the MPIR macro (in the User macros tab)

Then, the CloudCompare CMake project will request that you set the following variables:

  1. CORK_INCLUDE_DIR and MPIR_INCLUDE_DIR: both libraries include directories (pretty straightforward ;)
  2. CORK_RELEASE_LIBRARY_FILE and MPIR_RELEASE_LIBRARY_FILE: both main library files
  3. and optionally CORK_DEBUG_LIBRARY_FILE and MPIR_DEBUG_LIBRARY_FILE: both main library files (for debug mode)
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值