Issue with CMake

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
jbierlaire
Posts: 3
Joined: Thu May 20, 2021 11:49 am

Issue with CMake

Post by jbierlaire »

Hi,

I have installed CC on the Cloudcompare.org website, and it works perfectly fine.
I know want to develop a CC plugin. For me to try out and visualize small changes in the source code I am writing, I need to add my plugin folder in the CC plugin directory.
However, with the version installed from cloudcompare.org, the plugin directory only has .dll files, and I can't copy my folder in this directory, in order to try out my plugin (as explained in https://github.com/CloudCompare/CloudCo ... IBUTING.md). I also can add that qDummyPlugin does not exist anymore (as you surely know).

So I have tried to install the version from github, using the following link instructions https://github.com/CloudCompare/CloudCo ... r/BUILD.md After cloning the directory, I have everything I need to compile CC using CMake.

Here are my directories : source code : C:/Users/bierlaire/Desktop/CloudCompare with everything that I just cloned
where to build the binaries : C:/Users/bierlaire/Desktop/build (empty folder)
Please note that I can't work on C:/Program Files since I have not all the permissions on my laptop.

Trying to compile, I get this error :

Code: Select all

CMake Error at CMakeLists.txt:3 (project):
  Generator

    Visual Studio 15 2017

  could not find any instance of Visual Studio.

Configuring incomplete, errors occurred!
See also "C:/Users/bierlaire/Desktop/build/CMakeFiles/CMakeOutput.log".
I have everything in the prerequisites, as well as Visual Studio 2019 and Visual Studio 2017. This is also why this issue is frustrating.

Please be aware that I am a beginner with CMake.
I am also open to any other solution in order to try out my plugin code without using CMake.

Any help would be greatly appreciated,
Jules
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Issue with CMake

Post by WargodHernandez »

I would suggest using visual studio 2019 CMAKE, just right click on the folder C:/Users/bierlaire/Desktop/CloudCompare and select "Open with Visual Studio".

then set your CMAKE settings from the project menu
VSProject.JPG
VSProject.JPG (28.94 KiB) Viewed 4821 times
jbierlaire
Posts: 3
Joined: Thu May 20, 2021 11:49 am

Re: Issue with CMake

Post by jbierlaire »

Thank you for your answer.

I have done what you suggested, and I had an issue with QT5, which I fixed by adding the correct folder path.
Now trying to right click and open the folder, I get this issue :
error.PNG
error.PNG (18.71 KiB) Viewed 4802 times
I have tried to look at CMakeLists.txt, but I have no clue on what should fix this error.
Do you have any idea ?
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Issue with CMake

Post by WargodHernandez »

To give me a better idea of how you have it set up, please attach the CMakeSettings.json file that VS2019 created.
go to the CMake Settings like before and then select CMakeSettings.json
VSCmakeSettings.JPG
VSCmakeSettings.JPG (178.96 KiB) Viewed 4782 times
jbierlaire
Posts: 3
Joined: Thu May 20, 2021 11:49 am

Re: Issue with CMake

Post by jbierlaire »

Here is my CMakeSettings.json :

Code: Select all

{
  "configurations": [
    {
      "name": "x64-Debug",
      "generator": "Ninja",
      "configurationType": "Debug",
      "inheritEnvironments": [ "msvc_x64_x64" ],
      "buildRoot": "C:/Users/bierlaire/Desktop/build/CMakeFiles",
      "installRoot": "${projectDir}\\out\\install\\${name}",
      "cmakeCommandArgs": "",
      "buildCommandArgs": "",
      "ctestCommandArgs": "",
      "cmakeToolchain": "C:/Users/bierlaire/Desktop/CloudCompare/CMakeLists.txt"
    }
  ]
}
CMakeSettings.PNG
CMakeSettings.PNG (55.58 KiB) Viewed 4730 times
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Issue with CMake

Post by WargodHernandez »

I would remove this line

Code: Select all

, 
      "cmakeToolchain": "C:/Users/bierlaire/Desktop/CloudCompare/CMakeLists.txt"
The CloudCompare CMakeLists is not a tool chain.
Post Reply