find libraries for Qt5

This commit is contained in:
Denis Rouzaud 2015-11-07 11:05:11 -05:00
parent 71a6a3d6ba
commit 8030746674
3 changed files with 35 additions and 15 deletions

View File

@ -20,8 +20,14 @@ if(QCA_INCLUDE_DIR AND QCA_LIBRARY)
else(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 find_library(QCA_LIBRARY
NAMES qca qca2 NAMES ${QCA_LIBRARY_NAMES}
PATHS PATHS
${LIB_DIR} ${LIB_DIR}
$ENV{LIB} $ENV{LIB}

View File

@ -32,13 +32,19 @@ ELSE(EXISTS QSCINTILLA_VERSION_STR)
/usr/include /usr/include
) )
FIND_LIBRARY(QSCINTILLA_LIBRARY if(ENABLE_QT5)
NAMES qscintilla2 libqscintilla2 libqscintilla2.dylib 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 PATHS
"${QT_LIBRARY_DIR}" "${QT_LIBRARY_DIR}"
/usr/local/lib /usr/local/lib
/usr/lib /usr/lib
) )
IF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR) IF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
SET(QSCINTILLA_FOUND TRUE) SET(QSCINTILLA_FOUND TRUE)

View File

@ -4,28 +4,36 @@
# Redistribution and use is allowed according to the terms of the BSD license. # Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file. # 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_FOUND = system has QWT lib
# QWT_LIBRARY = full path to the QWT library # 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 FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
/usr/include /usr/include
/usr/local/include /usr/local/include
"$ENV{LIB_DIR}/include" "$ENV{LIB_DIR}/include"
"$ENV{INCLUDE}" "$ENV{INCLUDE}"
PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6 PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6
) )
FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt5 qwt6 qwt-qt4 qwt5-qt4 qwt6-qt4 PATHS if(ENABLE_QT5)
/usr/lib set(QWT_LIBRARY_NAMES qwt-qt5 qwt6-qt5)
/usr/local/lib else(ENABLE_QT5)
"$ENV{LIB_DIR}/lib" set(QWT_LIBRARY_NAMES qwt qwt6 qwt5 qwt-qt4 qwt6-qt4 qwt5-qt4)
"$ENV{LIB}" 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) IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
SET(QWT_FOUND TRUE) SET(QWT_FOUND TRUE)