mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
CMake: Resolve FIXMEs related to CMake < 3.20
We already have required this version for quite a while for Lagom, Ladybird and Serenity. Now that we require it in all of our CMakeLists, let's scrub for better ways of writing things.
This commit is contained in:
parent
65bfd2ca2d
commit
37a0466285
Notes:
sideshowbarker
2024-07-17 05:02:35 +09:00
Author: https://github.com/ADKaster
Commit: 37a0466285
Pull-request: https://github.com/SerenityOS/serenity/pull/24112
Reviewed-by: https://github.com/trflynn89
3 changed files with 4 additions and 13 deletions
|
@ -29,10 +29,7 @@ function(serenity_install_headers target_name)
|
|||
endfunction()
|
||||
|
||||
function(serenity_install_sources)
|
||||
# TODO: Use cmake_path() when we upgrade the minimum CMake version to 3.20
|
||||
# https://cmake.org/cmake/help/v3.23/command/cmake_path.html#relative-path
|
||||
string(LENGTH ${SerenityOS_SOURCE_DIR} root_source_dir_length)
|
||||
string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${root_source_dir_length} -1 current_source_dir_relative)
|
||||
cmake_path(RELATIVE_PATH CMAKE_CURRENT_SOURCE_DIR BASE_DIRECTORY ${SerenityOS_SOURCE_DIR} OUTPUT_VARIABLE current_source_dir_relative)
|
||||
file(GLOB_RECURSE sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h" "*.cpp" "*.gml")
|
||||
foreach(source ${sources})
|
||||
get_filename_component(subdirectory ${source} DIRECTORY)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue