mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:47:35 +00:00
Meta: Use CMake functions to extract files
Newer cmake's have internal functions to un-compress files. These functions will work on pure windows - as well as linux. This eliminates the need to search for external tools (TAR,GZIP,ZIP) - and helps fixing #9866. In order to finally fix #9866 we need to decide to bump the cmake version requirements and remove the checks. If we demand a newer cmake version, we will loose Ubuntu 20.04 as a build target - as it ships with CMake 3.16. For now - we keep compatibility with CMake 3.16 - and only if CMake 3.18 as been found - we use its new functionality.
This commit is contained in:
parent
5ab3fcf710
commit
8b30b69dac
4 changed files with 45 additions and 22 deletions
|
@ -7,17 +7,22 @@
|
|||
#
|
||||
# Additionally we have to emit an error message for each tool,
|
||||
# as REQUIRED only works with cmake 3.18 and above.
|
||||
find_program(UNZIP_TOOL unzip REQUIRED)
|
||||
if (NOT UNZIP_TOOL)
|
||||
message(FATAL_ERROR "Failed to locate unzip on your machine, please install it and re-read the SerenityOS build documentation.")
|
||||
endif()
|
||||
if (CMAKE_VERSION VERSION_LESS 3.18.0)
|
||||
find_program(UNZIP_TOOL unzip REQUIRED)
|
||||
message(STATUS "Found cmake ${CMAKE_VERSION} - testing for external tools to uncompress")
|
||||
if (NOT UNZIP_TOOL)
|
||||
message(FATAL_ERROR "Failed to locate unzip on your machine, please install it and re-read the SerenityOS build documentation.")
|
||||
endif()
|
||||
|
||||
find_program(TAR_TOOL tar REQUIRED)
|
||||
if (NOT TAR_TOOL)
|
||||
message(FATAL_ERROR "Failed to locate tar on your machine, please install it and re-read the SerenityOS build documentation.")
|
||||
endif()
|
||||
find_program(TAR_TOOL tar REQUIRED)
|
||||
if (NOT TAR_TOOL)
|
||||
message(FATAL_ERROR "Failed to locate tar on your machine, please install it and re-read the SerenityOS build documentation.")
|
||||
endif()
|
||||
|
||||
find_program(GZIP_TOOL gzip REQUIRED)
|
||||
if (NOT GZIP_TOOL)
|
||||
message(FATAL_ERROR "Failed to locate gzip on your machine, please install it and re-read the SerenityOS build documentation.")
|
||||
endif()
|
||||
find_program(GZIP_TOOL gzip REQUIRED)
|
||||
if (NOT GZIP_TOOL)
|
||||
message(FATAL_ERROR "Failed to locate gzip on your machine, please install it and re-read the SerenityOS build documentation.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Found cmake ${CMAKE_VERSION} - using CMake to uncompress")
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue