These days, many C++ projects are built using build tools like cmake and meson in addition to GNU make (gmake). In this blog, I have already written on how to compile and run LibreOffice SDK examples using gmake. Now I want to discuss instructions for compiling and running C++ examples using cmake as the build tool. For the previous instructions using gmake, see this older post:
To be able to compile and run the C++ examples using cmake, you should have installed LibreOffice and LibreOffice SDK, then you should set LOROOT in CMakeLists.txt to appropriate folder. For LibreOffice 7.3 SDK, you should use this line:
set (LOROOT /opt/libreoffice7.3)
Compiling and running the C++ programs would be easy. For some of the examples, you need to run an instance of LibreOffice to listen for the incoming connections. So, you have to invoke:
$ libreoffice7.3 "--accept=socket,port=2083;urp;"
and then just open the project file in Qt Creator (or any other IDE of your choice that supports cmake), and click Build and then Run.
If you have built LibreOffice yourself, use the instdir path for LOROOT: