Commit 10b790f4 authored by Abhijeet  sharma's avatar Abhijeet sharma

Implemented Version checker for fwupd in FindLIBFWUPD.cmake

Summary:
Implemented Version checker for fwupd in FindLIBFWUPD.cmake

    * Implemented Version Checker in FindLIBFWUPD.cmake
    * Reduced the Minimum Required version of Fwupd to 1.06 [Not Tested, bug reports says it builds successfully on 1.06]

Related Bugs:

    * https://bugs.kde.org/show_bug.cgi?id=397377
    * https://bugs.kde.org/show_bug.cgi?id=397378

Reviewers: apol, davidedmundson

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma, #discover_software_store

Differential Revision: https://phabricator.kde.org/D14933
parent e07a1bb9
......@@ -30,7 +30,7 @@ find_package(KF5NewStuff 5.23 CONFIG)
set(CMAKE_AUTORCC ON)
pkg_check_modules(FLATPAK flatpak>=0.6.12)
find_package(LIBFWUPD 1.0.7)
find_package(LIBFWUPD 1.0.6)
if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
# CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros.
......
......@@ -29,23 +29,29 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
if(LIBFWUPD_INCLUDE_DIRS AND LIBFWUPD_LIBRARIES)
if(LIBFWUPD_INCLUDE_DIRS AND LIBFWUPD_LIBRARIES AND LIBFWUPD_CONFIG_INCLUDE_DIRS)
set(LIBFWUPD_FOUND TRUE)
else ()
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(LIBFWUPD_PKG fwupd>=${LIBFWUPD_FIND_VERSION})
endif()
find_library (LIBFWUPD_LIBRARIES
NAMES fwupd libfwupd
NAMES fwupd libfwupd
)
find_path (LIBFWUPD_INCLUDE_DIRS
NAMES fwupd.h
HINTS ${LIBFWUPD_PKG_INCLUDE_DIRS}
PATH_SUFFIXES fwupd-1
HINTS fwupd-1/libfwupd
)
if(LIBFWUPD_INCLUDE_DIRS AND LIBFWUPD_LIBRARIES)
set(LIBFWUPD_FOUND TRUE)
if(LIBFWUPD_INCLUDE_DIRS AND LIBFWUPD_LIBRARIES AND PKG_CONFIG_FOUND)
if(((LIBFWUPD_PKG_VERSION VERSION_GREATER LIBFWUPD_FIND_VERSION) OR (LIBFWUPD_PKG_VERSION VERSION_EQUAL LIBFWUPD_FIND_VERSION)))
set(LIBFWUPD_FOUND TRUE)
endif()
endif()
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment