Skip to content

Commit

Permalink
Merge pull request #2427 from 3nids/findqt5lib
Browse files Browse the repository at this point in the history
find libraries for Qt5
  • Loading branch information
3nids committed Nov 7, 2015
2 parents 71a6a3d + 8030746 commit 9172767
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 15 deletions.
8 changes: 7 additions & 1 deletion cmake/FindQCA.cmake
Expand Up @@ -20,8 +20,14 @@ if(QCA_INCLUDE_DIR AND QCA_LIBRARY)

else(QCA_INCLUDE_DIR AND QCA_LIBRARY)

if(ENABLE_QT5)
set(QCA_LIBRARY_NAMES qca-qt5 qca2-qt5)
else(ENABLE_QT5)
set(QCA_LIBRARY_NAMES qca qca2)
endif(ENABLE_QT5)

find_library(QCA_LIBRARY
NAMES qca qca2
NAMES ${QCA_LIBRARY_NAMES}
PATHS
${LIB_DIR}
$ENV{LIB}
Expand Down
12 changes: 9 additions & 3 deletions cmake/FindQScintilla.cmake
Expand Up @@ -32,13 +32,19 @@ ELSE(EXISTS QSCINTILLA_VERSION_STR)
/usr/include
)

FIND_LIBRARY(QSCINTILLA_LIBRARY
NAMES qscintilla2 libqscintilla2 libqscintilla2.dylib
if(ENABLE_QT5)
set(QSCINTILLA_LIBRARY_NAMES qscintilla2-qt5 libqscintilla2-qt5 libqscintilla2-qt5.dylib)
else(ENABLE_QT5)
set(QSCINTILLA_LIBRARY_NAMES qscintilla2 libqscintilla2 libqscintilla2.dylib)
endif(ENABLE_QT5)

find_library(QSCINTILLA_LIBRARY
NAMES ${QSCINTILLA_LIBRARY_NAMES}
PATHS
"${QT_LIBRARY_DIR}"
/usr/local/lib
/usr/lib
)
)

IF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
SET(QSCINTILLA_FOUND TRUE)
Expand Down
30 changes: 19 additions & 11 deletions cmake/FindQwt.cmake
Expand Up @@ -4,28 +4,36 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Once run this will define:
#
# Once run this will define:
#
# QWT_FOUND = system has QWT lib
# QWT_LIBRARY = full path to the QWT library
# QWT_INCLUDE_DIR = where to find headers
# QWT_INCLUDE_DIR = where to find headers
#


FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
/usr/include
/usr/local/include
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
"$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}"
PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6
)

FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt5 qwt6 qwt-qt4 qwt5-qt4 qwt6-qt4 PATHS
/usr/lib
/usr/local/lib
"$ENV{LIB_DIR}/lib"
"$ENV{LIB}"
)
if(ENABLE_QT5)
set(QWT_LIBRARY_NAMES qwt-qt5 qwt6-qt5)
else(ENABLE_QT5)
set(QWT_LIBRARY_NAMES qwt qwt6 qwt5 qwt-qt4 qwt6-qt4 qwt5-qt4)
endif(ENABLE_QT5)

find_library(QWT_LIBRARY
NAMES ${QWT_LIBRARY_NAMES}
PATHS
/usr/lib
/usr/local/lib
"$ENV{LIB_DIR}/lib"
"$ENV{LIB}"
)

IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
SET(QWT_FOUND TRUE)
Expand Down

0 comments on commit 9172767

Please sign in to comment.