Skip to content

Commit 9172767

Browse files
committedNov 7, 2015
Merge pull request #2427 from 3nids/findqt5lib
find libraries for Qt5
2 parents 71a6a3d + 8030746 commit 9172767

File tree

3 files changed

+35
-15
lines changed

3 files changed

+35
-15
lines changed
 

‎cmake/FindQCA.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ if(QCA_INCLUDE_DIR AND QCA_LIBRARY)
2020

2121
else(QCA_INCLUDE_DIR AND QCA_LIBRARY)
2222

23+
if(ENABLE_QT5)
24+
set(QCA_LIBRARY_NAMES qca-qt5 qca2-qt5)
25+
else(ENABLE_QT5)
26+
set(QCA_LIBRARY_NAMES qca qca2)
27+
endif(ENABLE_QT5)
28+
2329
find_library(QCA_LIBRARY
24-
NAMES qca qca2
30+
NAMES ${QCA_LIBRARY_NAMES}
2531
PATHS
2632
${LIB_DIR}
2733
$ENV{LIB}

‎cmake/FindQScintilla.cmake

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,19 @@ ELSE(EXISTS QSCINTILLA_VERSION_STR)
3232
/usr/include
3333
)
3434

35-
FIND_LIBRARY(QSCINTILLA_LIBRARY
36-
NAMES qscintilla2 libqscintilla2 libqscintilla2.dylib
35+
if(ENABLE_QT5)
36+
set(QSCINTILLA_LIBRARY_NAMES qscintilla2-qt5 libqscintilla2-qt5 libqscintilla2-qt5.dylib)
37+
else(ENABLE_QT5)
38+
set(QSCINTILLA_LIBRARY_NAMES qscintilla2 libqscintilla2 libqscintilla2.dylib)
39+
endif(ENABLE_QT5)
40+
41+
find_library(QSCINTILLA_LIBRARY
42+
NAMES ${QSCINTILLA_LIBRARY_NAMES}
3743
PATHS
3844
"${QT_LIBRARY_DIR}"
3945
/usr/local/lib
4046
/usr/lib
41-
)
47+
)
4248

4349
IF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
4450
SET(QSCINTILLA_FOUND TRUE)

‎cmake/FindQwt.cmake

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,36 @@
44
# Redistribution and use is allowed according to the terms of the BSD license.
55
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
66
#
7-
# Once run this will define:
8-
#
7+
# Once run this will define:
8+
#
99
# QWT_FOUND = system has QWT lib
1010
# QWT_LIBRARY = full path to the QWT library
11-
# QWT_INCLUDE_DIR = where to find headers
11+
# QWT_INCLUDE_DIR = where to find headers
1212
#
1313

1414

1515
FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
1616
/usr/include
1717
/usr/local/include
18-
"$ENV{LIB_DIR}/include"
19-
"$ENV{INCLUDE}"
18+
"$ENV{LIB_DIR}/include"
19+
"$ENV{INCLUDE}"
2020
PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6
2121
)
2222

23-
FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt5 qwt6 qwt-qt4 qwt5-qt4 qwt6-qt4 PATHS
24-
/usr/lib
25-
/usr/local/lib
26-
"$ENV{LIB_DIR}/lib"
27-
"$ENV{LIB}"
28-
)
23+
if(ENABLE_QT5)
24+
set(QWT_LIBRARY_NAMES qwt-qt5 qwt6-qt5)
25+
else(ENABLE_QT5)
26+
set(QWT_LIBRARY_NAMES qwt qwt6 qwt5 qwt-qt4 qwt6-qt4 qwt5-qt4)
27+
endif(ENABLE_QT5)
28+
29+
find_library(QWT_LIBRARY
30+
NAMES ${QWT_LIBRARY_NAMES}
31+
PATHS
32+
/usr/lib
33+
/usr/local/lib
34+
"$ENV{LIB_DIR}/lib"
35+
"$ENV{LIB}"
36+
)
2937

3038
IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
3139
SET(QWT_FOUND TRUE)

0 commit comments

Comments
 (0)
Please sign in to comment.