CMake development environment etc.
Share
I used CMake to build a tool called Kotaro on major operating systems.
I'll give you a rough outline of what I did. It was a roundabout way of doing things, but I approached it from various angles to arrive at the way I do it now, so I hope it will be helpful.
I first built it on a Mac. Then I built it on Linux. It was fine up to this point, but when I built it on Windows, things were different and I had to frequently change CMakeLists.txt.
I tried to see if I could port it with minimal effort using mingw, but I gave up.
The build passed, but I got an error saying the codecvt function entry point could not be found, so I thought the cl compiler would be safer for beginners.
I used visual studio to recreate CMakeLists.txt and build it. I like that with visual studio, I can install packages with manifest using vcpkg and create an environment where I can just use find_package from cmake.
I decided to build on Linux and Mac based on the CMakeLists.txt created in this environment. With SDL2, vcpkg can be used on Windows, but on Linux and Mac, SDL2_hogeConfig.cmake is missing and cannot be used, so each package has its own circumstances. Even in such cases, visual studio was convenient because it allowed me to quickly test on a real device via remote connection.
In conclusion, visual studio+vcpkg was useful.