Skip to content
Permalink
Browse files

Merge pull request #2427 from 3nids/findqt5lib

find libraries for Qt5
  • Loading branch information
3nids committed Nov 7, 2015
2 parents 71a6a3d + 8030746 commit 9172767a7921c46a90f81952b70ba3ca672c3b92
Showing with 35 additions and 15 deletions.
  1. +7 −1 cmake/FindQCA.cmake
  2. +9 −3 cmake/FindQScintilla.cmake
  3. +19 −11 cmake/FindQwt.cmake
@@ -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}
@@ -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)
@@ -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)

0 comments on commit 9172767

Please sign in to comment.
You can’t perform that action at this time.