To build on Mac:
Use CMake GUI tool.
Source code: /Users/liangzou/gitcloudcompare/trunk
/Users/liangzou/gitcloudcompare/build
Then click Configure
Manually fix the QT5_ROOT_PATH fields:
/Users/liangzou/Qt/5.7/clang_64/lib/cmake/Qt5
Then choose what to install under INSTALL. Check INSTALL_QANIMATION_PLUGIN
Set variables for FFMPEG:
/usr/local/Cellar/ffmpeg/3.1.4/include
Click the Configure again.
Then click Generate.
In addition, I need to do a code change in file:
QVideoEncoder.cpp. Add function call "avcodec_register_all()" before avcodec_find_encoder(codec_id).
Then make install
To build on Linux:
Use CMake GUI tool:
cmake-gui
Install Qt5. Download QT installer and run it.
Set:
QT5_ROOT_PATH: /opt/Qt/5.10.1/gcc_64/include
Qt5Concurrent_DIR: /opt/Qt/5.10.1/gcc_64/lib/cmake/Qt5Concurrent
...
With PDAL to support LAS files.
Download and build https://github.com/LASzip/LASzip
Download and build https://github.com/PDAL/PDAL
Check the OPTION_PDAL_LAS option
PDAL_DIR should be set correctly if it was installed correctly. e.g. /usr/local/lib/cmake/PDAL
Download and build https://github.com/open-source-parsers/jsoncpp
Set JSON_ROOT_DIR to: /usr/local/lib/cmake/jsoncpp/
To install the QANIMATION_PLUGIN, FFMPEG needs to be installed.
https://github.com/FFmpeg/FFmpeg
To install FFMPEG:
git checkout n4.1
./configure --disable-x86asm --prefix=/opt/ffmpeg --enable-shared --enable-pic
make
sudo make install
Set FFMPEG_INCLUDE_DIR and FFMPEG_LIBRARY_DIR correctly, e.g. /opt/ffmpeg/include/ and /opt/ffmpeg/lib
(VERY IMPORTANT: need to add /opt/ffmpeg/lib to LD_LIBRARY_PATH. Otherwise, the plugin won't show in CloudCompare).
A working build screen:
Common errors:
1. cannot find a so:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/Qt/5.10.1/gcc_64/lib:/usr/local/cuda-9.1/lib64
OR you'll need to run sudo ldconfig
2. CloudCompare crashes when starting:
Delete some pidgin files: e.g. sudo rm -rf /usr/local/lib/cloudcompare/pidgins
3. If installed by using snap, need to follow:
sudo apt update
sudo apt install snapd
sudo snap install cloudcompare
No comments:
Post a Comment