sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
See here for the previous part of the tutorial.
In the previous part, we set up our GitHub repository and Qt Creator project.
We continue with setting up CMake.
This used to be a very complicated process, but with SGEXTN version 6.2.0 and above, the BuildLah ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ CMake integration is now available.
You should probably read through the BuildLah ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ tutorial before continuing.
Now that you know how BuildLah ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ works, we can use it to write the CMakeLists.txt
cmake_minimum_required(VERSION 3.21 FATAL_ERROR) find_package(SGEXTN REQUIRED) BuildLah_use_default_settings() project(ColoursPlusPlus VERSION 2.0.0 LANGUAGES CXX) BuildLah_find_dependencies() BuildLah_add_component(ColoursPlusPlus_app GUI "." "" "" "ColoursPlusPlus" SGEXTN::SG_Containers SGEXTN::SG_Math SGEXTN::SG_Core SGEXTN::SG_FileSystem SGEXTN::SG_Widgets SGEXTN::SG_RI SGEXTN::EntryPoint_SG)
This does all the setup automatically and creates a normal (GUI) application target with its root folder at the current folder. We link it to all the SGEXTN modules that we are going to use.
The application now has its headers folder being include/, sources folder being src/, assets folder being assets/, and shaders folder being shaders/.
See here for the next part of the tutorial.
©2025 05524F.sg (Singapore)