
Other OS’es find the SDL version I’ve installed using homebrew/pacman. Only Windows builds need the deps/ directory. The directory structure is something like this: CMakeLists.txt In the internal library’s and game’s CMakeLists.txt, I then link the library/executable with appropriate libraries like this, target_link_libraries( CMake right now feels super opaque in how it works to me.

findpackage(Qt6 REQUIRED COMPONENTS Core Widgets) Qt6 Doc qtcore.
CMAKE IF WINDOWS HOW TO
I also seem to need to give the full path for libraries from the add-on libraries, while SDL2 is just fine with the path to a folder?Īs I am new to this, I don’t even know exactly where to start debugging this. Elador said in How to use findpackage with Qt6 and modern CMake (Windows). It makes it hard to determine the paths to the generated libraries or executables. CMake will separate a variable to list if there are spaces in the path. But on Windows, Ive hit a bit of a snag due to the fact that cmake appends the configuration name to the ouput directories (which I like in general, but it screws up what Im doing in this case). This is fresh in my head, and this popped up, so Ill drop this here. I can #include them directly, giving the full path, but that seems wrong. This is more on the cmake side of things, but it addresses a few windows specific problems you may encounter using CMake with Windows. Then I set up SDL2_ttf and SDL2_mixer in exactly the same way and it does not find the header files.ĬMake on the other hand does not complain. zip/Git with the whole thing setup to start experimenting with small projects. What I am trying to do is, have an “SDK” Folder in my project with all the libraries I need to link, so I can create a simple. Open the Command Palette (P (Windows, Linux Ctrl+Shift+P)) and run the CMake: Quick Start command: Enter a project name. the '3' in CMake 2.4.3 Also, the variable CMAKEVERSION contains the string for the version.
CMAKE IF WINDOWS WINDOWS 10
This time I am on a Windows 10 machine using CLion, MinGW as Toolchain and CMake. The CMake Tools extension can create the files for a basic CMake project for you. If you encounter any gaps or bugs, please report them in the.


Last time I was using Linux/Make and including and linking was relatively straight forward. This is documentation for the CMake-based build system which is currently in preview release.
