Update cmake_minimum_required
Zahrun opened this issue · 4 comments
We cannot build obs-backgroundremoval with CMake 3.16 cf. pacstall/pacstall-programs#4576 (comment)
Update cmake_minimum_required at https://github.com/royshil/obs-backgroundremoval/blob/bf44ccc1330100cc3e6a6d5c7b40ec74ea914020/CMakeLists.txt#L1C1-L1C23
The minimum supported version may be 3.19.
https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
Debian bullseye fails with cmake 3.18.4 from repos
CMake Error: The source directory "/tmp/pacstall/obs-backgroundremoval-1.1.6/linux-x86_64" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Error: /tmp/pacstall/obs-backgroundremoval-1.1.6/build_x86_64 is not a directory
I installed cmake 3.19.8 from source, same error.
With 3.20.6, the error is different:
CMake Error: Could not read presets from /tmp/pacstall/obs-backgroundremoval-1.1.6: Unrecognized "version" field
Error: /tmp/pacstall/obs-backgroundremoval-1.1.6/build_x86_64 is not a directory
Actually, the version of the presets file is 3, which indicates a required minimum version of 3.21 according to https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html
https://github.com/royshil/obs-backgroundremoval/blob/bf44ccc1330100cc3e6a6d5c7b40ec74ea914020/CMakePresets.json#L2
The presets file also indicates a minimal version of 3.22
https://github.com/royshil/obs-backgroundremoval/blob/bf44ccc1330100cc3e6a6d5c7b40ec74ea914020/CMakePresets.json#L3-L7
cmake 3.21.7 fails with
CMake Error: Could not read presets from /tmp/pacstall/obs-backgroundremoval-1.1.6: "cmakeMinimumRequired" version too new
Error: /tmp/pacstall/obs-backgroundremoval-1.1.6/build_x86_64 is not a directory
cmake 3.22.0 builds successfully
@Zahrun You can build our plugin with older CMake by passing options written in CMakePresets.json to the command-line options. In this way, it can build at least with 3.16 I suppose. I wonder if we should provide the description to build with the older CMake or not.
@royshil What do you think about this?
Ok it's a non-issue then. I was just not so familiar with presets.