Cross-platform CMake follow along with LearnOpenGL.
- CLion: the IDE I use on Linux.
- vcpkg: a package manager to easily install required libraries.
- Visual Studio 2022: the IDE I use on Windows.
- Clone this repository.
- In CLion go to
File -> Open
and open the rootCMakeLists.txt
in this repository as a project.
- Go to
File -> Settings -> Build, Execution, Deployment -> CMake
. - Find
CMake Options
. - Insert
-DCMAKE_TOOLCHAIN_FILE=<path_to_vcpkg>/scripts/buildsystems/vcpkg.cmake
.
- Clone this repository.
- In Visual Studio go to
File -> Open -> Folder
and open this folder. - Once the folder is opened, right click on the root
CMakeLists.txt
and selectSet as Startup Item
.
Make sure vcpkg
is system wide installed by running
vcpkg.exe integrate install
.
- Go to
Project -> CMake Settings for LearnOpenGL
- Make sure
VCPKG_TARGET_TRIPLET
is set tox64-windows-static
. By default the non-static triplet is used. TheCMakeLists.txt
is setup to compile statically, therefore it's necessary to update this option.