Right now, given your file layout, you probably want something along the lines of the following: Once you've generated the VS buildsystem (solution files), build each project like you would in the VS GUI normally. You have two CMake targets, which turn into two VS projects. There are special things you can do for windows, but I don't see a particular need for those here. Just write a CMakeLists.txt file for the project like you would for any platform (your first few sentences seem to imply you've used it on other platforms). Configuration of a buildsystem is separate from invoking the buildsystem to perform builds. It's used to configure CMake ("teach" CMake how) to generate a particular type of buildsystem (which here is a Visual Studio solution). The CMakeLists.txt does not "run when you press build". If I have to do two separate projects, how can I view them on the same window and how can I make App see generated dll's from Engine? I don't want to have a single CMakeLists.txt file that runs once. Right now when I add the folders manually my project structure looks like this: MyProject/ The problem right now is, as far as I understand visual studio puts a CMakeLists.txt file in the root of the project which it runs when I press build. It doesn't necessarily have to be a solution, as long as I achieve 2 separate builds in the same view I'm fine. But when I create a cmake project it just gives me a folder and there is no add project when I right click on it. Normally when create a visual studio project it creates a solution and I can just right click on the solution to say add project and configure accordingly. I want these to be on the same solution like this: Project/ Then, when I run App, I want it to generate an exe that depends on the dlls created by the Engine, and not re-generate the Engine directory. I want to run them separately, so when I'm done with Engine and press run, I just want the project to generate the dll files and do nothing with the App directory. I want to have a project structure where I have an App directory that generates an executable, an Engine folder that generates a dll shared lib. I want to create a project with CMake in windows with Visual Studio (the particular version I'm using is 2022), I've never used CMake in windows before so I'm just following what visual studio says to me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |