-
Notifications
You must be signed in to change notification settings - Fork 2
Build on Windows with VisualStudio
Marcus Hudritsch edited this page Jul 1, 2024
·
3 revisions
- You must have installed a Visual Studio IDE with the "Desktop development with C++" option. The community version works fine.
- Clone the SLProject GIT repository into a directory of your choice where the path is NOT longer than 256 characters.
-
Generate build folder with cmake-gui app:
- Download and install the latest cmake.
- Start the cmake-gui application.
- Choose the SLProject folder in the field "Where is the source code".
- Copy the same path and add /build_win64_vs in the field "Where to build the binaries".
- Click the button "Configure" and choose your Visual Studio version.
- Click the button "Generate" to generate the project files into the build_win64_vs folder
- Click the button "Open Project" to open the project.
-
or generate build folder with cmake in the console:
- Create a folder and name it e.g. build-Win64-VS2019 in the SLProject root folder.
- Open a command prompt and go into the new build directory with cd.
- Type cmake -G "Visual Studio 16 2019 Win64" .. to build the project files for Visual Studio 2019. With cmake -G you get all possible build systems that you could generate the project files for.
- For Visual Studio 16 2019 the generation changed to cmake -G "Visual Studio 15 2017" -A x64 ..
- For Visual Studio 17 2022 the generation changed to cmake -G "Visual Studio 17 2022" -A x64 ..
- Double-click the generated SLProject.sln solution file to open Visual Studio.
- Build all projects by right-clicking > Build on the ALL_BUILD project. It should build all projects without error.
-
To run the demo application you must first set the app-demo as the startup project with right-click > Set as Startup Project.
- To run the application you choose Debug > Start without Debugging.
- After closing the welcome dialogue you can open with the menu File > Load Demo Scenes many different scenes that demonstrate the features of SLProject.