summaryrefslogtreecommitdiff
blob: 63ac43ee1af906ad0a8eff51514425d2f89c6fd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- buildtools/LibyuiCommon.cmake	2014-02-10 19:41:45.000000000 +0400
+++ buildtools/LibyuiCommon.cmake	2014-09-10 23:16:10.317115440 +0400
@@ -245,12 +245,17 @@
 
 MACRO( FIND_LINKER_LIBS )	# try to find all libs to be linked against
   FOREACH( p ${LIB_LINKER})
-    FIND_LIBRARY( ${p}_LOOKUP "${p}" )
-    IF( "${${p}_LOOKUP}" STREQUAL "${p}_LOOKUP-NOTFOUND" )
-      MESSAGE( FATAL_ERROR "Linker-Library ${p} NOT FOUND" )
-    ELSE( "${${p}_LOOKUP}" STREQUAL "${p}_LOOKUP-NOTFOUND" )
-      MESSAGE( STATUS "${p} found" )
-    ENDIF( "${${p}_LOOKUP}" STREQUAL "${p}_LOOKUP-NOTFOUND" )
+    STRING(FIND "${p}" "Qt" ISQT)
+    IF( ISQT GREATER -1 )
+        FIND_PACKAGE(Qt4 4.8 REQUIRED ${p})
+    ELSE( ISQT GREATER -1 )
+        FIND_LIBRARY( ${p}_LOOKUP "${p}" )
+        IF( "${${p}_LOOKUP}" STREQUAL "${p}_LOOKUP-NOTFOUND" )
+          MESSAGE( FATAL_ERROR "Linker-Library ${p} NOT FOUND" )
+        ELSE( "${${p}_LOOKUP}" STREQUAL "${p}_LOOKUP-NOTFOUND" )
+          MESSAGE( STATUS "${p} found" )
+        ENDIF( "${${p}_LOOKUP}" STREQUAL "${p}_LOOKUP-NOTFOUND" )
+    ENDIF( ISQT GREATER -1 )
   ENDFOREACH()
 
 ENDMACRO( FIND_LINKER_LIBS )
@@ -616,6 +616,7 @@
 
     QT4_AUTOMOC( ${${TARGETLIB}_SOURCES} )
     QT4_WRAP_UI( ${TARGETLIB}_SOURCES "${${TARGETLIB}_WRAP_UI}" )
+    LINK_DIRECTORIES( ${QT_LIBRARY_DIR} )
 
   ENDIF( QT_FOUND )