Commit 24f21063 authored by Sébastien Blin's avatar Sébastien Blin

fix qt5 detection

Change-Id: Ie1260e92e67559e5777b3ead660f767381954c09
parent 76179eb5
......@@ -84,11 +84,33 @@ ELSE(LibRingClient_PROJECT_DIR)
FIND_PACKAGE(LibRingClient REQUIRED)
ENDIF(LibRingClient_PROJECT_DIR)
if(QT5_VER AND QT5_PATH)
string(REPLACE "." ";" VERSION_LIST ${QT5_VER})
list(GET VERSION_LIST 0 QT5_VER_MAJOR)
list(GET VERSION_LIST 1 QT5_VER_MINOR)
list(GET VERSION_LIST 2 QT5_VER_PATCH)
if((${QT5_VER_MAJOR} GREATER_EQUAL 5) AND (${QT5_VER_MINOR} GREATER_EQUAL 14))
message(STATUS "Using custom Qt version")
find_package(Qt5 ${QT5_VER} REQUIRED COMPONENTS
Core
DBus
PATHS ${QT5_PATH} NO_DEFAULT_PATH)
find_package(Qt5LinguistTools ${QT5_VER}
PATHS ${QT5_PATH} NO_DEFAULT_PATH)
endif()
else()
find_package(Qt5 REQUIRED COMPONENTS
Core
DBus)
find_package(Qt5LinguistTools)
endif()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH true)
# find packages
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0>=3.10)
PKG_CHECK_MODULES(GLIB REQUIRED glib-2.0>=2.40)
FIND_PACKAGE(Qt5Core REQUIRED)
PKG_CHECK_MODULES(CLUTTER REQUIRED clutter-1.0)
PKG_CHECK_MODULES(CLUTTERGTK REQUIRED clutter-gtk-1.0)
PKG_CHECK_MODULES(LIBNOTIFY libnotify>=0.7.6) #optional
......
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