File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,11 +79,15 @@ set_property(CACHE OPENGL PROPERTY STRINGS "desktop" "angle" "force-angle"
7979
8080# Handle dependencies for backends
8181if (DECOMPRESSION_BACKEND STREQUAL "unarr" )
82- find_package ("unarr" REQUIRED )
82+ find_package ("unarr" )
83+ # old unarr only ships PKGCONFIG
84+ if (NOT unarr_FOUND)
85+ pkg_check_modules (unarr IMPORTED_TARGET "libunarr" REQUIRED )
86+ endif ()
8387elseif (DECOMPRESSION_BACKEND STREQUAL "7zip" )
8488 find_package ("7zip" REQUIRED )
8589elseif (DECOMPRESSION_BACKEND STREQUAL "libarchive" )
86- find_package ("LibArchive::LibArchive " REQUIRED )
90+ find_package ("LibArchive" REQUIRED )
8791else ()
8892 message (FATAL_ERROR "No valid decompression backend specified." )
8993endif ()
Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ if(DECOMPRESSION_BACKEND STREQUAL "unarr")
77 unarr/extract_delegate.h )
88 target_include_directories (cbx_backend PUBLIC unarr )
99 target_compile_definitions (cbx_backend PUBLIC use_unarr )
10- target_link_libraries (cbx_backend unarr::unarr Qt::Core )
10+ if (TARGET unarr:unarr)
11+ target_link_libraries (cbx_backend unarr::unarr Qt::Core )
12+ else ()
13+ target_link_libraries (cbx_backend PkgConfig::unarr Qt::Core )
14+ endif ()
1115
1216elseif (DECOMPRESSION_BACKEND STREQUAL "libarchive" )
1317
You can’t perform that action at this time.
0 commit comments