Find liblxqt dependencies automatically
authorLuís Pereira <luis.artur.pereira@gmail.com>
Thu, 29 May 2014 15:52:28 +0000 (08:52 -0700)
committerLuís Pereira <luis.artur.pereira@gmail.com>
Thu, 29 May 2014 16:08:51 +0000 (09:08 -0700)
When the user writes something like this:
        find_package(LXQT5 REQUIRED)
        include(${LXQT_USE_FILE})

It shouldn't need to to find LXQT dependencies.
That's what was happening when the build type was set to debug.

Signed-off-by: Luís Pereira <luis.artur.pereira@gmail.com>
cmake/lxqt_use.cmake.in

index 2b065cc..6180d02 100644 (file)
@@ -72,6 +72,18 @@ SET_SOURCE_FILES_PROPERTIES(LXQT_LIBRARIES PROPERTIES OBJECT_DEPENDS lxqt${LXQT_
 #endif()
 
 
+if (LXQT_QT_VERSION EQUAL "4")
+    find_package(Qt4 REQUIRED QUIET)
+    include(${QT_USE_FILE})
+elseif(LXQT_QT_VERSION EQUAL "5")
+    find_package(Qt5Widgets REQUIRED QUIET)
+    find_package(Qt5DBus REQUIRED QUIET)
+    find_package(Qt5X11Extras REQUIRED QUIET)
+    find_package(Qt5LinguistTools REQUIRED QUIET)
+    find_package(Qt5Xdg REQUIRED)
+else()
+    message(FATAL "Qt${LXQT_QT_VERSION} is not supported.")
+endif()
 
 
 #else()