barbara wrote: ↑Fri May 26 2023 5:44 pm
The entire problem you are experiencing is how you have told MSVC to "install" CopperSpice. Microsoft provides full support for CMake however there are settings you must make so CMake and Ninja know what to do. Keep in mind that some users have CMake experience but we absolutely understand other users do not. We are going to help you.
If you follow these directions it will work. To ensure this we just verified it again on our CI server.
1 Remove the environment variable of CMAKE_INSTALL_PREFIX ( if you have not already )
2 Here are more detailed directions to add the install path for CopperSpice. In VS highlight the project menu and select "CMake Settings for CopperSpice". Change the path for ""cmakeCommandArgs" to the following. The path can be changed, but I would strongly suggest you first test with the path listed here.
Code: Select all
Thank you very much!
The problem is: When I have cloned the repository but did not open the Copperspice directory, then I cannot find the "CMake Settings for CopperSpice" item in the VS project menu.
When I open the directory and choose "CMake Settings" then VS after some seconds finds the CMakeLists.txt file and creates the aforementioned directory structure without Questions asked.
I have read the Microsoft documentation about CMake and VS. When there is a CMakeLists.txt file in the root of the project, VS2022 will automatically open it and execute it.(Before I can change any settings)
This is what Microsoft documentation says and this happened.
Before this happens, I have no project where I can change settings.
After I did so, it looks like this:
Everything was created automatically without Questions asked.
So probably, I must change the CMakeLists.txt or the JSON file before
I open it with Visual Studio?
Or should I configure the CMake project with the CMake GUI (which I have installed, but never used) before
I create a project in Visual Studio?
(Open the image in new Tab, to see it in 100% Size)
this happened, project settings can be changed or added.
If I change CMAKE_INSTALL_PREFIX in this screen to c:\\csp_lib it gives an error and says "double defined".
I again deleted everything and cloned the Github again and tried it some seconds ago and just this happened.
Question: My final goal (I am not a professional) is to make smaller projects, which have a rather simple GUI (Menu, Editfields, Images etc) and are statically linked. (no DLLs) Is this possible?