Using a custom CMake install to compile MuseScore4 using build.cmake script.
I just cloned the MuseScore repo to my computer using Git. I'm running Debian Linux, so you know how it goes: all my software is six months to two years behind the latest releases, and I'm happy with that, because that's a big part of what makes Debian so "stable".
Obviously build.cmake
refuses to run, returning the following message:
CMake Error at build.cmake:20 (cmake_minimum_required):
CMake 3.16 or higher is required. You are running version 3.15.2
As any MuseScore developer is certainly aware, that warning is absolutely legit, because changing cmake_minimum_required
's argument to 3.15
results in a bunch of errors during the building process. I reverted that change. I don't know why I thought I was that lucky.
Here's what I've tried:
I installed the latest binaries from CMake.org and put them in a directory on my desktop. I then changed build.cmake
's shebang to the directory where I have my shiny new CMake builds. I also set the CMAKE_INSTALL_PREFIX
variable in CMakeLists.txt to the same directory. It didn't work, and I'm not surprised, because I don't know what I'm doing. I barely ever used CMake to this day.
Thanks in advance for any suggestions. God bless.
P.S. I don't want to install the newest CMake systemwide. I want to keep my old version until it's updated in the official Debian repos, so that's why I'm trying to have the build scripts use the version I have in a directory on my desktop instead of the one which is specified in my PATH.
Comments
I just figured out a compromise. I installed a newer CMake using the Debian backports, so my CMake doesn't make my system too fragile, all whilst allowing me to compile newer software.
Cheers.