mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Linux: test for recent libarchive/libcurl/lsblk
The software requires at least: - libcurl 7.32.0 (released Aug 12 2013!) - libarchive 3.2.0 (released Apr 30 2016) - util-linux 2.27 (released Sep 7 2015) While technically we could build libcurl and libarchive statically (like we do for Mac and Windows) if the system has older libs, it's likely that running the software on systems that old may give other problems as well (e.g. does lsblk --json (util-linux) and udisks2 work correctly?), so do not bother. Closes #16
This commit is contained in:
parent
c04516cbee
commit
6081ca441f
1 changed files with 13 additions and 2 deletions
|
@ -198,10 +198,21 @@ elseif(APPLE)
|
|||
COMMAND "${MACDEPLOYQT}" "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.app" -qmldir="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
else()
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(LibArchive REQUIRED)
|
||||
find_package(CURL REQUIRED 7.32.0)
|
||||
find_package(LibArchive REQUIRED 3.2.0)
|
||||
find_package(Qt5 COMPONENTS DBus)
|
||||
set(EXTRALIBS Qt5::DBus)
|
||||
if (NOT CMAKE_CROSSCOMPILING)
|
||||
find_program(LSBLK "lsblk")
|
||||
if (NOT LSBLK)
|
||||
message(FATAL_ERROR "Unable to locate lsblk (used for disk enumeration)")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND "${LSBLK}" "--json" RESULT_VARIABLE ret)
|
||||
if (ret EQUAL "1")
|
||||
message(FATAL_ERROR "util-linux package too old. lsblk does not support --json (used for disk enumeration)")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(TARGETS rpi-imager DESTINATION bin)
|
||||
install(FILES icons/rpi-imager.png DESTINATION share/pixmaps)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue