1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

CMake: Bump CMake minimum up to 3.21 to work around CLion bug

Fix the recursive directory bug in CLion Nova EAP's CMake version in a
way that doesn't also break `./Meta/serenity.sh run lagom ladybird`.

This brings the Lagom minimum required closer to the Serenity minimum
required. Which is still fine, because the serenity.sh script knows how
to build CMake from source if a developer's local copy is too old.
This commit is contained in:
Andrew Kaster 2023-11-10 01:09:55 -07:00 committed by Andreas Kling
parent 32e6fd9715
commit a0d8990c82

View file

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.16) cmake_minimum_required (VERSION 3.21)
project( project(
Lagom Lagom
@ -538,10 +538,10 @@ if (BUILD_LAGOM)
add_executable(gzip ../../Userland/Utilities/gzip.cpp) add_executable(gzip ../../Userland/Utilities/gzip.cpp)
target_link_libraries(gzip LibCompress LibCore LibMain) target_link_libraries(gzip LibCompress LibCore LibMain)
# FIXME: Use PROJECT_IS_TOPLEVEL with cmake 3.21 # Work around bug in JetBrains distributed CMake 3.27.2 where this causes infinite recursion in
# Work around bug in JetBrains distributed CMake 3.27.2 where this causes infinite recursion in # export_components() when called from CLion Nova by checking if we already have Ladybird included
# export_components() when called from CLion Nova by checking if we already have Ladybird included # This technically breaks people including Lagom as a submodule and wanting Ladybird targets, but... who? why?
if (ENABLE_LAGOM_LADYBIRD AND NOT ladybird_SOURCE_DIR) if (ENABLE_LAGOM_LADYBIRD AND PROJECT_IS_TOP_LEVEL)
add_serenity_subdirectory(Ladybird) add_serenity_subdirectory(Ladybird)
endif() endif()